diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 106fc64..bd5c090 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":"firebase_auth","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-1.4.1\\\\","dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-1.17.1\\\\","dependencies":[]},{"name":"flutter_native_splash","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_native_splash-2.1.6\\\\","dependencies":[]},{"name":"geocoding","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geocoding-2.0.4\\\\","dependencies":[]},{"name":"geolocator_apple","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator_apple-2.1.4\\\\","dependencies":[]},{"name":"google_maps_flutter","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_maps_flutter-2.1.6\\\\","dependencies":[]},{"name":"google_sign_in_ios","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_sign_in_ios-5.3.1\\\\","dependencies":[]},{"name":"location","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location-4.4.0\\\\","dependencies":[]},{"name":"package_info_plus","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus-1.4.2\\\\","dependencies":[]},{"name":"path_provider_ios","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_ios-2.0.9\\\\","dependencies":[]},{"name":"share_plus","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus-4.0.4\\\\","dependencies":[]},{"name":"url_launcher_ios","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_ios-6.0.17\\\\","dependencies":[]},{"name":"webview_flutter_wkwebview","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\webview_flutter_wkwebview-2.7.5\\\\","dependencies":[]}],"android":[{"name":"firebase_auth","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-1.4.1\\\\","dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-1.17.1\\\\","dependencies":[]},{"name":"flutter_native_splash","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_native_splash-2.1.6\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.6\\\\","dependencies":[]},{"name":"geocoding","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geocoding-2.0.4\\\\","dependencies":[]},{"name":"geolocator_android","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator_android-3.1.8\\\\","dependencies":[]},{"name":"google_api_headers","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_api_headers-1.3.0\\\\","dependencies":["package_info_plus"]},{"name":"google_maps_flutter","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_maps_flutter-2.1.6\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"google_sign_in_android","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_sign_in_android-5.2.8\\\\","dependencies":[]},{"name":"location","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location-4.4.0\\\\","dependencies":[]},{"name":"package_info_plus","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus-1.4.2\\\\","dependencies":[]},{"name":"path_provider_android","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_android-2.0.14\\\\","dependencies":[]},{"name":"share_plus","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus-4.0.4\\\\","dependencies":[]},{"name":"url_launcher_android","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_android-6.0.17\\\\","dependencies":[]},{"name":"webview_flutter_android","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\webview_flutter_android-2.8.9\\\\","dependencies":[]}],"macos":[{"name":"firebase_auth","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-1.4.1\\\\","dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-1.17.1\\\\","dependencies":[]},{"name":"geolocator_apple","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator_apple-2.1.4\\\\","dependencies":[]},{"name":"location","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location-4.4.0\\\\","dependencies":[]},{"name":"package_info_plus_macos","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus_macos-1.3.0\\\\","dependencies":[]},{"name":"path_provider_macos","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.6\\\\","dependencies":[]},{"name":"share_plus_macos","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus_macos-3.0.0\\\\","dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_macos-3.0.1\\\\","dependencies":[]}],"linux":[{"name":"package_info_plus_linux","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus_linux-1.0.5\\\\","dependencies":[]},{"name":"path_provider_linux","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.1.6\\\\","dependencies":[]},{"name":"share_plus_linux","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus_linux-3.0.0\\\\","dependencies":[]},{"name":"url_launcher_linux","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_linux-3.0.1\\\\","dependencies":[]}],"windows":[{"name":"geolocator_windows","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator_windows-0.1.1\\\\","dependencies":[]},{"name":"package_info_plus_windows","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus_windows-1.0.5\\\\","dependencies":[]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.6\\\\","dependencies":[]},{"name":"share_plus_windows","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus_windows-3.0.0\\\\","dependencies":[]},{"name":"url_launcher_windows","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_windows-3.0.1\\\\","dependencies":[]}],"web":[{"name":"firebase_auth_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth_web-1.3.1\\\\","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core_web-1.6.4\\\\","dependencies":[]},{"name":"flutter_native_splash","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_native_splash-2.1.6\\\\","dependencies":[]},{"name":"geolocator_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator_web-2.1.5\\\\","dependencies":[]},{"name":"google_sign_in_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_sign_in_web-0.10.1+2\\\\","dependencies":[]},{"name":"location_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location_web-3.1.1\\\\","dependencies":[]},{"name":"package_info_plus_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus_web-1.0.5\\\\","dependencies":[]},{"name":"share_plus_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus_web-3.0.0\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_web-2.0.11\\\\","dependencies":[]}]},"dependencyGraph":[{"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":"flutter_native_splash","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"geocoding","dependencies":[]},{"name":"geolocator","dependencies":["geolocator_android","geolocator_apple","geolocator_web","geolocator_windows"]},{"name":"geolocator_android","dependencies":[]},{"name":"geolocator_apple","dependencies":[]},{"name":"geolocator_web","dependencies":[]},{"name":"geolocator_windows","dependencies":[]},{"name":"google_api_headers","dependencies":["package_info_plus"]},{"name":"google_maps_flutter","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"location","dependencies":["location_web"]},{"name":"location_web","dependencies":[]},{"name":"package_info_plus","dependencies":["package_info_plus_linux","package_info_plus_macos","package_info_plus_windows","package_info_plus_web"]},{"name":"package_info_plus_linux","dependencies":[]},{"name":"package_info_plus_macos","dependencies":[]},{"name":"package_info_plus_web","dependencies":[]},{"name":"package_info_plus_windows","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"share_plus","dependencies":["share_plus_linux","share_plus_macos","share_plus_windows","share_plus_web"]},{"name":"share_plus_linux","dependencies":["url_launcher"]},{"name":"share_plus_macos","dependencies":[]},{"name":"share_plus_web","dependencies":["url_launcher"]},{"name":"share_plus_windows","dependencies":["url_launcher"]},{"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":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2022-05-30 16:24:37.823098","version":"2.10.4"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"firebase_auth","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-1.4.1\\\\","dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-1.17.1\\\\","dependencies":[]},{"name":"flutter_native_splash","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_native_splash-2.1.6\\\\","dependencies":[]},{"name":"geocoding","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geocoding-2.0.4\\\\","dependencies":[]},{"name":"geolocator_apple","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator_apple-2.1.4\\\\","dependencies":[]},{"name":"google_maps_flutter","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_maps_flutter-2.1.6\\\\","dependencies":[]},{"name":"google_sign_in_ios","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_sign_in_ios-5.3.1\\\\","dependencies":[]},{"name":"location","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location-4.4.0\\\\","dependencies":[]},{"name":"package_info_plus","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus-1.4.2\\\\","dependencies":[]},{"name":"path_provider_ios","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_ios-2.0.9\\\\","dependencies":[]},{"name":"share_plus","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus-4.0.4\\\\","dependencies":[]},{"name":"url_launcher_ios","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_ios-6.0.17\\\\","dependencies":[]},{"name":"webview_flutter_wkwebview","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\webview_flutter_wkwebview-2.7.5\\\\","dependencies":[]}],"android":[{"name":"firebase_auth","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-1.4.1\\\\","dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-1.17.1\\\\","dependencies":[]},{"name":"flutter_native_splash","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_native_splash-2.1.6\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.6\\\\","dependencies":[]},{"name":"geocoding","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geocoding-2.0.4\\\\","dependencies":[]},{"name":"geolocator_android","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator_android-3.1.8\\\\","dependencies":[]},{"name":"google_api_headers","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_api_headers-1.3.0\\\\","dependencies":["package_info_plus"]},{"name":"google_maps_flutter","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_maps_flutter-2.1.6\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"google_sign_in_android","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_sign_in_android-5.2.8\\\\","dependencies":[]},{"name":"location","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location-4.4.0\\\\","dependencies":[]},{"name":"package_info_plus","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus-1.4.2\\\\","dependencies":[]},{"name":"path_provider_android","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_android-2.0.14\\\\","dependencies":[]},{"name":"share_plus","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus-4.0.4\\\\","dependencies":[]},{"name":"url_launcher_android","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_android-6.0.17\\\\","dependencies":[]},{"name":"webview_flutter_android","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\webview_flutter_android-2.8.9\\\\","dependencies":[]}],"macos":[{"name":"firebase_auth","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth-1.4.1\\\\","dependencies":["firebase_core"]},{"name":"firebase_core","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core-1.17.1\\\\","dependencies":[]},{"name":"geolocator_apple","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator_apple-2.1.4\\\\","dependencies":[]},{"name":"location","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location-4.4.0\\\\","dependencies":[]},{"name":"package_info_plus_macos","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus_macos-1.3.0\\\\","dependencies":[]},{"name":"path_provider_macos","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.6\\\\","dependencies":[]},{"name":"share_plus_macos","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus_macos-3.0.0\\\\","dependencies":[]},{"name":"url_launcher_macos","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_macos-3.0.1\\\\","dependencies":[]}],"linux":[{"name":"package_info_plus_linux","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus_linux-1.0.5\\\\","dependencies":[]},{"name":"path_provider_linux","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.1.6\\\\","dependencies":[]},{"name":"share_plus_linux","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus_linux-3.0.0\\\\","dependencies":[]},{"name":"url_launcher_linux","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_linux-3.0.1\\\\","dependencies":[]}],"windows":[{"name":"geolocator_windows","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator_windows-0.1.1\\\\","dependencies":[]},{"name":"package_info_plus_windows","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus_windows-1.0.5\\\\","dependencies":[]},{"name":"path_provider_windows","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.6\\\\","dependencies":[]},{"name":"share_plus_windows","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus_windows-3.0.0\\\\","dependencies":[]},{"name":"url_launcher_windows","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_windows-3.0.1\\\\","dependencies":[]}],"web":[{"name":"firebase_auth_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_auth_web-1.3.1\\\\","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\firebase_core_web-1.6.4\\\\","dependencies":[]},{"name":"flutter_native_splash","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_native_splash-2.1.6\\\\","dependencies":[]},{"name":"geolocator_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\geolocator_web-2.1.5\\\\","dependencies":[]},{"name":"google_sign_in_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\google_sign_in_web-0.10.1+2\\\\","dependencies":[]},{"name":"location_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\location_web-3.1.1\\\\","dependencies":[]},{"name":"package_info_plus_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\package_info_plus_web-1.0.5\\\\","dependencies":[]},{"name":"share_plus_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\share_plus_web-3.0.0\\\\","dependencies":[]},{"name":"url_launcher_web","path":"C:\\\\Users\\\\morte\\\\OneDrive\\\\Documents\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\url_launcher_web-2.0.11\\\\","dependencies":[]}]},"dependencyGraph":[{"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":"flutter_native_splash","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"geocoding","dependencies":[]},{"name":"geolocator","dependencies":["geolocator_android","geolocator_apple","geolocator_web","geolocator_windows"]},{"name":"geolocator_android","dependencies":[]},{"name":"geolocator_apple","dependencies":[]},{"name":"geolocator_web","dependencies":[]},{"name":"geolocator_windows","dependencies":[]},{"name":"google_api_headers","dependencies":["package_info_plus"]},{"name":"google_maps_flutter","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"google_sign_in","dependencies":["google_sign_in_android","google_sign_in_ios","google_sign_in_web"]},{"name":"google_sign_in_android","dependencies":[]},{"name":"google_sign_in_ios","dependencies":[]},{"name":"google_sign_in_web","dependencies":[]},{"name":"location","dependencies":["location_web"]},{"name":"location_web","dependencies":[]},{"name":"package_info_plus","dependencies":["package_info_plus_linux","package_info_plus_macos","package_info_plus_windows","package_info_plus_web"]},{"name":"package_info_plus_linux","dependencies":[]},{"name":"package_info_plus_macos","dependencies":[]},{"name":"package_info_plus_web","dependencies":[]},{"name":"package_info_plus_windows","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"share_plus","dependencies":["share_plus_linux","share_plus_macos","share_plus_windows","share_plus_web"]},{"name":"share_plus_linux","dependencies":["url_launcher"]},{"name":"share_plus_macos","dependencies":[]},{"name":"share_plus_web","dependencies":["url_launcher"]},{"name":"share_plus_windows","dependencies":["url_launcher"]},{"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":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2022-06-01 22:30:41.921624","version":"2.10.4"} \ No newline at end of file diff --git a/lib/bottom_nav_page.dart b/lib/bottom_nav_page.dart index a8632c4..dec6682 100644 --- a/lib/bottom_nav_page.dart +++ b/lib/bottom_nav_page.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; -import 'map.dart'; +import 'package:flutter_applicationdemo/map.dart'; import 'favorite_page.dart'; -import 'settings_page.dart'; import 'globals.dart' as globals; import 'list_view_page.dart'; diff --git a/lib/favorite_page.dart b/lib/favorite_page.dart index 4bda107..01f85a7 100644 --- a/lib/favorite_page.dart +++ b/lib/favorite_page.dart @@ -87,11 +87,12 @@ class _FavoritePageState extends State { primary: globals.BUTTONCOLOR, elevation: 100, ), - onPressed: () { - Navigator.push( + onPressed: () async{ + await Navigator.push( context, //SignInPage() MaterialPageRoute(builder: (context) =>SignInPage()), //Replace Container() with call to Map-page. ); + (context as Element).reassemble(); }, child: Text('Sign in', style: TextStyle( diff --git a/lib/feedback_page.dart b/lib/feedback_page.dart index 973198b..f01976c 100644 --- a/lib/feedback_page.dart +++ b/lib/feedback_page.dart @@ -76,25 +76,6 @@ class FormForFeedbackState extends State { resizeToAvoidBottomInset: true, //för att undvika RenderFlex overflow när man får upp skrivbordet appBar: AppBar( backgroundColor: buttonColor, - title: Row( - children: [ - - FlatButton( - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => BottomNavPage()), - ); - }, - - child: Text("Close", - style: TextStyle( - fontSize: 25, - color: appBarColor), - ), - ), - ], - ), ), body: SingleChildScrollView( diff --git a/lib/globals.dart b/lib/globals.dart index 8e20f9c..f40d428 100644 --- a/lib/globals.dart +++ b/lib/globals.dart @@ -1,15 +1,10 @@ import 'package:flutter_applicationdemo/weather_data.dart'; - import 'venue.dart'; import 'package:flutter_applicationdemo/login/user.dart'; import '../login/user.dart'; import 'dart:ui'; - import 'package:flutter/material.dart'; -import 'home_page.dart'; -import 'venue.dart'; -import 'main.dart'; User LOGGED_IN_USER = User(0, "", ""); Color BACKGROUNDCOLOR = const Color.fromARGB(255, 190, 146, 160); diff --git a/lib/home_page.dart b/lib/home_page.dart deleted file mode 100644 index 8744da1..0000000 --- a/lib/home_page.dart +++ /dev/null @@ -1,150 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'bottom_nav_page.dart'; -import 'login/create_account_page.dart'; -import 'login/sign_in_page.dart'; -import 'package:flutter_applicationdemo/login/user.dart' as User; -import 'globals.dart' as globals; - - -class HomePage extends StatefulWidget { - const HomePage({Key? key}) : super(key: key); - - @override - State createState() => _HomePageState(); -} - -class _HomePageState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - backgroundColor: globals.PINKBACKGROUND, - body: SafeArea( - child: Center( - child: Column(children: [ - Container( - padding: EdgeInsets.fromLTRB(80, 80, 80, 0), - child: Text( - 'Sun Chasers', - style: GoogleFonts.roboto( - fontSize: 52, - color: globals.TEXTCOLOR, - ), - textAlign: TextAlign.center, - ), - ), - - - const SizedBox(height: 10), - Container( - margin: EdgeInsets.fromLTRB(80, 80, 80, 80), - child: ElevatedButton( - style: ElevatedButton.styleFrom( - fixedSize: const Size(200, 200), - primary: globals.BUTTONCOLOR, - elevation: globals.elevation, - shape: const CircleBorder(), - ), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => BottomNavPage()), //Replace Container() with call to account-page. - ); - }, - child: Text( - (globals.LOGGED_IN_USER.userID == 0 ? '\nFIND SPOT BY LOCATION \n \n as guest' : 'FIND SPOT BY LOCATION'), - - textAlign: TextAlign.center, - style: TextStyle( - fontSize: 18, - color: Colors.white, - ), - ), - ), - ), - - globals.LOGGED_IN_USER.userID == 0 ? - buildLoginAndCreateUserButton() : buildLogOutButton() - ]), - ), - ), - ); - } - - Container buildLoginAndCreateUserButton() { - return Container( - child: Column( - children: [ - ElevatedButton( - style: ElevatedButton.styleFrom( - fixedSize: const Size(200, 50), - primary: globals.BUTTONCOLOR, - elevation: globals.elevation, - ), - onPressed: () { - Navigator.push( - context, //SignInPage() - MaterialPageRoute(builder: (context) =>SignInPage()), //Replace Container() with call to Map-page. - ); - }, - child: Text('Sign in', - style: TextStyle( - fontSize: 18, - color: Colors.white, - ) - ), - ), - Padding(padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5)), - ElevatedButton( - style: ElevatedButton.styleFrom( - fixedSize: const Size(200, 50), - primary: globals.BUTTONCOLOR, - elevation: globals.elevation, - ), - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => CreateAccountPage()), //Replace Container() with call to Map-page. - ); - }, - child: const Text('Create account', - style: TextStyle( - fontSize: 18, - color: Colors.white, - ) - ), - ) - ] - ), - ); - } - - ElevatedButton buildLogOutButton() { - return ElevatedButton( - style: ElevatedButton.styleFrom( - fixedSize: const Size(200, 50), - primary: globals.BUTTONCOLOR, - elevation: globals.elevation, - ), - onPressed: () { - globals.LOGGED_IN_USER = User.User(0, "", ""); - Navigator.push( - context, - MaterialPageRoute(builder: (context) => HomePage()), //Replace Container() with call to Map-page. - ); - }, - child: Text('Log out', - style: TextStyle( - fontSize: 18, - color: Colors.white, - shadows: [ - Shadow( - offset: Offset(2, 2), - blurRadius: 10.0, - color: globals.SHADOWCOLOR, - ), - ]) - ), - ); - } -} diff --git a/lib/list_view_page.dart b/lib/list_view_page.dart index d61e715..ebc4985 100644 --- a/lib/list_view_page.dart +++ b/lib/list_view_page.dart @@ -1,8 +1,5 @@ import 'package:flutter/material.dart'; -import 'package:geolocator/geolocator.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:google_maps_flutter/google_maps_flutter.dart'; - import 'globals.dart' as globals; import 'package:flutter_applicationdemo/venue.dart'; import 'venue_page.dart'; diff --git a/lib/login/create_account_page.dart b/lib/login/create_account_page.dart index acd0d84..bc3b725 100644 --- a/lib/login/create_account_page.dart +++ b/lib/login/create_account_page.dart @@ -1,12 +1,9 @@ // ignore_for_file: prefer_const_constructors import 'package:flutter/material.dart'; -import 'package:flutter_applicationdemo/bottom_nav_page.dart'; import 'package:flutter_applicationdemo/login/encrypt_data.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:flutter_applicationdemo/mysql.dart'; - -import 'package:flutter_applicationdemo/home_page.dart'; import '../globals.dart' as globals; import '../reusables/input_field.dart'; import 'user.dart'; @@ -29,15 +26,7 @@ class _CreateAccountPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - backgroundColor: globals.PINKBACKGROUND, - leading: ReturnButton( - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => BottomNavPage()), - ); - }, - ), + backgroundColor: const Color.fromARGB(204, 172, 123, 132), ), backgroundColor: pinkBackgroundColor, @@ -115,9 +104,8 @@ class _CreateAccountPageState extends State { if (userInput.isValid) { await createUserInSQL(emailController.text, userNameController.text, passwordController.text); - Navigator.push( + Navigator.pop( context, - MaterialPageRoute(builder: (context) => BottomNavPage()), ); } else { createUserError(userInput.errorMessage); @@ -140,7 +128,6 @@ class _CreateAccountPageState extends State { String sql = "INSERT INTO maen0574.user (id, email, password, username) VALUES (null, '$email', '$password', '$username');"; await conn.query(sql); - sql = "Select id, email, username from maen0574.user where email = '$email'"; await conn.query(sql).then((results) { diff --git a/lib/login/google_sign_in_provider.dart b/lib/login/google_sign_in_provider.dart index 698188b..553cd7e 100644 --- a/lib/login/google_sign_in_provider.dart +++ b/lib/login/google_sign_in_provider.dart @@ -1,4 +1,3 @@ -import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:google_sign_in/google_sign_in.dart'; diff --git a/lib/login/sign_in_page.dart b/lib/login/sign_in_page.dart index 220868a..e270e84 100644 --- a/lib/login/sign_in_page.dart +++ b/lib/login/sign_in_page.dart @@ -1,11 +1,7 @@ -import 'dart:io'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_applicationdemo/login/encrypt_data.dart'; import 'package:flutter_applicationdemo/bottom_nav_page.dart'; import '../mysql.dart'; -import '../home_page.dart'; -import '../main.dart'; import 'user.dart'; import '../reusables/input_field.dart'; import '../reusables/return_button.dart'; @@ -48,15 +44,7 @@ class _SignInPageState extends State { backgroundColor: globals.PINKBACKGROUND, resizeToAvoidBottomInset: true, appBar: AppBar( - backgroundColor: globals.PINKBACKGROUND, - leading: ReturnButton( - onPressed: () { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => BottomNavPage()), - ); - }, - ), + backgroundColor: const Color.fromARGB(204, 172, 123, 132), ), body: Center(child: SingleChildScrollView( child: Column( @@ -144,21 +132,16 @@ class _SignInPageState extends State { onPressed: () async { if (emailController.text.contains("'") || passwordController.text.contains("'")) { - print("1"); loginError(); return; } await loginVerification(emailController.text, passwordController.text); if (globals.LOGGED_IN_USER.userID != 0) { globals.LOGGED_IN_USER = loggedInUser; - Navigator.push( + Navigator.pop( context, - MaterialPageRoute( - builder: (context) => - BottomNavPage()), //Replace Container() with call to account-page. ); } else { - print(globals.LOGGED_IN_USER.userID); loginError(); } //print(loggedInUser.email + " " + loggedInUser.userID.toString()); diff --git a/lib/login/user.dart b/lib/login/user.dart index 29cc394..28e8be6 100644 --- a/lib/login/user.dart +++ b/lib/login/user.dart @@ -33,9 +33,6 @@ class User{ } } }); - for(Venue venue in likedVenuesList){ - print(venue.venueName); - } }); } } diff --git a/lib/main.dart b/lib/main.dart index 394978c..25593f0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,23 +2,18 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; -import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter_applicationdemo/shadow_detector.dart'; import 'package:flutter_applicationdemo/login/google_sign_in_provider.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'package:flutter_applicationdemo/login/google_sign_in_provider.dart'; import 'package:provider/provider.dart'; import 'package:http/http.dart' as http; import 'bottom_nav_page.dart'; -import 'map.dart'; import 'weather_data.dart'; import 'venue.dart'; import 'mysql.dart'; -import 'package:flutter_applicationdemo/login/user.dart'; -import 'login/user.dart'; import 'globals.dart' as globals; void main() async { diff --git a/lib/manage_account_page.dart b/lib/manage_account_page.dart index 9337d20..78b501e 100644 --- a/lib/manage_account_page.dart +++ b/lib/manage_account_page.dart @@ -1,9 +1,10 @@ import 'package:flutter/material.dart'; import 'package:flutter_applicationdemo/login/encrypt_data.dart'; import 'package:flutter_applicationdemo/reusables/input_field.dart'; - +import 'package:flutter_applicationdemo/globals.dart' as globals; import 'package:flutter_applicationdemo/mysql.dart'; -import 'home_page.dart'; + +import 'bottom_nav_page.dart'; class ManageAccountPage extends StatefulWidget { @override @@ -12,36 +13,27 @@ class ManageAccountPage extends StatefulWidget { class ManageAccountPageState extends State { var db = mysql(); - TextEditingController userNameController = TextEditingController(); - TextEditingController emailController = TextEditingController(); + TextEditingController previousPasswordController = TextEditingController(); TextEditingController passwordController = TextEditingController(); + TextEditingController confirmPasswordController = TextEditingController(); + UserInput userInput = UserInput(isValid: false, errorMessage: ""); - Widget _buildNameFiled() { + Widget _buildPasswordFiled(TextEditingController controller) { return InputField( - text: "new UserName", - isPassword: false, - icon: const Icon(Icons.person), - controller: userNameController + text: "New password", + isPassword: true, + icon: const Icon(Icons.lock), + controller: controller ); } - - Widget _buildEmailFiled() { - return InputField( - text: "current Email", - isPassword: false, - icon: const Icon(Icons.email), - controller: emailController - ); - } - - Widget _buildPasswordFiled() { + Widget _buildOldPasswordFiled() { return InputField( - text: "new Password", - isPassword: true, - icon: const Icon(Icons.lock), - controller: passwordController - ); + text: "Previous password", + isPassword: true, + icon: const Icon(Icons.lock), + controller: previousPasswordController + ); } @override @@ -51,91 +43,69 @@ class ManageAccountPageState extends State { //title: const Text('ManageAccountPage'), backgroundColor: const Color.fromARGB(255, 190, 146, 160), ), - body: Container( - margin: EdgeInsets.all(24), - child: Form( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text('Update user data' ,style: TextStyle(fontWeight: FontWeight.bold, fontSize: 25)), - const SizedBox(height: 50), - _buildEmailFiled(), - _buildNameFiled(), - _buildPasswordFiled(), - ElevatedButton( - onPressed: () async { - await verifyUserInput(userNameController.text, emailController.text,passwordController.text, userInput); - if(userInput.isValid) { - await updateUserInSQL(emailController.text, userNameController.text, passwordController.text); - Navigator.push( - context, - MaterialPageRoute(builder: (context) => HomePage()), - ); - } else { - createUserError(userInput.errorMessage); - } - }, - child: const Text('Update'), - style: ElevatedButton.styleFrom( - primary: const Color.fromARGB(255, 190, 146, 160) - ), - ) - ], + body: Center( + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text('Update user data' ,style: TextStyle(fontWeight: FontWeight.bold, fontSize: 25)), + const SizedBox(height: 50), + _buildOldPasswordFiled(), + _buildPasswordFiled(passwordController), + _buildPasswordFiled(confirmPasswordController), + ElevatedButton( + onPressed: () async { + await verifyUserInput(previousPasswordController.text, passwordController.text, confirmPasswordController.text); + if(userInput.isValid) { + await updateUserInSQL(previousPasswordController.text, confirmPasswordController.text); + Navigator.push( + context, + MaterialPageRoute(builder: (context) => BottomNavPage()), + ); + } else { + createUserError(userInput.errorMessage); + } + }, + child: const Text('Change password'), + style: ElevatedButton.styleFrom( + primary: const Color.fromARGB(255, 190, 146, 160) + ), + ) + ], ), - ), + ), ), ); } -Future verifyUserInput(String userName, String email , String password,userInput) async { - var result = false; - await db.getConnection().then((conn) async { - String sql = "SELECT email from maen0574.user where email = '$email';"; - var results = await conn.query(sql); - - if(results.toString() == "()") { - result = true; - } - }); - - if (result == true) { - userInput.errorMessage = "email incorrect!"; +Future verifyUserInput(String previous, String newPassword , String confirmedPassword) async { + String result = userInputResult(previous, newPassword, confirmedPassword); + if(result.isNotEmpty){ + userInput = UserInput(isValid: false, errorMessage: result); return; - } else if (email.contains("'") || !email.contains("@") || email.length < 5) { - userInput.errorMessage = "Incorrect email format"; - return; - } else if (userName.contains("'") || userName.length < 6) { - userInput.errorMessage = - "Incorrect username. \nCharacters limited to a-z, A-Z, 0-9."; - return; - } else if (password.contains("'") || password.length < 6) { - userInput.errorMessage = - "Incorrect password. \nPassword can't contain ' and needs to be atleast 6 characters long"; - return; - }else { - userInput.isValid = true; + }else{ + userInput = UserInput(isValid: true, errorMessage: ""); } - } -String userInputResult(String userName, String email , String password) { +String userInputResult(String previousPassword, String newPassword, String confirmedPassword) { String message = userInput.errorMessage; - if (email.contains("'") || !email.contains("@") || email.length < 5) { - message = "Incorrect email format"; + if (previousPassword.contains("'") ){ + message = "Incorrect previous password"; return message; - } else if (userName.contains("'") || userName.length < 6) { + } else if (newPassword.contains("'") || newPassword.length < 6) { message = - "Incorrect username. \nCharacters limited to a-z, A-Z, 0-9."; + "Incorrect new password. \nCharacters limited to a-z, A-Z, 0-9 and needs to be atleast 6 characters long"; return message; - } else if (password.contains("'") || password.length < 6) { + } else if (confirmedPassword.contains("'") || confirmedPassword.length < 6) { message = - "Incorrect password. \nPassword can't contain ' and needs to be atleast 6 characters long"; + "Incorrect confirmed password. \nPassword can't contain ' and needs to be atleast 6 characters long"; return message; - } else { + } else { return ""; - } + } } @@ -155,12 +125,29 @@ void createUserError(String stringContext) { ); } - Future updateUserInSQL(String email, String username, String password) async { - password = EncryptData.encryptAES(password); + Future updateUserInSQL(String previousPassword, String newPassword) async { + previousPassword = EncryptData.encryptAES(previousPassword); + newPassword = EncryptData.encryptAES(newPassword); await db.getConnection().then((conn) async { - String sql = "UPDATE maen0574.user set password = '$password', username = '$username' where email = '$email';"; - await conn.query(sql); + String sql = + "Select id from maen0574.user where id = ${globals.LOGGED_IN_USER.userID} and password = '$previousPassword'"; + userInput = UserInput(isValid: false, errorMessage: "Incorrect previous password"); + await conn.query(sql).then((results) { + for (var row in results) { + setState(() {}); + userInput = UserInput(isValid: true, errorMessage: ""); + } }); + }); + if(!userInput.isValid){ + createUserError(userInput.errorMessage); + return; + } + await db.getConnection().then((conn) async { + String sql = + "UPDATE maen0574.user SET password = $newPassword WHERE id = ${globals.LOGGED_IN_USER.userID}"; + conn.query(sql); + }); } } diff --git a/lib/map.dart b/lib/map.dart index 0d68f63..9275d0f 100644 --- a/lib/map.dart +++ b/lib/map.dart @@ -1,19 +1,15 @@ import 'package:flutter/material.dart'; -import 'package:flutter_applicationdemo/bottom_nav_page.dart'; import 'package:google_fonts/google_fonts.dart'; import 'dart:async'; -import 'login/user.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; import 'package:flutter_google_places/flutter_google_places.dart'; import 'package:location/location.dart'; -import 'package:flutter_applicationdemo/login/user.dart'; -import 'settings_page.dart'; import 'venue_page.dart'; import 'venue.dart'; +import 'login/user.dart'; import 'globals.dart' as globals; - import 'package:syncfusion_flutter_sliders/sliders.dart'; - +import 'package:flutter_applicationdemo/manage_account_page.dart'; import 'feedback_page.dart'; import 'login/create_account_page.dart'; import 'login/sign_in_page.dart'; @@ -152,17 +148,6 @@ class MapState extends State { ), ], ), - floatingActionButton: Padding( - padding: const EdgeInsets.only(top: 100.0), - child: FloatingActionButton( - onPressed: () { - Navigator.push(context, - MaterialPageRoute(builder: (context) => const SettingsPage())); - }, - backgroundColor: Colors.purple, - child: const Icon(Icons.filter_alt), - ), - ), floatingActionButtonLocation: FloatingActionButtonLocation.endTop, ); } @@ -546,21 +531,9 @@ Widget buildDrawerSignedIn(BuildContext context) { ], ), ), - ListTile( - leading: Icon(Icons.logout), - title: Text('Sign out'), - onTap: () { - globals.LOGGED_IN_USER = User(0, "", ""); - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - BottomNavPage()), //Replace Container() with call to Map-page. - ); - }, - ), giveFeedbackTile(context), settingsTile(context), + signOutTile(context), ], ), ); @@ -575,7 +548,6 @@ Widget buildDrawerSignedOut(BuildContext context) { createAccountTile(context), logInTile(context), giveFeedbackTile(context), - settingsTile(context), ], ), ); @@ -599,18 +571,32 @@ DrawerHeader drawerHeader() { ListTile settingsTile(BuildContext context) { return ListTile( leading: Icon(Icons.settings), - title: Text('Settings'), + title: Text('Change password'), onTap: () { Navigator.push( context, MaterialPageRoute( - builder: (context) => SettingsPage(), + builder: (context) => ManageAccountPage(), ), ); }, ); } +ListTile signOutTile(BuildContext context) { + return ListTile( + leading: Icon(Icons.logout), + title: Text('Sign out'), + onTap: () { + globals.LOGGED_IN_USER = User(0, "", ""); + Navigator.pop( + context, + ); + (context as Element).reassemble(); + }, + ); +} + ListTile giveFeedbackTile(BuildContext context) { return ListTile( leading: Icon(Icons.thumb_up_alt), @@ -630,13 +616,14 @@ ListTile logInTile(BuildContext context) { return ListTile( leading: Icon(Icons.login), title: Text('Sign in'), - onTap: () { - Navigator.push( + onTap: () async{ + await Navigator.push( context, MaterialPageRoute( builder: (context) => SignInPage(), ), ); + (context as Element).reassemble(); }, ); } @@ -645,13 +632,14 @@ ListTile createAccountTile(BuildContext context) { return ListTile( leading: Icon(Icons.account_box_rounded), title: Text('Create account'), - onTap: () { - Navigator.push( + onTap: () async { + await Navigator.push( context, MaterialPageRoute( builder: (context) => CreateAccountPage(), ), ); + (context as Element).reassemble(); }, ); } diff --git a/lib/nonusables/web_scraper.dart b/lib/nonusables/web_scraper.dart index 9f08d32..1186e6c 100644 --- a/lib/nonusables/web_scraper.dart +++ b/lib/nonusables/web_scraper.dart @@ -1,4 +1,3 @@ -import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import 'package:html/dom.dart' as dom; diff --git a/lib/reusables/return_button.dart b/lib/reusables/return_button.dart index 055d7d1..9e4306e 100644 --- a/lib/reusables/return_button.dart +++ b/lib/reusables/return_button.dart @@ -1,6 +1,4 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_applicationdemo/home_page.dart'; class ReturnButton extends StatelessWidget { final onPressed; diff --git a/lib/settings_page.dart b/lib/settings_page.dart deleted file mode 100644 index 280b9fc..0000000 --- a/lib/settings_page.dart +++ /dev/null @@ -1,380 +0,0 @@ -import 'package:firebase_auth/firebase_auth.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_applicationdemo/bottom_nav_page.dart'; -import 'package:flutter_applicationdemo/login/google_sign_in_provider.dart'; -import 'package:google_sign_in/google_sign_in.dart'; -import 'package:settings_ui/settings_ui.dart'; -import 'manage_account_page.dart'; -import 'login/google_sign_in_provider.dart'; -import 'package:provider/provider.dart'; -import 'feedback_page.dart'; - -// Standard color of app -Color _backgroundColor = const Color.fromARGB(255, 190, 146, 160); - -// Color status of priceRange -Color _colorContainerLow = Colors.purple; -Color _colorContainerMedium = _backgroundColor; -Color _colorContainerHigh = _backgroundColor; - -// Logic status of priceRange -Map _priceRangeBool = { - "LowPriceRange": true, - "MediumPriceRange": false, - "HighPriceRange": false -}; - -// Status of switches -bool _cafeSwitch = true; -bool _barSwitch = true; -bool _restaurantSwitch = true; - -// Standard -@override -class SettingsPage extends StatefulWidget { - const SettingsPage({Key? key}) : super(key: key); - - @override - _SettingsPageState createState() => _SettingsPageState(); -} - -class _SettingsPageState extends State { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - //leading: IconButton(icon: Icon(Icons.search), onPressed:() {},), - centerTitle: true, - title: const Text( - 'Settings', - style: TextStyle( - fontSize: 30, - color: Colors.white, - shadows: [ - Shadow( - offset: Offset(2, 2), - blurRadius: 10.0, - color: Color.fromARGB(255, 0, 0, 0), - ), - ], - ), - ), - backgroundColor: _backgroundColor, - ), - body: SettingsList( - sections: [ - SettingsSection( - title: const Text( - 'Filter preferences', - style: TextStyle( - fontSize: 20, - color: Color.fromARGB(255, 0, 0, 0), - ), - ), - tiles: [ - SettingsTile.switchTile( - onToggle: (value) { - setState(() { - _cafeSwitch = value; - }); - }, - initialValue: _cafeSwitch, - leading: const Icon(Icons.local_cafe), - title: const Text('Cafe'), - ), - SettingsTile.switchTile( - onToggle: (value) { - setState(() { - _barSwitch = value; - }); - }, - initialValue: _barSwitch, - leading: const Icon(Icons.local_bar), - title: const Text('Bar'), - ), - SettingsTile.switchTile( - onToggle: (value) { - setState(() { - _restaurantSwitch = value; - }); - }, - initialValue: _restaurantSwitch, - leading: const Icon(Icons.local_restaurant), - title: const Text('Restaurant'), - ), - SettingsTile( - title: const Text("Price"), - value: Row( - mainAxisSize: MainAxisSize.min, - children: [ - Expanded( - child: InkWell( - onTap: () { - setState(() { - onClickPriceColor("LowPriceRange"); - - if (_priceRangeBool["LowPriceRange"] == true) { - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - duration: Duration(milliseconds: 1000), - behavior: SnackBarBehavior.floating, - content: Text('Selected £'), - ),); - }else{ - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - duration: Duration(milliseconds: 1000), - content: Text('Unselected £'), - behavior: SnackBarBehavior.floating, - ),); - } - - }); - - }, - child: Container( - color: _colorContainerLow, - height: 60, - width: 75, - margin: - const EdgeInsets.only(left: 20.0, right: 20.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: const [ - Icon( - Icons.attach_money, - size: 27, - ), - ], - ), - ), - ), - ), - Expanded( - child: InkWell( - onTap: () { - setState(() { - onClickPriceColor("MediumPriceRange"); - - if (_priceRangeBool["MediumPriceRange"] == true) { - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - duration: Duration(milliseconds: 1000), - behavior: SnackBarBehavior.floating, - content: Text('Selected ££'), - )); - }else{ - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - duration: Duration(milliseconds: 1000), - content: Text('Unselected ££'), - behavior: SnackBarBehavior.floating, - )); - } - - }); - print("Tapped double dollarSign"); - }, - child: Container( - color: _colorContainerMedium, - height: 60, - width: 75, - margin: - const EdgeInsets.only(left: 20.0, right: 20.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: const [ - Icon( - Icons.attach_money, - size: 27, - ), - Icon( - Icons.attach_money, - size: 27, - ), - ], - ), - ), - ), - ), - Expanded( - child: InkWell( - onTap: () { - setState(() { - onClickPriceColor("HighPriceRange"); - - if (_priceRangeBool["HighPriceRange"] == true) { - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - duration: Duration(milliseconds: 1000), - behavior: SnackBarBehavior.floating, - content: Text('Selected £££'), - )); - }else{ - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - duration: Duration(milliseconds: 1000), - content: Text('Unselected £££'), - behavior: SnackBarBehavior.floating, - )); - } - - }); - print("Tapped Tripple dollarSign"); - }, - child: Container( - color: _colorContainerHigh, - height: 60, - width: 75, - margin: - const EdgeInsets.only(left: 20.0, right: 20.0), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: const [ - Icon( - Icons.attach_money, - size: 27, - ), - Icon( - Icons.attach_money, - size: 27, - ), - Icon( - Icons.attach_money, - size: 27, - ), - ], - ), - ), - ), - ), - ], - ), - ), - ], - ), - CustomSettingsSection( - child: Column(children: [ - SizedBox( - width: double.infinity, - child: Container( - margin: const EdgeInsets.only(left: 25.0, top: 10), - child: const Text( - 'Account', - style: TextStyle( - fontSize: 25, - color: Color.fromARGB(255, 0, 0, 0), - ), - ), - ), - ), - Column( - children: [ - Row( - children: [ - InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => BottomNavPage()), - ); - }, - child: Container( - margin: const EdgeInsets.only(left: 15.0, top: 10), - color: _backgroundColor, - height: 60, - width: 175, - child: const Center( - child: Text( - 'Manage account', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight. bold, - color: Colors.black, - ), - ), - ), - ), - ), - InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => FormForFeedback()), - ); - }, - child: Container( - margin: const EdgeInsets.only(left: 15.0, top: 10), - color: _backgroundColor, - height: 60, - width: 175, - child: const Center( - child: Text( - 'Leave feedback', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight. bold, - color: Colors.black, - ), - ), - ), - ), - ), - ], - ), - Center( - child: InkWell( - onTap: () async { - final provider = Provider.of(context, listen: false); - provider.logOut(); - }, - child: Container( - margin: const EdgeInsets.only(top: 10, right: 15), - color: _backgroundColor, - height: 60, - width: 175, - child: const Center( - child: Text( - 'Log out', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight. bold, - color: Colors.black, - ), - ), - ), - ), - ), - ) - ], - ), - ])) - ], - )); - } -} - -void onClickPriceColor(String priceRange) { - if (priceRange == "LowPriceRange") { - if (_priceRangeBool["LowPriceRange"] == true) { - _priceRangeBool["LowPriceRange"] = false; - _colorContainerLow = _backgroundColor; - } else { - _priceRangeBool["LowPriceRange"] = true; - _colorContainerLow = Colors.purple; - } - } else if (priceRange == "MediumPriceRange") { - if (_priceRangeBool["MediumPriceRange"] == true) { - _priceRangeBool["MediumPriceRange"] = false; - _colorContainerMedium = _backgroundColor; - } else { - _priceRangeBool["MediumPriceRange"] = true; - _colorContainerMedium = Colors.purple; - } - } else { - if (_priceRangeBool["HighPriceRange"] == true) { - _priceRangeBool["HighPriceRange"] = false; - _colorContainerHigh = _backgroundColor; - } else { - _priceRangeBool["HighPriceRange"] = true; - _colorContainerHigh = Colors.purple; - } - } -} diff --git a/lib/shadow_detector.dart b/lib/shadow_detector.dart index 03ed9cb..59c21f9 100644 --- a/lib/shadow_detector.dart +++ b/lib/shadow_detector.dart @@ -8,9 +8,8 @@ class ShadowDetector { List venuesInShade = []; - ShadowDetector() { + ShadowDetector(); - } //Called like "new ShadowDetector.fromShadowDetector(List of venues here);" ShadowDetector.fromShadowDetector(venues) { evaluateShadowsForAllVenues(venues); diff --git a/lib/venue.dart b/lib/venue.dart index b15e56a..f3a1fe8 100644 --- a/lib/venue.dart +++ b/lib/venue.dart @@ -1,7 +1,9 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_applicationdemo/shadow_detector.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; +import 'package:flutter_applicationdemo/globals.dart' as globals; + +import 'mysql.dart'; class Venue { int venueID; @@ -29,22 +31,6 @@ class Venue { LatLng tempPosition = LatLng(double.parse(splitArr[1]), double.parse(splitArr[0])); -/* print(splitArr[0].toString() + ' : ' + splitArr[1].toString()); - print('Coordinates: ' + tempCoordinates); - print('Parsed: ' + double.parse(splitArr[0]).toString()); - print(LatLng(double.parse(splitArr[1]), double.parse(splitArr[0]))); - print(tempAddress + tempName); - print(tempPosition.latitude.toString() + " " + splitArr[0]);*/ - - // print('Json-Object:'); - // print(json); - - // print(venues); - // print(json['name']); - // print(json['address']); - // print(json['streetNo']); - // print(json['coordinates']); - if (tempName != null && tempAddress != null && tempStreetNo != null && @@ -120,6 +106,25 @@ class Venue { 'coordinates: ' + position.toString(); } + + void likeVenue() { + globals.LOGGED_IN_USER.likedVenuesList.add(this); + var db = mysql(); + db.getConnection().then((conn) { + String sql = + "INSERT INTO maen0574.userFavorites (user_id, venue_id) VALUES (${globals.LOGGED_IN_USER.userID}, $venueID);"; + conn.query(sql); + }); + } + void unlikeVenue(){ + globals.LOGGED_IN_USER.likedVenuesList.remove(this); + var db = mysql(); + db.getConnection().then((conn) { + String sql = + "DELETE FROM maen0574.userFavorites WHERE user_id = '${globals.LOGGED_IN_USER.userID}' and venue_id = $venueID;"; + conn.query(sql); + }); + } } class OutdoorSeatingArea { diff --git a/lib/venue_info.dart b/lib/venue_info.dart index e219012..710ca99 100644 --- a/lib/venue_info.dart +++ b/lib/venue_info.dart @@ -1,7 +1,6 @@ import 'dart:convert'; import 'package:http/http.dart' as http; -import 'package:html/dom.dart' as dom; import 'package:intl/intl.dart'; import 'dart:io'; diff --git a/lib/venue_page.dart b/lib/venue_page.dart index 667b653..e78a0da 100644 --- a/lib/venue_page.dart +++ b/lib/venue_page.dart @@ -1,6 +1,5 @@ import 'dart:convert'; import 'dart:io'; - import 'package:share_plus/share_plus.dart'; import 'package:flutter_applicationdemo/venue.dart'; import 'package:flutter/material.dart'; @@ -138,7 +137,7 @@ class VenuePageState extends State { return Column( children: [ Padding( - padding: const EdgeInsets.all(4.0), + padding: EdgeInsets.all(4.0), child: Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Column( @@ -188,7 +187,7 @@ class _AboutTheSpotTableState extends State { fontSize: 14, fontWeight: FontWeight.bold, )))), - const DataColumn(label: Text('', style: TextStyle())), + DataColumn(label: Text('', style: TextStyle())), ], rows: [ DataRow(cells: [ @@ -240,7 +239,7 @@ class LikeVenueButton extends StatelessWidget { return alreadyLiked? Expanded( child: TextButton.icon( onPressed: () { - globals.LOGGED_IN_USER.likedVenuesList.remove(venue); + venue.unlikeVenue(); (context as Element).reassemble(); }, icon: const Icon( @@ -252,10 +251,10 @@ class LikeVenueButton extends StatelessWidget { primary: const Color(0xff4f6272), ), ), - ) : Expanded( + ) : globals.LOGGED_IN_USER.userID != 0 ? Expanded( child: TextButton.icon( onPressed: () { - globals.LOGGED_IN_USER.likedVenuesList.add(venue); + venue.likeVenue(); (context as Element).reassemble(); }, icon: const Icon( @@ -266,7 +265,42 @@ class LikeVenueButton extends StatelessWidget { style: TextButton.styleFrom( primary: const Color(0xff4f6272), ), - )); + )): Expanded( + child: TextButton.icon( + onPressed: () async{ + await notLoggedInError(context); + }, + icon: const Icon( + Icons.favorite_border_outlined, + color: Colors.grey, + ), + label: const Text('Like place'), + style: TextButton.styleFrom( + primary: Color(0xff4f6272), + ), + )); + } + + notLoggedInError(BuildContext context) { + Widget okButton = TextButton( + child: Text("OK"), + onPressed: () => Navigator.pop(context, 'OK'), + ); + // set up the AlertDialog + AlertDialog alert = AlertDialog( + title: Text("Can\'t like venue"), + content: Text("You need to be logged in to like venues."), + actions: [ + okButton, + ], + ); + // show the dialog + showDialog( + context: context, + builder: (BuildContext context) { + return alert; + }, + ); } }