diff --git a/android/app/build.gradle b/android/app/build.gradle index 4c9cc7c..374cc4e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion 31 sourceSets { main.java.srcDirs += 'src/main/kotlin' diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 266c2b9..1f1733f 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -2,7 +2,7 @@ package="com.example.envirocar_app_main"> - + diff --git a/android/build.gradle b/android/build.gradle index b4c2aa8..1a1052f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.3.50' + ext.kotlin_version = '1.6.10' repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.0' + classpath 'com.android.tools.build:gradle:4.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -14,18 +14,16 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { project.evaluationDependsOn(':app') } task clean(type: Delete) { delete rootProject.buildDir -} +} \ No newline at end of file diff --git a/lib/screens/loginScreen.dart b/lib/screens/loginScreen.dart index c63cf22..d55ecc5 100644 --- a/lib/screens/loginScreen.dart +++ b/lib/screens/loginScreen.dart @@ -30,6 +30,7 @@ class _LoginScreenState extends State { String _username; String _password; bool _wrongCredentials = false; + bool _isObscure = true; Future _showDialogbox(String message) async { _logger.i('Showing dialog'); @@ -53,7 +54,7 @@ class _LoginScreenState extends State { EdgeInsets.fromLTRB(deviceWidth * 0.05, 0, deviceWidth * 0.05, 0), child: NotificationListener( onNotification: (OverscrollIndicatorNotification overscroll) { - overscroll.disallowGlow(); + overscroll.disallowIndicator(); return; }, child: Form( @@ -95,9 +96,22 @@ class _LoginScreenState extends State { // Password TextFormField( - obscureText: true, + obscureText: _isObscure, decoration: inputDecoration.copyWith( labelText: 'Password', + suffixIcon: IconButton( + icon: Icon( + _isObscure + ? Icons.visibility_off_outlined + : Icons.visibility_outlined, + color: Colors.white, + ), + onPressed: () { + setState(() { + _isObscure = !_isObscure; + }); + }, + ), ), // validator: (value) { // return validator.validatePassword(value); diff --git a/lib/screens/registerScreen.dart b/lib/screens/registerScreen.dart index cedb89e..a907115 100644 --- a/lib/screens/registerScreen.dart +++ b/lib/screens/registerScreen.dart @@ -31,6 +31,7 @@ class _RegisterScreenState extends State { bool _acceptedTerms = false; bool _acceptedPrivacy = false; bool _showError = false; + bool _isObscure = true; Future _showDialogbox(String message) async { _logger.i('Showing dialog'); @@ -58,7 +59,7 @@ class _RegisterScreenState extends State { EdgeInsets.fromLTRB(deviceWidth * 0.05, 0, deviceWidth * 0.05, 0), child: NotificationListener( onNotification: (OverscrollIndicatorNotification overscroll) { - overscroll.disallowGlow(); + overscroll.disallowIndicator(); return; }, child: Form( @@ -113,9 +114,22 @@ class _RegisterScreenState extends State { // Password TextFormField( - obscureText: true, + obscureText: _isObscure, decoration: inputDecoration.copyWith( labelText: 'Password', + suffixIcon: IconButton( + icon: Icon( + _isObscure + ? Icons.visibility_off_outlined + : Icons.visibility_outlined, + color: Colors.white, + ), + onPressed: () { + setState(() { + _isObscure = !_isObscure; + }); + }, + ), ), // validator: (value) { // return validator.validatePassword(value); @@ -131,9 +145,22 @@ class _RegisterScreenState extends State { // Confirm Password TextFormField( - obscureText: true, + obscureText: _isObscure, decoration: inputDecoration.copyWith( labelText: 'Password', + suffixIcon: IconButton( + icon: Icon( + _isObscure + ? Icons.visibility_off_outlined + : Icons.visibility_outlined, + color: Colors.white, + ), + onPressed: () { + setState(() { + _isObscure = !_isObscure; + }); + }, + ), ), validator: (value) { if (_confirmPassword.compareTo(_password) != 0) { diff --git a/pubspec.lock b/pubspec.lock index cf6194d..51e96c6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,21 +7,21 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "30.0.0" + version: "36.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "2.7.0" + version: "3.3.1" archive: dependency: transitive description: name: archive url: "https://pub.dartlang.org" source: hosted - version: "3.1.6" + version: "3.2.2" args: dependency: transitive description: @@ -35,7 +35,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.8.1" + version: "2.8.2" boolean_selector: dependency: transitive description: @@ -49,7 +49,7 @@ packages: name: build url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.2.1" build_config: dependency: transitive description: @@ -70,21 +70,21 @@ packages: name: build_resolvers url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.6" build_runner: dependency: "direct dev" description: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" + version: "2.1.8" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "7.2.2" + version: "7.2.3" built_collection: dependency: transitive description: @@ -98,14 +98,14 @@ packages: name: built_value url: "https://pub.dartlang.org" source: hosted - version: "8.1.3" + version: "8.1.4" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: @@ -120,13 +120,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" - cli_util: - dependency: transitive - description: - name: cli_util - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.5" clock: dependency: transitive description: @@ -175,42 +168,42 @@ packages: name: dart_style url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.2" dbus: dependency: transitive description: name: dbus url: "https://pub.dartlang.org" source: hosted - version: "0.5.6" + version: "0.7.1" device_frame: dependency: transitive description: name: device_frame url: "https://pub.dartlang.org" source: hosted - version: "1.0.0-alpha.2" + version: "1.0.0" device_preview: dependency: "direct main" description: name: device_preview url: "https://pub.dartlang.org" source: hosted - version: "1.0.0-alpha.15" + version: "1.0.0" dio: dependency: "direct main" description: name: dio url: "https://pub.dartlang.org" source: hosted - version: "4.0.3" + version: "4.0.4" dots_indicator: dependency: transitive description: name: dots_indicator url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.0" equatable: dependency: transitive description: @@ -252,7 +245,7 @@ packages: name: fl_chart url: "https://pub.dartlang.org" source: hosted - version: "0.40.2" + version: "0.40.6" flutter: dependency: "direct main" description: flutter @@ -271,14 +264,14 @@ packages: name: flutter_local_notifications url: "https://pub.dartlang.org" source: hosted - version: "9.1.2" + version: "9.4.0" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.2" flutter_local_notifications_platform_interface: dependency: transitive description: @@ -304,7 +297,7 @@ packages: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.5" flutter_polyline_points: dependency: "direct main" description: @@ -377,7 +370,7 @@ packages: name: freezed_annotation url: "https://pub.dartlang.org" source: hosted - version: "0.15.0" + version: "1.1.0" frontend_server_client: dependency: transitive description: @@ -433,21 +426,21 @@ packages: name: google_fonts url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.3.1" google_maps_flutter: dependency: "direct main" description: name: google_maps_flutter url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.2" google_maps_flutter_platform_interface: dependency: transitive description: name: google_maps_flutter_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" + version: "2.1.5" graphs: dependency: transitive description: @@ -461,7 +454,7 @@ packages: name: hive url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.6" hive_flutter: dependency: "direct main" description: @@ -475,7 +468,7 @@ packages: name: hive_generator url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.1.2" http: dependency: "direct main" description: @@ -489,7 +482,7 @@ packages: name: http_multi_server url: "https://pub.dartlang.org" source: hosted - version: "3.0.1" + version: "3.2.0" http_parser: dependency: transitive description: @@ -503,7 +496,7 @@ packages: name: image url: "https://pub.dartlang.org" source: hosted - version: "3.0.8" + version: "3.1.3" intl: dependency: transitive description: @@ -538,7 +531,7 @@ packages: name: json_annotation url: "https://pub.dartlang.org" source: hosted - version: "4.3.0" + version: "4.4.0" latlong2: dependency: "direct main" description: @@ -552,7 +545,7 @@ packages: name: lint url: "https://pub.dartlang.org" source: hosted - version: "1.7.2" + version: "1.8.2" lists: dependency: transitive description: @@ -601,7 +594,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.3" meta: dependency: transitive description: @@ -629,7 +629,7 @@ packages: name: mockito url: "https://pub.dartlang.org" source: hosted - version: "5.0.16" + version: "5.1.0" nested: dependency: transitive description: @@ -678,56 +678,49 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.0.9" path_provider_android: dependency: transitive description: name: path_provider_android url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.0.12" path_provider_ios: dependency: transitive description: name: path_provider_ios url: "https://pub.dartlang.org" source: hosted - version: "2.0.7" + version: "2.0.8" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.2" + version: "2.1.5" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.3" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.11.1" + version: "2.0.5" petitparser: dependency: transitive description: @@ -741,14 +734,14 @@ packages: name: platform url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.1.2" pool: dependency: transitive description: @@ -783,28 +776,28 @@ packages: name: protobuf url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.1" provider: dependency: "direct main" description: name: provider url: "https://pub.dartlang.org" source: hosted - version: "6.0.1" + version: "6.0.2" pub_semver: dependency: transitive description: name: pub_semver url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" pubspec_parse: dependency: transitive description: name: pubspec_parse url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" quiver: dependency: transitive description: @@ -825,21 +818,35 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.0.13" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + shared_preferences_ios: + dependency: transitive + description: + name: shared_preferences_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.1.0" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.3" shared_preferences_platform_interface: dependency: transitive description: @@ -853,14 +860,14 @@ packages: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.3" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.1.0" shelf: dependency: transitive description: @@ -881,7 +888,7 @@ packages: name: showcaseview url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.1.5" sky_engine: dependency: transitive description: flutter @@ -893,14 +900,14 @@ packages: name: source_gen url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "1.2.1" source_helper: dependency: transitive description: name: source_helper url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.3.1" source_span: dependency: transitive description: @@ -942,21 +949,21 @@ packages: name: syncfusion_flutter_core url: "https://pub.dartlang.org" source: hosted - version: "19.3.54" + version: "19.4.56" syncfusion_flutter_xlsio: dependency: "direct main" description: name: syncfusion_flutter_xlsio url: "https://pub.dartlang.org" source: hosted - version: "19.3.54-beta" + version: "19.4.56-beta" syncfusion_officecore: dependency: transitive description: name: syncfusion_officecore url: "https://pub.dartlang.org" source: hosted - version: "19.3.54-beta" + version: "19.4.56-beta" system_shortcuts: dependency: "direct main" description: @@ -977,7 +984,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.2" + version: "0.4.8" timezone: dependency: transitive description: @@ -1033,56 +1040,70 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.0.13" + version: "6.0.20" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.15" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.15" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "3.0.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "3.0.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.5" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.9" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "3.0.0" uuid: dependency: "direct main" description: name: uuid url: "https://pub.dartlang.org" source: hosted - version: "3.0.5" + version: "3.0.6" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" watcher: dependency: transitive description: @@ -1103,7 +1124,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.4.1" wkt_parser: dependency: transitive description: @@ -1117,7 +1138,7 @@ packages: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "0.2.0+1" xml: dependency: transitive description: @@ -1133,5 +1154,5 @@ packages: source: hosted version: "3.1.0" sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=2.5.0" + dart: ">=2.15.0 <3.0.0" + flutter: ">=2.10.0"