Skip to content

Commit c7ef5b7

Browse files
committed
pubspec sdk alert aliviated
1 parent 5cddb89 commit c7ef5b7

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

example/test/widget_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import 'package:flutter/material.dart';
99
import 'package:flutter_test/flutter_test.dart';
1010

11-
import 'package:flutter_vision_example/main.dart';
11+
// import 'package:flutter_vision_example/main.dart';
1212

1313
void main() {
1414
testWidgets('Verify Platform version', (WidgetTester tester) async {

lib/src/plugin/base.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'dart:convert';
22
import 'dart:io';
3-
import 'dart:typed_data';
43
import 'package:path/path.dart';
54
import 'package:flutter/services.dart';
65
import 'package:path_provider/path_provider.dart';

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: 1.1.2
66
homepage: https://github.com/vladiH/flutter_vision
77

88
environment:
9-
sdk: ">=2.17.1 <3.0.0"
9+
sdk: ">=2.17.1 <4.0.0"
1010
flutter: ">=2.5.0"
1111

1212
dependencies:

test/flutter_vision_test.dart

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
import 'package:flutter/services.dart';
22
import 'package:flutter_test/flutter_test.dart';
3-
import 'package:flutter_vision/flutter_vision.dart';
3+
// import 'package:flutter_vision/flutter_vision.dart';
44

55
void main() {
66
const MethodChannel channel = MethodChannel('flutter_vision');
77

88
TestWidgetsFlutterBinding.ensureInitialized();
99

10-
setUp(() {
11-
channel.setMockMethodCallHandler((MethodCall methodCall) async {
12-
return '42';
13-
});
14-
});
10+
handler(MethodCall methodCall) async {
11+
if (methodCall.method == 'getAll') {
12+
return <String, dynamic>{
13+
'appName': 'myapp',
14+
'packageName': 'com.mycompany.myapp',
15+
'version': '0.0.1',
16+
'buildNumber': '1'
17+
};
18+
}
19+
return null;
20+
}
1521

16-
tearDown(() {
17-
channel.setMockMethodCallHandler(null);
18-
});
22+
TestWidgetsFlutterBinding.ensureInitialized();
1923

20-
test('getPlatformVersion', () async {
21-
//expect(await FlutterVision.platformVersion, '42');
22-
});
24+
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
25+
.setMockMethodCallHandler(channel, handler);
2326
}

0 commit comments

Comments
 (0)