aves_mio/.flutter/packages/flutter/test/painting/image_info_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

25 lines
877 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:ui' as ui show Image;
import 'package:flutter/painting.dart';
import 'package:flutter_test/flutter_test.dart';
Future<void> main() async {
final ui.Image smallImage = await createTestImage(width: 10, height: 20);
final ui.Image middleImage = await createTestImage(width: 20, height: 100);
final ui.Image bigImage = await createTestImage(width: 100, height: 200);
test('ImageInfo sizeBytes', () {
var imageInfo = ImageInfo(image: smallImage);
expect(imageInfo.sizeBytes, equals(800));
imageInfo = ImageInfo(image: middleImage);
expect(imageInfo.sizeBytes, equals(8000));
imageInfo = ImageInfo(image: bigImage);
expect(imageInfo.sizeBytes, equals(80000));
});
}