12 lines
401 B
Dart
12 lines
401 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
Finder findIconByAsset(String assetName) {
|
|
return find.byWidgetPredicate(
|
|
(Widget widget) => widget is IconButton &&
|
|
widget.icon is Image &&
|
|
(widget.icon as Image).image is AssetImage &&
|
|
((widget.icon as Image).image as AssetImage).keyName == 'assets/icons/$assetName',
|
|
);
|
|
}
|