Skip to content

Commit

Permalink
Fix a flutter analyze warning: add LocalPassword.hashCode
Browse files Browse the repository at this point in the history
  • Loading branch information
inetic committed Oct 7, 2024
1 parent 869ee06 commit a593a1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bindings/dart/example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ void main() {
// Verify that platform version is retrieved.
expect(
find.byWidgetPredicate(
(Widget widget) => widget is Text &&
widget.data!.startsWith('Running on:'),
(Widget widget) =>
widget is Text && widget.data!.startsWith('Running on:'),
),
findsOneWidget,
);
Expand Down
3 changes: 3 additions & 0 deletions bindings/dart/lib/local_secret.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class LocalPassword implements LocalSecret, SetLocalSecret {
if (other is! LocalPassword) return false;
return string == other.string;
}

@override
int get hashCode => string.hashCode;
}

class LocalSecretKey implements LocalSecret {
Expand Down

0 comments on commit a593a1c

Please sign in to comment.