From be97f2e476ea953ec78ea0d63938d6d25bba6142 Mon Sep 17 00:00:00 2001 From: Manan Gandhi Date: Sun, 17 Dec 2023 09:56:48 +0530 Subject: [PATCH] Minor bug fixes --- .flutter-plugins-dependencies | 2 +- flutter_01.log | 110 +++++++++++++++++++++++ lib/main.dart | 16 ++-- lib/presentation/edit_details.dart | 2 +- lib/presentation/profile.dart | 9 ++ lib/presentation/register_user_info.dart | 2 +- 6 files changed, 132 insertions(+), 9 deletions(-) create mode 100644 flutter_01.log diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 6c5ed89..6be0050 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"cloud_firestore","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\cloud_firestore-4.13.6\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_auth-4.15.3\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-2.24.2\\\\","native_build":true,"dependencies":[]},{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_ios-6.2.1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"cloud_firestore","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\cloud_firestore-4.13.6\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_auth-4.15.3\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-2.24.2\\\\","native_build":true,"dependencies":[]},{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_android-6.2.0\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"cloud_firestore","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\cloud_firestore-4.13.6\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_auth-4.15.3\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-2.24.2\\\\","native_build":true,"dependencies":[]},{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_macos-3.1.0\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_linux","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_linux-3.1.1\\\\","native_build":true,"dependencies":[]}],"windows":[{"name":"cloud_firestore","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\cloud_firestore-4.13.6\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_auth-4.15.3\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-2.24.2\\\\","native_build":true,"dependencies":[]},{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_windows","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_windows-3.1.1\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"cloud_firestore_web","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\cloud_firestore_web-3.8.10\\\\","dependencies":["firebase_core_web"]},{"name":"firebase_auth_web","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_auth_web-5.8.12\\\\","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core_web-2.10.0\\\\","dependencies":[]},{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_web-2.2.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["cloud_firestore_web","firebase_core"]},{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"smart_auth","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2023-12-17 01:20:01.130262","version":"3.16.3"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"cloud_firestore","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\cloud_firestore-4.13.6\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_auth-4.15.3\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-2.24.2\\\\","native_build":true,"dependencies":[]},{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_ios","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_ios-6.2.1\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"cloud_firestore","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\cloud_firestore-4.13.6\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_auth-4.15.3\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-2.24.2\\\\","native_build":true,"dependencies":[]},{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_android","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_android-6.2.0\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"cloud_firestore","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\cloud_firestore-4.13.6\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_auth-4.15.3\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-2.24.2\\\\","native_build":true,"dependencies":[]},{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_macos-3.1.0\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_linux","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_linux-3.1.1\\\\","native_build":true,"dependencies":[]}],"windows":[{"name":"cloud_firestore","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\cloud_firestore-4.13.6\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_auth-4.15.3\\\\","native_build":true,"dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core-2.24.2\\\\","native_build":true,"dependencies":[]},{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","native_build":true,"dependencies":[]},{"name":"url_launcher_windows","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_windows-3.1.1\\\\","native_build":true,"dependencies":[]}],"web":[{"name":"cloud_firestore_web","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\cloud_firestore_web-3.8.10\\\\","dependencies":["firebase_core_web"]},{"name":"firebase_auth_web","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_auth_web-5.8.12\\\\","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\firebase_core_web-2.10.0\\\\","dependencies":[]},{"name":"smart_auth","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\smart_auth-1.1.1\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\Users\\\\DELL\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\url_launcher_web-2.2.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["cloud_firestore_web","firebase_core"]},{"name":"cloud_firestore_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_auth","dependencies":["firebase_auth_web","firebase_core"]},{"name":"firebase_auth_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"smart_auth","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2023-12-17 09:53:08.152542","version":"3.16.3"} \ No newline at end of file diff --git a/flutter_01.log b/flutter_01.log new file mode 100644 index 0000000..7490725 --- /dev/null +++ b/flutter_01.log @@ -0,0 +1,110 @@ +Flutter crash report. +Please report a bug at https://github.com/flutter/flutter/issues. + +## command + +flutter --quiet assemble --no-version-check --depfile D:\Coding\flutter_projects\Verbal_Virtusos\build\app\intermediates\flutter\release/flutter_build.d --output D:\Coding\flutter_projects\Verbal_Virtusos\build\app\intermediates\flutter\release -dTargetFile=lib\main.dart -dTargetPlatform=android -dBuildMode=release -dTrackWidgetCreation=true -dTreeShakeIcons=true android_aot_bundle_release_android-arm android_aot_bundle_release_android-arm64 android_aot_bundle_release_android-x64 + +## exception + +FileSystemException: FileSystemException: Failed to decode data using encoding 'utf-8', path = 'D:\Coding\flutter_projects\Verbal_Virtusos\.dart_tool\flutter_build\782abe92f22377666394c26a20899c8b\kernel_snapshot.d' + +``` +#0 _File._tryDecode (dart:io/file_impl.dart:615:7) +#1 _File.readAsStringSync (dart:io/file_impl.dart:624:7) +#2 ForwardingFile.readAsStringSync (package:file/src/forwarding/forwarding_file.dart:99:16) +#3 ErrorHandlingFile.readAsStringSync. (package:flutter_tools/src/base/error_handling_io.dart:218:22) +#4 _runSync (package:flutter_tools/src/base/error_handling_io.dart:590:14) +#5 ErrorHandlingFile.readAsStringSync (package:flutter_tools/src/base/error_handling_io.dart:217:12) +#6 SourceVisitor.visitDepfile (package:flutter_tools/src/build_system/source.dart:55:37) +#7 List.forEach (dart:core-patch/growable_array.dart:416:8) +#8 Target._resolveConfiguration (package:flutter_tools/src/build_system/build_system.dart:251:14) +#9 Target.resolveInputs (package:flutter_tools/src/build_system/build_system.dart:196:12) +#10 Target._toNode (package:flutter_tools/src/build_system/build_system.dart:149:39) +#11 Target._toNode (package:flutter_tools/src/build_system/build_system.dart:156:58) +#12 Target._toNode (package:flutter_tools/src/build_system/build_system.dart:156:58) +#13 Target._toNode (package:flutter_tools/src/build_system/build_system.dart:156:58) +#14 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:609:30) +#15 AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:315:51) +#16 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1662:12) + +#17 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1350:27) + +#18 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) + +#19 CommandRunner.runCommand (package:args/command_runner.dart:212:13) + +#20 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:348:9) + +#21 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) + +#22 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:294:5) + +#23 run.. (package:flutter_tools/runner.dart:112:9) + +#24 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) + +#25 main (package:flutter_tools/executable.dart:90:3) + +``` + +## flutter doctor + +``` +[✓] Flutter (Channel stable, 3.16.3, on Microsoft Windows [Version 10.0.22631.2861], locale en-IN) + • Flutter version 3.16.3 on channel stable at C:\flutter + • Upstream repository https://github.com/flutter/flutter.git + • Framework revision b0366e0a3f (11 days ago), 2023-12-05 19:46:39 -0800 + • Engine revision 54a7145303 + • Dart version 3.2.3 + • DevTools version 2.28.4 + +[✓] Windows Version (Installed version of Windows is version 10 or higher) + +[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) + • Android SDK at C:\Users\DELL\AppData\Local\Android\sdk + • Platform android-34, build-tools 34.0.0 + • ANDROID_SDK_ROOT = C:\Users\DELL\AppData\Local\Android\sdk + • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java + • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314) + • All Android licenses accepted. + +[✓] Chrome - develop for the web + • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe + +[!] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.23) + • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools + • Visual Studio Build Tools 2019 version 16.11.33214.272 + ✗ The current Visual Studio installation is incomplete. + Please use Visual Studio Installer to complete the installation or reinstall Visual Studio. + +[✓] Android Studio (version 2023.1) + • Android Studio at C:\Program Files\Android\Android Studio + • Flutter plugin can be installed from: + 🔨 https://plugins.jetbrains.com/plugin/9212-flutter + • Dart plugin can be installed from: + 🔨 https://plugins.jetbrains.com/plugin/6351-dart + • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314) + +[✓] IntelliJ IDEA Ultimate Edition (version 2021.3) + • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.2 + • Flutter plugin can be installed from: + 🔨 https://plugins.jetbrains.com/plugin/9212-flutter + • Dart plugin can be installed from: + 🔨 https://plugins.jetbrains.com/plugin/6351-dart + +[✓] VS Code (version 1.85.1) + • VS Code at C:\Users\DELL\AppData\Local\Programs\Microsoft VS Code + • Flutter extension version 3.52.0 + +[✓] Connected device (4 available) + • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) + • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.2861] + • Chrome (web) • chrome • web-javascript • Google Chrome 119.0.6045.200 + • Edge (web) • edge • web-javascript • Microsoft Edge 120.0.2210.61 + +[✓] Network resources + • All expected network resources are available. + +! Doctor found issues in 1 category. +``` diff --git a/lib/main.dart b/lib/main.dart index 85db602..48f3840 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -20,9 +20,11 @@ void main() async { // var launchService = LaunchService(); runApp( MaterialApp( - initialRoute: 'main', - theme: ThemeData(fontFamily: 'Jura', useMaterial3: true), + theme: ThemeData( + fontFamily: 'Jura', + useMaterial3: true, + ), debugShowCheckedModeBanner: false, routes: { 'phone': (context) => const MyPhone(), @@ -35,11 +37,13 @@ void main() async { uid: ModalRoute.of(context)!.settings.arguments as String, ), "project_details": (context) => ProjectDetails( - project: ModalRoute.of(context)!.settings.arguments as Map, - ), + project: ModalRoute.of(context)!.settings.arguments + as Map, + ), "edit_details": (context) => EditDetails( - userDetails: ModalRoute.of(context)!.settings.arguments as Map, - ), + userDetails: ModalRoute.of(context)!.settings.arguments + as Map, + ), }, ), ); diff --git a/lib/presentation/edit_details.dart b/lib/presentation/edit_details.dart index 0191920..337f310 100644 --- a/lib/presentation/edit_details.dart +++ b/lib/presentation/edit_details.dart @@ -180,7 +180,7 @@ class _EditDetailsState extends State { .collection("users") .doc(currentUser.uid) .set(user); - Navigator.pushNamed(context, 'home'); + Navigator.pop(context); } }, child: const Text("Submit"), diff --git a/lib/presentation/profile.dart b/lib/presentation/profile.dart index f9a4bbd..deb0ceb 100644 --- a/lib/presentation/profile.dart +++ b/lib/presentation/profile.dart @@ -56,6 +56,15 @@ class _ProfileState extends State { }, icon: const Icon(Icons.edit), ), + if(widget.uid != loggedInUser!.uid) + IconButton( + onPressed: () { + FirebaseAuth.instance.signOut(); + Navigator.pushNamedAndRemoveUntil( + context, 'main', (route) => false); + }, + icon: const Icon(Icons.logout), + ), if (widget.uid != loggedInUser!.uid) IconButton( onPressed: () { diff --git a/lib/presentation/register_user_info.dart b/lib/presentation/register_user_info.dart index e483e24..b32dd43 100644 --- a/lib/presentation/register_user_info.dart +++ b/lib/presentation/register_user_info.dart @@ -165,7 +165,7 @@ class _RegisterUserInfoState extends State { .collection("users") .doc(currentUser.uid) .set(user); - Navigator.pushNamed(context, 'home'); + Navigator.pushReplacementNamed(context, 'home'); } }, child: const Text("Submit"),