12345678910111213141516171819202122232425 |
- import 'package:flutter/services.dart';
- import 'package:flutter_test/flutter_test.dart';
- import 'package:flutter_smartscan_plugin/plugin_method_channel_native.dart';
- void main() {
- MethodChannelFlutterSmartscanPlugin platform =
- MethodChannelFlutterSmartscanPlugin();
- const MethodChannel channel = MethodChannel('flutter_smartscan_plugin');
- TestWidgetsFlutterBinding.ensureInitialized();
- setUp(() {
- channel.setMockMethodCallHandler((MethodCall methodCall) async {
- return '42';
- });
- });
- tearDown(() {
- channel.setMockMethodCallHandler(null);
- });
- test('getPlatformVersion', () async {
- expect(await platform.getPlatformVersion(), '42');
- });
- }
|