mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-27 19:09:21 +01:00
Painted chrome becomes icons or symbols; old words stay as spoken labels or code comments. OS window titles kept. Tests build today from the local day. Todo: ed07cff3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
618 B
Dart
17 lines
618 B
Dart
/// Finders for icon-only controls (textgate: the old words survive only as
|
|
/// the icon's spoken `semanticLabel`).
|
|
library;
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
/// The [Icon] whose spoken label is exactly [label].
|
|
Finder iconLabeled(String label) => find.byWidgetPredicate(
|
|
(w) => w is Icon && w.semanticLabel == label,
|
|
description: 'Icon labelled "$label"',
|
|
);
|
|
|
|
/// The nearest [T] (a button type) around the icon labelled [label].
|
|
Finder buttonLabeled<T extends Widget>(String label) =>
|
|
find.ancestor(of: iconLabeled(label), matching: find.byType(T));
|