diff --git a/test/pusher_channels_flutter_test.dart b/test/pusher_channels_flutter_test.dart index 64a74cf..cef450d 100644 --- a/test/pusher_channels_flutter_test.dart +++ b/test/pusher_channels_flutter_test.dart @@ -7,12 +7,12 @@ void main() { TestWidgetsFlutterBinding.ensureInitialized(); setUp(() { - TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger.setMockMethodCallHandler(channel, (MethodCall methodCall) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler(channel, (MethodCall methodCall) async { return '42'; }); }); tearDown(() { - TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger.setMockMethodCallHandler(channel, null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler(channel, null); }); }