From 0c9bfef33fccb9e7994348ba0417e75a9335c9b3 Mon Sep 17 00:00:00 2001 From: Fareesh Vijayarangam Date: Fri, 5 Mar 2021 00:29:50 +0530 Subject: [PATCH 1/3] Null-safety --- .../ios/Flutter/flutter_export_environment.sh | 13 ++ example/pubspec.lock | 214 +++++++++--------- pubspec.lock | 69 +++--- pubspec.yaml | 37 +-- test/modal_progress_hud_test.dart | 2 +- 5 files changed, 160 insertions(+), 175 deletions(-) create mode 100755 example/ios/Flutter/flutter_export_environment.sh diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh new file mode 100755 index 0000000..d97db03 --- /dev/null +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=/home/fareesh/src/flutter" +export "FLUTTER_APPLICATION_PATH=/home/fareesh/src/modal_progress_hud/example" +export "FLUTTER_TARGET=lib/main.dart" +export "FLUTTER_BUILD_DIR=build" +export "SYMROOT=${SOURCE_ROOT}/../build/ios" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=false" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=.packages" diff --git a/example/pubspec.lock b/example/pubspec.lock index 8d79b27..5681ccd 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,48 +1,83 @@ # Generated by pub -# See https://www.dartlang.org/tools/pub/glossary#lockfile +# See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "14.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "0.33.3+2" + version: "0.41.2" + archive: + dependency: transitive + description: + name: archive + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.13" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "1.5.1" + version: "1.6.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.2.0" + cli_util: + dependency: transitive + description: + name: cli_util + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.0" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" + version: "1.15.0" convert: dependency: transitive description: @@ -50,20 +85,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.1" - crypto: + coverage: dependency: transitive description: - name: crypto + name: coverage url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" - csslib: + version: "0.15.2" + crypto: dependency: transitive description: - name: csslib + name: crypto url: "https://pub.dartlang.org" source: hosted - version: "0.14.6" + version: "2.1.5" cupertino_icons: dependency: "direct main" description: @@ -71,13 +106,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.2" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "5.0.7" + version: "6.0.0" flutter: dependency: "direct main" description: flutter @@ -93,13 +135,6 @@ packages: description: flutter source: sdk version: "0.0.0" - front_end: - dependency: transitive - description: - name: front_end - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.6+5" fuchsia_remote_debug_protocol: dependency: transitive description: flutter @@ -112,13 +147,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.7" - html: - dependency: transitive - description: - name: html - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.3+3" http: dependency: transitive description: @@ -140,13 +168,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.3" - intl: - dependency: transitive - description: - name: intl - url: "https://pub.dartlang.org" - source: hosted - version: "0.15.7" io: dependency: transitive description: @@ -160,42 +181,28 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.1+1" - json_rpc_2: - dependency: transitive - description: - name: json_rpc_2 - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.9" - kernel: - dependency: transitive - description: - name: kernel - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.6+5" + version: "0.6.3" logging: dependency: transitive description: name: logging url: "https://pub.dartlang.org" source: hosted - version: "0.11.3+2" + version: "1.0.0" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.3+1" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0" mime: dependency: transitive description: @@ -209,14 +216,7 @@ packages: path: ".." relative: true source: path - version: "0.1.2" - multi_server_socket: - dependency: transitive - description: - name: multi_server_socket - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" + version: "0.1.3" node_preamble: dependency: transitive description: @@ -230,7 +230,7 @@ packages: name: package_config url: "https://pub.dartlang.org" source: hosted - version: "1.0.5" + version: "1.9.3" package_resolver: dependency: transitive description: @@ -244,42 +244,35 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.8.0" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.4.0" + version: "1.11.0" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" - plugin: - dependency: transitive - description: - name: plugin - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+3" + version: "3.0.0" pool: dependency: transitive description: name: pool url: "https://pub.dartlang.org" source: hosted - version: "1.3.6" + version: "1.5.0" process: dependency: transitive description: name: process url: "https://pub.dartlang.org" source: hosted - version: "3.0.9" + version: "4.0.0" pub_semver: dependency: transitive description: @@ -287,20 +280,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.4.2" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" shelf: dependency: transitive description: name: shelf url: "https://pub.dartlang.org" source: hosted - version: "0.7.3+3" + version: "0.7.9" shelf_packages_handler: dependency: transitive description: @@ -321,7 +307,7 @@ packages: name: shelf_web_socket url: "https://pub.dartlang.org" source: hosted - version: "0.2.2+4" + version: "0.2.4+1" sky_engine: dependency: transitive description: flutter @@ -333,98 +319,98 @@ packages: name: source_map_stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.1.5" + version: "2.1.0" source_maps: dependency: transitive description: name: source_maps url: "https://pub.dartlang.org" source: hosted - version: "0.10.8" + version: "0.10.10" source_span: dependency: transitive description: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.4" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "1.6.8" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.1.0" + sync_http: + dependency: transitive + description: + name: sync_http + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" test: dependency: "direct dev" description: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.5.3" + version: "1.16.5" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.2" + version: "0.2.19" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.2.1+1" + version: "0.3.15" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" - utf: - dependency: transitive - description: - name: utf - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.0+5" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" - vm_service_client: + version: "2.1.0" + vm_service: dependency: transitive description: - name: vm_service_client + name: vm_service url: "https://pub.dartlang.org" source: hosted - version: "0.2.6" + version: "5.5.0" watcher: dependency: transitive description: @@ -438,7 +424,21 @@ packages: name: web_socket_channel url: "https://pub.dartlang.org" source: hosted - version: "1.0.9" + version: "1.2.0" + webdriver: + dependency: transitive + description: + name: webdriver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" yaml: dependency: transitive description: @@ -447,4 +447,4 @@ packages: source: hosted version: "2.1.15" sdks: - dart: ">=2.1.0 <3.0.0" + dart: ">=2.12.0-0.0 <3.0.0" diff --git a/pubspec.lock b/pubspec.lock index ea890ff..19b13d0 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,5 +1,5 @@ # Generated by pub -# See https://www.dartlang.org/tools/pub/glossary#lockfile +# See https://dart.dev/tools/pub/glossary#lockfile packages: async: dependency: transitive @@ -7,28 +7,49 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.5.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.1.2" + version: "1.2.0" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.14.11" + version: "1.15.0" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" flutter: dependency: "direct main" description: flutter @@ -45,35 +66,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.3+1" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.4.0" - quiver: - dependency: transitive - description: - name: quiver - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" + version: "1.8.0" sky_engine: dependency: transitive description: flutter @@ -85,55 +92,55 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.4" + version: "1.8.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.9.3" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "1.6.8" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.1.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.2" + version: "0.2.19" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.1.0" sdks: - dart: ">=2.1.0 <3.0.0" + dart: ">=2.12.0-0.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index e74b5b2..9d2a876 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ author: Maurice McCabe homepage: https://github.com/mmcc007/modal_progress_hud environment: - sdk: '>=1.20.1 <3.0.0' + sdk: '>=2.12.0-0 <3.0.0' dependencies: flutter: @@ -15,39 +15,4 @@ dev_dependencies: flutter_test: sdk: flutter -# For information on the generic Dart part of this file, see the -# following page: https://www.dartlang.org/tools/pub/pubspec - -# The following section is specific to Flutter. flutter: - - # To add assets to your package, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # - # For details regarding assets in packages, see - # https://flutter.io/assets-and-images/#from-packages - # - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.io/assets-and-images/#resolution-aware. - - # To add custom fonts to your package, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts in packages, see - # https://flutter.io/custom-fonts/#from-packages diff --git a/test/modal_progress_hud_test.dart b/test/modal_progress_hud_test.dart index 4e21288..083bd8a 100644 --- a/test/modal_progress_hud_test.dart +++ b/test/modal_progress_hud_test.dart @@ -5,7 +5,7 @@ import 'package:modal_progress_hud/modal_progress_hud.dart'; void main() { group('Modal Progress HUD', () { - Widget sut(bool inAsyncCall, Offset offset) { + Widget sut(bool inAsyncCall, Offset? offset) { return MaterialApp( home: new ModalProgressHUD( inAsyncCall: inAsyncCall, From cf04ec93b195657d2ae83ff5589d79c9c2bac37d Mon Sep 17 00:00:00 2001 From: Fareesh Vijayarangam Date: Fri, 5 Mar 2021 00:31:19 +0530 Subject: [PATCH 2/3] Null-safety --- lib/modal_progress_hud.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/modal_progress_hud.dart b/lib/modal_progress_hud.dart index da9186d..99929f0 100644 --- a/lib/modal_progress_hud.dart +++ b/lib/modal_progress_hud.dart @@ -27,20 +27,20 @@ class ModalProgressHUD extends StatelessWidget { final double opacity; final Color color; final Widget progressIndicator; - final Offset offset; + final Offset? offset; final bool dismissible; final Widget child; ModalProgressHUD({ - Key key, - @required this.inAsyncCall, + Key? key, + required this.inAsyncCall, this.opacity = 0.3, this.color = Colors.grey, this.progressIndicator = const CircularProgressIndicator(), this.offset, this.dismissible = false, - @required this.child, - }) : assert(child != null), + required this.child, + }) : assert(child != null), assert(inAsyncCall != null), super(key: key); @@ -54,8 +54,8 @@ class ModalProgressHUD extends StatelessWidget { else { layOutProgressIndicator = Positioned( child: progressIndicator, - left: offset.dx, - top: offset.dy, + left: offset!.dx, + top: offset!.dy, ); } From 18a312b357f2153aad5ac04b4846d15a78c60833 Mon Sep 17 00:00:00 2001 From: Fareesh Vijayarangam Date: Fri, 5 Mar 2021 00:32:21 +0530 Subject: [PATCH 3/3] Delete flutter_export_environment.sh --- example/ios/Flutter/flutter_export_environment.sh | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100755 example/ios/Flutter/flutter_export_environment.sh diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh deleted file mode 100755 index d97db03..0000000 --- a/example/ios/Flutter/flutter_export_environment.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/home/fareesh/src/flutter" -export "FLUTTER_APPLICATION_PATH=/home/fareesh/src/modal_progress_hud/example" -export "FLUTTER_TARGET=lib/main.dart" -export "FLUTTER_BUILD_DIR=build" -export "SYMROOT=${SOURCE_ROOT}/../build/ios" -export "FLUTTER_BUILD_NAME=1.0.0" -export "FLUTTER_BUILD_NUMBER=1" -export "DART_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=false" -export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=.packages"