Skip to content

Commit

Permalink
Get rid of using deprecated method in test
Browse files Browse the repository at this point in the history
  • Loading branch information
SviatManiuk committed Jun 30, 2023
1 parent 8f854ba commit 48d25cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/top_snackbar_flutter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ void main() {
TestWidgetsFlutterBinding.ensureInitialized();

setUp(() {
channel.setMockMethodCallHandler((MethodCall methodCall) async {
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, (message) async {
return '42';
});
});

tearDown(() {
channel.setMockMethodCallHandler(null);
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
.setMockMethodCallHandler(channel, null);
});
}

0 comments on commit 48d25cc

Please sign in to comment.