Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@Skip(
'This file is skipped due to a cross-import that needs to be fixed. Tracked in https://github.com/flutter/flutter/issues/177028.',
)
// This file is run as part of a reduced test set in CI on Mac and Windows
// machines.
@Tags(<String>['reduced-test-set'])
library;

import 'dart:typed_data';

import 'package:material_ui/material_ui.dart';
import 'package:flutter/foundation.dart' show SynchronousFuture;
import 'package:flutter/rendering.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:material_ui/material_ui.dart';

import '../image_data.dart';
import '../painting/mocks_for_image_cache.dart';
import 'image_data.dart';

void main() {
testWidgets('CircleAvatar with dark background color', (WidgetTester tester) async {
Expand Down Expand Up @@ -94,7 +91,7 @@ void main() {
WidgetTester tester,
) async {
addTearDown(imageCache.clear);
final errorImage = ErrorImageProvider();
final errorImage = _ErrorImageProvider();
var caughtForegroundImageError = false;
await tester.pumpWidget(
wrap(
Expand Down Expand Up @@ -341,3 +338,15 @@ Widget wrap({required Widget child}) {
),
);
}

class _ErrorImageProvider extends ImageProvider<_ErrorImageProvider> {
@override
ImageStreamCompleter loadImage(_ErrorImageProvider key, ImageDecoderCallback decode) {
throw Exception('Simulated image loading failure');
}

@override
Future<_ErrorImageProvider> obtainKey(ImageConfiguration configuration) {
return SynchronousFuture<_ErrorImageProvider>(this);
}
}
Comment thread
QuncCccccc marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@Skip(
'This file is skipped due to a cross-import that needs to be fixed. Tracked in https://github.com/flutter/flutter/issues/177028.',
)
import 'package:flutter/foundation.dart';
import 'package:material_ui/material_ui.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:material_color_utilities/material_color_utilities.dart';
import 'package:material_ui/material_ui.dart';

import '../image_data.dart';
import 'image_data.dart';

void main() {
test('ColorScheme lerp special cases', () {
Expand Down
Loading
Loading