Skip to content

Commit

Permalink
chore: Update ubuntu_lints to 0.4.0 (#44)
Browse files Browse the repository at this point in the history
* chore: Bump ubuntu_lints to 0.4.0

* chore: Fix formatting
  • Loading branch information
spydon authored Sep 18, 2024
1 parent 5e3cdde commit b1ac78b
Show file tree
Hide file tree
Showing 9 changed files with 482 additions and 385 deletions.
26 changes: 16 additions & 10 deletions lib/src/custom_matchers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ class _IsCheckedMatcher extends CustomMatcher {
Object? featureValueOf(covariant Finder finder) {
final togglables = find
.descendant(
of: finder,
matching: find.bySubtype<YaruTogglable<Object?>>(),
matchRoot: true)
of: finder,
matching: find.bySubtype<YaruTogglable<Object?>>(),
matchRoot: true,
)
.evaluate()
.map((e) => e.widget as YaruTogglable);
return togglables.single.checked;
Expand All @@ -49,21 +50,26 @@ class _IsEnabledMatcher extends CustomMatcher {
Object featureValueOf(covariant Finder finder) {
final editables = find
.descendant(
of: finder, matching: find.byType(TextField), matchRoot: true)
of: finder,
matching: find.byType(TextField),
matchRoot: true,
)
.evaluate()
.map((e) => e.widget as TextField);
final togglables = find
.descendant(
of: finder,
matching: find.bySubtype<YaruTogglable<Object?>>(),
matchRoot: true)
of: finder,
matching: find.bySubtype<YaruTogglable<Object?>>(),
matchRoot: true,
)
.evaluate()
.map((e) => e.widget as YaruTogglable);
final tappables = find
.descendant(
of: finder,
matching: find.bySubtype<InkResponse>(),
matchRoot: true)
of: finder,
matching: find.bySubtype<InkResponse>(),
matchRoot: true,
)
.evaluate()
.map((e) => e.widget as InkResponse);
return !editables.any((e) => e.enabled == false) &&
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ dependencies:
dev_dependencies:
mockito: ^5.4.0
plugin_platform_interface: ^2.1.4
ubuntu_lints: ^0.3.0
ubuntu_lints: ^0.4.0
Loading

0 comments on commit b1ac78b

Please sign in to comment.