Navaron Bracke
Committed by GitHub

Merge pull request #784 from navaronbracke/pre_platform_interface_cleanups

fix: Cleanups for plugin_platform_interface work
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 .buildlog/ 8 .buildlog/
9 .history 9 .history
10 .svn/ 10 .svn/
  11 +migrate_working_dir/
11 12
12 # IntelliJ related 13 # IntelliJ related
13 *.iml 14 *.iml
@@ -31,8 +32,6 @@ @@ -31,8 +32,6 @@
31 .pub/ 32 .pub/
32 /build/ 33 /build/
33 34
34 -# Web related  
35 -  
36 # Symbolication related 35 # Symbolication related
37 app.*.symbols 36 app.*.symbols
38 37
1 -# This file tracks properties of this Flutter project.  
2 -# Used by Flutter tool to assess capabilities and perform upgrades etc.  
3 -#  
4 -# This file should be version controlled and should not be manually edited.  
5 -  
6 -version:  
7 - revision: 5f105a6ca7a5ac7b8bc9b241f4c2d86f4188cf5c  
8 - channel: stable  
9 -  
10 -project_type: app  
@@ -8,9 +8,9 @@ This project is a starting point for a Flutter application. @@ -8,9 +8,9 @@ This project is a starting point for a Flutter application.
8 8
9 A few resources to get you started if this is your first Flutter project: 9 A few resources to get you started if this is your first Flutter project:
10 10
11 -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)  
12 -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 11 +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
  12 +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 13
14 -For help getting started with Flutter, view our  
15 -[online documentation](https://flutter.dev/docs), which offers tutorials, 14 +For help getting started with Flutter development, view the
  15 +[online documentation](https://docs.flutter.dev/), which offers tutorials,
16 samples, guidance on mobile development, and a full API reference. 16 samples, guidance on mobile development, and a full API reference.
1 -include: package:lint/analysis_options.yaml  
  1 +include: package:lint/analysis_options.yaml
@@ -4,10 +4,10 @@ import 'package:mobile_scanner/mobile_scanner.dart'; @@ -4,10 +4,10 @@ import 'package:mobile_scanner/mobile_scanner.dart';
4 import 'package:mobile_scanner_example/scanner_error_widget.dart'; 4 import 'package:mobile_scanner_example/scanner_error_widget.dart';
5 5
6 class BarcodeListScannerWithController extends StatefulWidget { 6 class BarcodeListScannerWithController extends StatefulWidget {
7 - const BarcodeListScannerWithController({Key? key}) : super(key: key); 7 + const BarcodeListScannerWithController({super.key});
8 8
9 @override 9 @override
10 - _BarcodeListScannerWithControllerState createState() => 10 + State<BarcodeListScannerWithController> createState() =>
11 _BarcodeListScannerWithControllerState(); 11 _BarcodeListScannerWithControllerState();
12 } 12 }
13 13
@@ -4,10 +4,10 @@ import 'package:mobile_scanner/mobile_scanner.dart'; @@ -4,10 +4,10 @@ import 'package:mobile_scanner/mobile_scanner.dart';
4 import 'package:mobile_scanner_example/scanner_error_widget.dart'; 4 import 'package:mobile_scanner_example/scanner_error_widget.dart';
5 5
6 class BarcodeScannerWithController extends StatefulWidget { 6 class BarcodeScannerWithController extends StatefulWidget {
7 - const BarcodeScannerWithController({Key? key}) : super(key: key); 7 + const BarcodeScannerWithController({super.key});
8 8
9 @override 9 @override
10 - _BarcodeScannerWithControllerState createState() => 10 + State<BarcodeScannerWithController> createState() =>
11 _BarcodeScannerWithControllerState(); 11 _BarcodeScannerWithControllerState();
12 } 12 }
13 13
@@ -3,10 +3,10 @@ import 'package:mobile_scanner/mobile_scanner.dart'; @@ -3,10 +3,10 @@ import 'package:mobile_scanner/mobile_scanner.dart';
3 import 'package:mobile_scanner_example/scanner_error_widget.dart'; 3 import 'package:mobile_scanner_example/scanner_error_widget.dart';
4 4
5 class BarcodeScannerPageView extends StatefulWidget { 5 class BarcodeScannerPageView extends StatefulWidget {
6 - const BarcodeScannerPageView({Key? key}) : super(key: key); 6 + const BarcodeScannerPageView({super.key});
7 7
8 @override 8 @override
9 - _BarcodeScannerPageViewState createState() => _BarcodeScannerPageViewState(); 9 + State<BarcodeScannerPageView> createState() => _BarcodeScannerPageViewState();
10 } 10 }
11 11
12 class _BarcodeScannerPageViewState extends State<BarcodeScannerPageView> 12 class _BarcodeScannerPageViewState extends State<BarcodeScannerPageView>
@@ -5,10 +5,10 @@ import 'package:mobile_scanner/mobile_scanner.dart'; @@ -5,10 +5,10 @@ import 'package:mobile_scanner/mobile_scanner.dart';
5 import 'package:mobile_scanner_example/scanner_error_widget.dart'; 5 import 'package:mobile_scanner_example/scanner_error_widget.dart';
6 6
7 class BarcodeScannerReturningImage extends StatefulWidget { 7 class BarcodeScannerReturningImage extends StatefulWidget {
8 - const BarcodeScannerReturningImage({Key? key}) : super(key: key); 8 + const BarcodeScannerReturningImage({super.key});
9 9
10 @override 10 @override
11 - _BarcodeScannerReturningImageState createState() => 11 + State<BarcodeScannerReturningImage> createState() =>
12 _BarcodeScannerReturningImageState(); 12 _BarcodeScannerReturningImageState();
13 } 13 }
14 14
@@ -6,10 +6,10 @@ import 'package:mobile_scanner/mobile_scanner.dart'; @@ -6,10 +6,10 @@ import 'package:mobile_scanner/mobile_scanner.dart';
6 import 'package:mobile_scanner_example/scanner_error_widget.dart'; 6 import 'package:mobile_scanner_example/scanner_error_widget.dart';
7 7
8 class BarcodeScannerWithScanWindow extends StatefulWidget { 8 class BarcodeScannerWithScanWindow extends StatefulWidget {
9 - const BarcodeScannerWithScanWindow({Key? key}) : super(key: key); 9 + const BarcodeScannerWithScanWindow({super.key});
10 10
11 @override 11 @override
12 - _BarcodeScannerWithScanWindowState createState() => 12 + State<BarcodeScannerWithScanWindow> createState() =>
13 _BarcodeScannerWithScanWindowState(); 13 _BarcodeScannerWithScanWindowState();
14 } 14 }
15 15
@@ -3,10 +3,10 @@ import 'package:mobile_scanner/mobile_scanner.dart'; @@ -3,10 +3,10 @@ import 'package:mobile_scanner/mobile_scanner.dart';
3 import 'package:mobile_scanner_example/scanner_error_widget.dart'; 3 import 'package:mobile_scanner_example/scanner_error_widget.dart';
4 4
5 class BarcodeScannerWithoutController extends StatefulWidget { 5 class BarcodeScannerWithoutController extends StatefulWidget {
6 - const BarcodeScannerWithoutController({Key? key}) : super(key: key); 6 + const BarcodeScannerWithoutController({super.key});
7 7
8 @override 8 @override
9 - _BarcodeScannerWithoutControllerState createState() => 9 + State<BarcodeScannerWithoutController> createState() =>
10 _BarcodeScannerWithoutControllerState(); 10 _BarcodeScannerWithoutControllerState();
11 } 11 }
12 12
@@ -5,10 +5,10 @@ import 'package:mobile_scanner/mobile_scanner.dart'; @@ -5,10 +5,10 @@ import 'package:mobile_scanner/mobile_scanner.dart';
5 import 'package:mobile_scanner_example/scanner_error_widget.dart'; 5 import 'package:mobile_scanner_example/scanner_error_widget.dart';
6 6
7 class BarcodeScannerWithZoom extends StatefulWidget { 7 class BarcodeScannerWithZoom extends StatefulWidget {
8 - const BarcodeScannerWithZoom({Key? key}) : super(key: key); 8 + const BarcodeScannerWithZoom({super.key});
9 9
10 @override 10 @override
11 - _BarcodeScannerWithZoomState createState() => _BarcodeScannerWithZoomState(); 11 + State<BarcodeScannerWithZoom> createState() => _BarcodeScannerWithZoomState();
12 } 12 }
13 13
14 class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom> 14 class _BarcodeScannerWithZoomState extends State<BarcodeScannerWithZoom>
@@ -11,7 +11,7 @@ import 'package:mobile_scanner_example/mobile_scanner_overlay.dart'; @@ -11,7 +11,7 @@ import 'package:mobile_scanner_example/mobile_scanner_overlay.dart';
11 void main() => runApp(const MaterialApp(home: MyHome())); 11 void main() => runApp(const MaterialApp(home: MyHome()));
12 12
13 class MyHome extends StatelessWidget { 13 class MyHome extends StatelessWidget {
14 - const MyHome({Key? key}) : super(key: key); 14 + const MyHome({super.key});
15 15
16 @override 16 @override
17 Widget build(BuildContext context) { 17 Widget build(BuildContext context) {
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
2 import 'package:mobile_scanner/mobile_scanner.dart'; 2 import 'package:mobile_scanner/mobile_scanner.dart';
3 3
4 class ScannerErrorWidget extends StatelessWidget { 4 class ScannerErrorWidget extends StatelessWidget {
5 - const ScannerErrorWidget({Key? key, required this.error}) : super(key: key); 5 + const ScannerErrorWidget({super.key, required this.error});
6 6
7 final MobileScannerException error; 7 final MobileScannerException error;
8 8
1 name: mobile_scanner_example 1 name: mobile_scanner_example
2 description: Demonstrates how to use the mobile_scanner plugin. 2 description: Demonstrates how to use the mobile_scanner plugin.
  3 +# The following line prevents the package from being accidentally published to
  4 +# pub.dev using `flutter pub publish`. This is preferred for private packages.
3 publish_to: 'none' # Remove this line if you wish to publish to pub.dev 5 publish_to: 'none' # Remove this line if you wish to publish to pub.dev
4 version: 0.0.1 6 version: 0.0.1
5 7
6 environment: 8 environment:
7 - sdk: ">=2.12.0 <4.0.0" 9 + sdk: '>=2.17.0 <4.0.0'
8 10
  11 +# Dependencies specify other packages that your package needs in order to work.
  12 +# To automatically upgrade your package dependencies to the latest versions
  13 +# consider running `flutter pub upgrade --major-versions`. Alternatively,
  14 +# dependencies can be manually updated by changing the version numbers below to
  15 +# the latest version available on pub.dev. To see which dependencies have newer
  16 +# versions available, run `flutter pub outdated`.
9 dependencies: 17 dependencies:
10 flutter: 18 flutter:
11 sdk: flutter 19 sdk: flutter
12 - image_picker: ^1.0.0  
13 20
  21 + image_picker: ^1.0.4
14 mobile_scanner: 22 mobile_scanner:
  23 + # When depending on this package from a real application you should use:
  24 + # mobile_scanner: ^x.y.z
  25 + # See https://dart.dev/tools/pub/dependencies#version-constraints
  26 + # The example app is bundled with the plugin so we use a path dependency on
  27 + # the parent directory to use the current plugin's version.
15 path: ../ 28 path: ../
16 29
17 dev_dependencies: 30 dev_dependencies:
18 flutter_test: 31 flutter_test:
19 sdk: flutter 32 sdk: flutter
20 - lint: ^2.0.1 33 + integration_test:
  34 + sdk: flutter
  35 + lint: ^2.1.2
21 36
22 flutter: 37 flutter:
23 uses-material-design: true 38 uses-material-design: true
1 -// This is a basic Flutter widget test.  
2 -//  
3 -// To perform an interaction with a widget in your test, use the WidgetTester  
4 -// utility that Flutter provides. For example, you can send tap and scroll  
5 -// gestures. You can also use WidgetTester to find child widgets in the widget  
6 -// tree, read text, and verify that the values of widget properties are correct.  
7 -  
8 -import 'package:flutter_test/flutter_test.dart';  
9 -  
10 -void main() {  
11 - testWidgets('Verify Platform version', (WidgetTester tester) async {  
12 - // Build our app and trigger a frame.  
13 - });  
14 -}  
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 34
35 <script> 35 <script>
36 // The value below is injected by flutter build, do not touch. 36 // The value below is injected by flutter build, do not touch.
37 - var serviceWorkerVersion = null; 37 + const serviceWorkerVersion = null;
38 </script> 38 </script>
39 <!-- This script adds the flutter initialization JS code --> 39 <!-- This script adds the flutter initialization JS code -->
40 <script src="flutter.js" defer></script> 40 <script src="flutter.js" defer></script>
@@ -31,4 +31,4 @@ flutter: @@ -31,4 +31,4 @@ flutter:
31 pluginClass: MobileScannerPlugin 31 pluginClass: MobileScannerPlugin
32 web: 32 web:
33 pluginClass: MobileScannerWebPlugin 33 pluginClass: MobileScannerWebPlugin
34 - fileName: mobile_scanner_web_plugin.dart  
  34 + fileName: mobile_scanner_web_plugin.dart