aves_mio/.flutter/packages/flutter/test/painting/image_decoder_test.dart
Fabio Micheluz 2c988f959b
Some checks are pending
Quality check / Flutter analysis (push) Waiting to run
Quality check / CodeQL analysis (java-kotlin) (push) Waiting to run
first commit
2026-02-19 13:25:23 +01:00

24 lines
770 B
Dart

// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:typed_data';
import 'dart:ui' as ui;
import 'package:flutter/painting.dart';
import 'package:flutter_test/flutter_test.dart';
import '../image_data.dart';
import 'painting_utils.dart';
void main() {
final binding = PaintingBindingSpy();
test('Image decoder control test', () async {
expect(binding.instantiateImageCodecCalledCount, 0);
final ui.Image image = await decodeImageFromList(Uint8List.fromList(kTransparentImage));
expect(image, isNotNull);
expect(image.width, 1);
expect(image.height, 1);
expect(binding.instantiateImageCodecCalledCount, 1);
});
}