Files
FlClash/test/helpers/glyph_finders.dart
chen08209 9bd2286eb5 feat(ui): layer surfaces with fills and follow the iOS type scale
Changelog: iOS-style surfaces, alerts and sheets; clearer TV focus
2026-10-17 17:21:43 +08:00

13 lines
423 B
Dart

import 'package:fl_clash/ui/icons/icons.dart';
import 'package:flutter_test/flutter_test.dart';
extension GlyphFinders on CommonFinders {
Finder byGlyph(Glyph glyph) => byWidgetPredicate(
(widget) => widget is GlyphIcon && widget.glyph == glyph,
description: 'GlyphIcon($glyph)',
);
Finder widgetWithGlyph(Type widgetType, Glyph glyph) =>
ancestor(of: byGlyph(glyph), matching: byType(widgetType));
}