From e41d787055ab1cc168e0b08ec4b14b321f610b97 Mon Sep 17 00:00:00 2001 From: aalhadhoud Date: Wed, 9 Jun 2021 22:22:45 +0300 Subject: [PATCH] null-safety migrated the project to null-safety --- android/local.properties | 4 +- lib/flutter_responsive_screen.dart | 4 +- pubspec.lock | 62 ++++++++++++++++++------------ pubspec.yaml | 2 +- 4 files changed, 43 insertions(+), 29 deletions(-) diff --git a/android/local.properties b/android/local.properties index 1f12d0e..d93c80e 100644 --- a/android/local.properties +++ b/android/local.properties @@ -1,3 +1,3 @@ -sdk.dir=C:\\Users\\Usuario\\AppData\\Local\\Android\\Sdk -flutter.sdk=C:\\flutter +sdk.dir=C:\\Users\\ADMIN\\AppData\\Local\\Android\\sdk +flutter.sdk=C:\\programming\\flutter flutter.versionName=1.0.0 \ No newline at end of file diff --git a/lib/flutter_responsive_screen.dart b/lib/flutter_responsive_screen.dart index 185aa89..6bb0c7e 100644 --- a/lib/flutter_responsive_screen.dart +++ b/lib/flutter_responsive_screen.dart @@ -6,11 +6,11 @@ class Screen{ Screen(this.screenSize); - double wp(percentage) { + double? wp(percentage) { return percentage / 100 * screenSize.width; } - double hp(percentage) { + double? hp(percentage) { return percentage / 100 * screenSize.height; } } diff --git a/pubspec.lock b/pubspec.lock index 224c7bb..ad6d1df 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.6.1" 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,28 +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" - 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 @@ -78,55 +92,55 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.4.1" + version: "1.8.1" 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.0.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.1" + version: "0.3.0" 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.0.0 <3.0.0" + dart: ">=2.12.0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 85360c4..80fe2f6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ author: Misael Riojas Montenegro homepage: https://github.com/misaelriojasm/FlutterResponsiveScreen environment: - sdk: ">=2.0.0-dev.68.0 <3.0.0" + sdk: '>=2.12.0 <3.0.0' dependencies: flutter: