diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index f9246c89..f370658f 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":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/cloud_firestore-0.13.4+2/","dependencies":["firebase_core"]},{"name":"firebase_admob","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_admob-0.9.3+1/","dependencies":["firebase_core"]},{"name":"firebase_analytics","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_analytics-5.0.11/","dependencies":[]},{"name":"firebase_auth","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_auth-0.15.5+3/","dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_core-0.4.4+3/","dependencies":[]},{"name":"firebase_messaging","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_messaging-6.0.13/","dependencies":[]},{"name":"firebase_storage","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_storage-3.1.3/","dependencies":["firebase_core"]},{"name":"flutter_inappwebview","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/flutter_inappwebview-2.1.0+1/","dependencies":[]},{"name":"flutter_mdns_plugin","path":"/Users/hezhibin/.pub-cache/git/flutter_mdns_plugin-d08fc4db13d1d2100a25fca228411156cd174f33/","dependencies":[]},{"name":"google_sign_in","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/google_sign_in-4.2.0/","dependencies":[]},{"name":"image_picker","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/image_picker-0.6.3+4/","dependencies":[]},{"name":"path_provider","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/path_provider-1.6.5/","dependencies":[]},{"name":"permission_handler","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/permission_handler-3.3.0/","dependencies":[]},{"name":"share_extend","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/share_extend-1.1.1/","dependencies":[]},{"name":"shared_preferences","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/sqflite-1.3.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/url_launcher-5.4.2/","dependencies":[]},{"name":"video_player","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/video_player-0.10.8+1/","dependencies":[]},{"name":"wakelock","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/wakelock-0.1.4+1/","dependencies":[]},{"name":"webview_media","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/webview_media-0.1.1+3/","dependencies":[]}],"android":[{"name":"cloud_firestore","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/cloud_firestore-0.13.4+2/","dependencies":["firebase_core"]},{"name":"firebase_admob","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_admob-0.9.3+1/","dependencies":["firebase_core"]},{"name":"firebase_analytics","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_analytics-5.0.11/","dependencies":[]},{"name":"firebase_auth","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_auth-0.15.5+3/","dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_core-0.4.4+3/","dependencies":[]},{"name":"firebase_messaging","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_messaging-6.0.13/","dependencies":[]},{"name":"firebase_storage","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_storage-3.1.3/","dependencies":["firebase_core"]},{"name":"flutter_inappwebview","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/flutter_inappwebview-2.1.0+1/","dependencies":[]},{"name":"flutter_mdns_plugin","path":"/Users/hezhibin/.pub-cache/git/flutter_mdns_plugin-d08fc4db13d1d2100a25fca228411156cd174f33/","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/flutter_plugin_android_lifecycle-1.0.6/","dependencies":[]},{"name":"google_sign_in","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/google_sign_in-4.2.0/","dependencies":[]},{"name":"image_picker","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/image_picker-0.6.3+4/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/path_provider-1.6.5/","dependencies":[]},{"name":"permission_handler","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/permission_handler-3.3.0/","dependencies":[]},{"name":"share_extend","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/share_extend-1.1.1/","dependencies":[]},{"name":"shared_preferences","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/sqflite-1.3.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/url_launcher-5.4.2/","dependencies":[]},{"name":"video_player","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/video_player-0.10.8+1/","dependencies":[]},{"name":"wakelock","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/wakelock-0.1.4+1/","dependencies":[]},{"name":"webview_media","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/webview_media-0.1.1+3/","dependencies":[]}],"macos":[{"name":"cloud_firestore","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/cloud_firestore-0.13.4+2/","dependencies":["firebase_core"]},{"name":"firebase_auth","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_auth-0.15.5+3/","dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_core-0.4.4+3/","dependencies":[]},{"name":"path_provider_macos","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/path_provider_macos-0.0.4/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/shared_preferences_macos-0.0.1+6/","dependencies":[]},{"name":"sqflite","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/sqflite-1.3.0/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/url_launcher_macos-0.0.1+4/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"cloud_firestore_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/cloud_firestore_web-0.1.1+2/","dependencies":[]},{"name":"firebase_auth_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_auth_web-0.1.2/","dependencies":[]},{"name":"firebase_core_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_core_web-0.1.1+2/","dependencies":[]},{"name":"google_sign_in_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/google_sign_in_web-0.8.4/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/shared_preferences_web-0.1.2+4/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/url_launcher_web-0.1.1+1/","dependencies":[]},{"name":"video_player_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/video_player_web-0.1.2+1/","dependencies":[]}]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["firebase_core","cloud_firestore_web"]},{"name":"cloud_firestore_web","dependencies":["firebase_core"]},{"name":"firebase_admob","dependencies":["firebase_core"]},{"name":"firebase_analytics","dependencies":[]},{"name":"firebase_auth","dependencies":["firebase_core","firebase_auth_web"]},{"name":"firebase_auth_web","dependencies":[]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":[]},{"name":"firebase_storage","dependencies":["firebase_core"]},{"name":"flutter_inappwebview","dependencies":[]},{"name":"flutter_mdns_plugin","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_web"]},{"name":"google_sign_in_web","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"share_extend","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"video_player","dependencies":["video_player_web"]},{"name":"video_player_web","dependencies":[]},{"name":"wakelock","dependencies":[]},{"name":"webview_media","dependencies":[]}],"date_created":"2020-04-10 10:24:23.133503","version":"1.16.1"} \ 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":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/cloud_firestore-0.13.4+2/","dependencies":["firebase_core"]},{"name":"firebase_admob","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_admob-0.9.3+1/","dependencies":["firebase_core"]},{"name":"firebase_analytics","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_analytics-5.0.11/","dependencies":[]},{"name":"firebase_auth","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_auth-0.15.5+3/","dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_core-0.4.4+3/","dependencies":[]},{"name":"firebase_messaging","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_messaging-6.0.13/","dependencies":[]},{"name":"firebase_storage","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_storage-3.1.3/","dependencies":["firebase_core"]},{"name":"flutter_inappwebview","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/flutter_inappwebview-2.1.0+1/","dependencies":[]},{"name":"flutter_mdns_plugin","path":"/Users/hezhibin/.pub-cache/git/flutter_mdns_plugin-d08fc4db13d1d2100a25fca228411156cd174f33/","dependencies":[]},{"name":"google_sign_in","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/google_sign_in-4.2.0/","dependencies":[]},{"name":"image_picker","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/image_picker-0.6.3+4/","dependencies":[]},{"name":"path_provider","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/path_provider-1.6.5/","dependencies":[]},{"name":"permission_handler","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/permission_handler-3.3.0/","dependencies":[]},{"name":"share_extend","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/share_extend-1.1.1/","dependencies":[]},{"name":"shared_preferences","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/sqflite-1.3.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/url_launcher-5.4.2/","dependencies":[]},{"name":"video_player","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/video_player-0.10.8+1/","dependencies":[]},{"name":"wakelock","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/wakelock-0.1.4+1/","dependencies":[]},{"name":"webview_media","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/webview_media-0.1.1+3/","dependencies":[]}],"android":[{"name":"cloud_firestore","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/cloud_firestore-0.13.4+2/","dependencies":["firebase_core"]},{"name":"firebase_admob","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_admob-0.9.3+1/","dependencies":["firebase_core"]},{"name":"firebase_analytics","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_analytics-5.0.11/","dependencies":[]},{"name":"firebase_auth","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_auth-0.15.5+3/","dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_core-0.4.4+3/","dependencies":[]},{"name":"firebase_messaging","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_messaging-6.0.13/","dependencies":[]},{"name":"firebase_storage","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_storage-3.1.3/","dependencies":["firebase_core"]},{"name":"flutter_inappwebview","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/flutter_inappwebview-2.1.0+1/","dependencies":[]},{"name":"flutter_mdns_plugin","path":"/Users/hezhibin/.pub-cache/git/flutter_mdns_plugin-d08fc4db13d1d2100a25fca228411156cd174f33/","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/flutter_plugin_android_lifecycle-1.0.6/","dependencies":[]},{"name":"google_sign_in","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/google_sign_in-4.2.0/","dependencies":[]},{"name":"image_picker","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/image_picker-0.6.3+4/","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/path_provider-1.6.5/","dependencies":[]},{"name":"permission_handler","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/permission_handler-3.3.0/","dependencies":[]},{"name":"share_extend","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/share_extend-1.1.1/","dependencies":[]},{"name":"shared_preferences","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/shared_preferences-0.5.6+3/","dependencies":[]},{"name":"sqflite","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/sqflite-1.3.0/","dependencies":[]},{"name":"url_launcher","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/url_launcher-5.4.2/","dependencies":[]},{"name":"video_player","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/video_player-0.10.8+1/","dependencies":[]},{"name":"wakelock","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/wakelock-0.1.4+1/","dependencies":[]},{"name":"webview_media","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/webview_media-0.1.1+3/","dependencies":[]}],"macos":[{"name":"cloud_firestore","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/cloud_firestore-0.13.4+2/","dependencies":["firebase_core"]},{"name":"firebase_auth","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_auth-0.15.5+3/","dependencies":["firebase_core"]},{"name":"firebase_core","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_core-0.4.4+3/","dependencies":[]},{"name":"path_provider_macos","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/path_provider_macos-0.0.4/","dependencies":[]},{"name":"shared_preferences_macos","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/shared_preferences_macos-0.0.1+6/","dependencies":[]},{"name":"sqflite","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/sqflite-1.3.0/","dependencies":[]},{"name":"url_launcher_macos","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/url_launcher_macos-0.0.1+4/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"cloud_firestore_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/cloud_firestore_web-0.1.1+2/","dependencies":[]},{"name":"firebase_auth_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_auth_web-0.1.2/","dependencies":[]},{"name":"firebase_core_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/firebase_core_web-0.1.1+2/","dependencies":[]},{"name":"google_sign_in_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/google_sign_in_web-0.8.4/","dependencies":[]},{"name":"shared_preferences_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/shared_preferences_web-0.1.2+4/","dependencies":[]},{"name":"url_launcher_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/url_launcher_web-0.1.1+1/","dependencies":[]},{"name":"video_player_web","path":"/Users/hezhibin/.pub-cache/hosted/mirrors.tuna.tsinghua.edu.cn%47dart-pub/video_player_web-0.1.2+1/","dependencies":[]}]},"dependencyGraph":[{"name":"cloud_firestore","dependencies":["firebase_core","cloud_firestore_web"]},{"name":"cloud_firestore_web","dependencies":["firebase_core"]},{"name":"firebase_admob","dependencies":["firebase_core"]},{"name":"firebase_analytics","dependencies":[]},{"name":"firebase_auth","dependencies":["firebase_core","firebase_auth_web"]},{"name":"firebase_auth_web","dependencies":[]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":[]},{"name":"firebase_storage","dependencies":["firebase_core"]},{"name":"flutter_inappwebview","dependencies":[]},{"name":"flutter_mdns_plugin","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"google_sign_in","dependencies":["google_sign_in_web"]},{"name":"google_sign_in_web","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","dependencies":["path_provider_macos"]},{"name":"path_provider_macos","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"share_extend","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"video_player","dependencies":["video_player_web"]},{"name":"video_player_web","dependencies":[]},{"name":"wakelock","dependencies":[]},{"name":"webview_media","dependencies":[]}],"date_created":"2020-04-11 09:48:06.400101","version":"1.16.1"} \ No newline at end of file diff --git a/android/.gradle/4.10.2/fileHashes/fileHashes.bin b/android/.gradle/4.10.2/fileHashes/fileHashes.bin index 562f0732..21dc52ae 100644 Binary files a/android/.gradle/4.10.2/fileHashes/fileHashes.bin and b/android/.gradle/4.10.2/fileHashes/fileHashes.bin differ diff --git a/android/.gradle/4.10.2/fileHashes/fileHashes.lock b/android/.gradle/4.10.2/fileHashes/fileHashes.lock index 01ed4c78..4416d7f6 100644 Binary files a/android/.gradle/4.10.2/fileHashes/fileHashes.lock and b/android/.gradle/4.10.2/fileHashes/fileHashes.lock differ diff --git a/android/.gradle/4.10.2/taskHistory/taskHistory.bin b/android/.gradle/4.10.2/taskHistory/taskHistory.bin index b4dbf076..af1f32f4 100644 Binary files a/android/.gradle/4.10.2/taskHistory/taskHistory.bin and b/android/.gradle/4.10.2/taskHistory/taskHistory.bin differ diff --git a/android/.gradle/4.10.2/taskHistory/taskHistory.lock b/android/.gradle/4.10.2/taskHistory/taskHistory.lock index 48055e63..caf36444 100644 Binary files a/android/.gradle/4.10.2/taskHistory/taskHistory.lock and b/android/.gradle/4.10.2/taskHistory/taskHistory.lock differ diff --git a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock index c16c0f27..fca1ecbe 100644 Binary files a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/lib/views/account_page/state.dart b/lib/views/account_page/state.dart index 796199f3..a5faf68a 100644 --- a/lib/views/account_page/state.dart +++ b/lib/views/account_page/state.dart @@ -6,6 +6,8 @@ import 'package:flutter/material.dart'; import 'package:movie/globalbasestate/state.dart'; class AccountPageState implements GlobalBaseState, Cloneable { + GlobalKey scafoldState = + GlobalKey(debugLabel: 'accountPageScafold'); String name; String avatar; bool islogin; @@ -25,6 +27,7 @@ class AccountPageState implements GlobalBaseState, Cloneable { ..themeIndex = themeIndex ..locale = locale ..themeColor = themeColor + ..scafoldState = scafoldState ..user = user; } diff --git a/lib/views/account_page/view.dart b/lib/views/account_page/view.dart index 46359692..d6b4d184 100644 --- a/lib/views/account_page/view.dart +++ b/lib/views/account_page/view.dart @@ -4,6 +4,7 @@ import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:movie/actions/adapt.dart'; import 'package:movie/customwidgets/customcliper_path.dart'; +import 'package:movie/views/main_page/action.dart'; import 'action.dart'; import 'state.dart'; @@ -52,7 +53,7 @@ Widget buildView( width: Adapt.px(40), ), SizedBox( - width: Adapt.screenW() - Adapt.px(200), + width: Adapt.screenW() - Adapt.px(225), child: Text( 'Hi, ${state.user?.displayName ?? 'Guest'}', maxLines: 1, @@ -67,19 +68,61 @@ Widget buildView( Expanded( child: SizedBox(), ), - IconButton( - iconSize: Adapt.px(50), - onPressed: () { - if (state.islogin) - dispatch(AccountPageActionCreator.onLogout()); - else - dispatch(AccountPageActionCreator.onLogin()); - }, - icon: Icon( - state.islogin ? Icons.exit_to_app : Icons.person_outline, - color: Colors.white, - ), - ), + state.user == null + ? InkWell( + onTap: () => dispatch(AccountPageActionCreator.onLogin()), + child: Container( + height: Adapt.px(60), + margin: EdgeInsets.only( + right: Adapt.px(30), + top: Adapt.px(13), + bottom: Adapt.px(13)), + padding: EdgeInsets.symmetric( + horizontal: Adapt.px(20), vertical: Adapt.px(10)), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(Adapt.px(30)), + border: Border.all( + color: const Color(0xFFFFFFFF), width: 2)), + child: Text( + 'Sign In', + style: TextStyle( + color: const Color(0xFFFFFFFF), + fontSize: Adapt.px(26)), + ))) + : PopupMenuButton( + padding: EdgeInsets.zero, + offset: Offset(0, Adapt.px(100)), + icon: Icon( + Icons.more_vert, + color: const Color(0xFFFFFFFF), + size: Adapt.px(50), + ), + onSelected: (selected) { + switch (selected) { + case 'Sign Out': + dispatch(AccountPageActionCreator.onLogout()); + break; + } + }, + itemBuilder: (ctx) { + return [ + PopupMenuItem( + value: 'Notifications', + child: const _DropDownItem( + title: 'Notifications', + icon: Icons.notifications_none, + ), + ), + PopupMenuItem( + value: 'Sign Out', + child: const _DropDownItem( + title: 'Sign Out', + icon: Icons.exit_to_app, + ), + ), + ]; + }, + ), SizedBox( width: Adapt.px(10), ) @@ -162,29 +205,43 @@ Widget buildView( } return Scaffold( + key: state.scafoldState, + endDrawer: Drawer(), body: SingleChildScrollView( - physics: BouncingScrollPhysics(), - child: Stack( - children: [ - _buildBackGround(), - Container( - child: SafeArea( - child: Column( - children: [ - SizedBox( - height: Adapt.px(60), - ), - _buildHeader(), - SizedBox( - height: Adapt.px(50), + physics: BouncingScrollPhysics(), + child: Stack( + children: [ + _buildBackGround(), + Container( + child: SafeArea( + child: Column( + children: [ + SizedBox( + height: Adapt.px(60), + ), + _buildHeader(), + SizedBox( + height: Adapt.px(50), + ), + _buildBody(), + ], ), - _buildBody(), - ], - ), - ), - ) - ], - ), - )); + ), + ) + ], + ), + )); }); } + +class _DropDownItem extends StatelessWidget { + final String title; + final IconData icon; + const _DropDownItem({@required this.title, this.icon}); + @override + Widget build(BuildContext context) { + return Row( + children: [Icon(icon), SizedBox(width: 10), Text(title)], + ); + } +} diff --git a/lib/views/home_page/components/header_component/view.dart b/lib/views/home_page/components/header_component/view.dart index 339e20a5..1658ef97 100644 --- a/lib/views/home_page/components/header_component/view.dart +++ b/lib/views/home_page/components/header_component/view.dart @@ -37,15 +37,18 @@ Widget buildView( itemBuilder: (_, index) { final _d = _model.results[index]; return _HeaderListCell( - data: _model.results[index], - onTap: () => dispatch(HomePageActionCreator.onCellTapped( + data: _model.results[index], + onTap: () => dispatch( + HomePageActionCreator.onCellTapped( _d.id, _d.backdropPath, _d.title ?? _d.name, _d.posterPath, state.showHeaderMovie ? MediaType.movie - : MediaType.tv))); + : MediaType.tv), + ), + ); }) : _ShimmerHeaderList(), ), @@ -149,16 +152,17 @@ class _ShimmerHeaderList extends StatelessWidget { @override Widget build(BuildContext context) { return Shimmer.fromColors( - baseColor: _baseColor, - highlightColor: _highLightColor, - child: ListView.separated( - padding: EdgeInsets.symmetric(horizontal: Adapt.px(30)), - physics: BouncingScrollPhysics(), - scrollDirection: Axis.horizontal, - itemCount: 4, - itemBuilder: (context, index) => _ShimmerHeaderCell(), - separatorBuilder: (context, index) => SizedBox(width: Adapt.px(30)), - )); + baseColor: _baseColor, + highlightColor: _highLightColor, + child: ListView.separated( + padding: EdgeInsets.symmetric(horizontal: Adapt.px(30)), + physics: BouncingScrollPhysics(), + scrollDirection: Axis.horizontal, + itemCount: 4, + itemBuilder: (context, index) => _ShimmerHeaderCell(), + separatorBuilder: (context, index) => SizedBox(width: Adapt.px(30)), + ), + ); } } @@ -178,11 +182,14 @@ class _HeaderListCell extends StatelessWidget { width: Adapt.px(200), height: Adapt.px(280), decoration: BoxDecoration( - color: Color.fromRGBO(57, 57, 57, 1), - image: DecorationImage( - fit: BoxFit.cover, - image: CachedNetworkImageProvider( - ImageUrl.getUrl(data.posterPath, ImageSize.w300)))), + color: Color.fromRGBO(57, 57, 57, 1), + image: DecorationImage( + fit: BoxFit.cover, + image: CachedNetworkImageProvider( + ImageUrl.getUrl(data.posterPath, ImageSize.w300), + ), + ), + ), ), ), SizedBox( @@ -192,10 +199,15 @@ class _HeaderListCell extends StatelessWidget { alignment: Alignment.center, width: Adapt.px(200), height: Adapt.px(70), - child: Text(name, - maxLines: 2, - textAlign: TextAlign.center, - style: TextStyle(color: Colors.grey, fontSize: Adapt.px(26))), + child: Text( + name, + maxLines: 2, + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.grey, + fontSize: Adapt.px(26), + ), + ), ), ], ); diff --git a/lib/views/home_page/components/popularposter_cpmponent/view.dart b/lib/views/home_page/components/popularposter_cpmponent/view.dart index 1508e385..26a2b7fc 100644 --- a/lib/views/home_page/components/popularposter_cpmponent/view.dart +++ b/lib/views/home_page/components/popularposter_cpmponent/view.dart @@ -209,28 +209,33 @@ class _Cell extends StatelessWidget { child: Column( children: [ Container( - width: Adapt.px(250), - height: Adapt.px(350), - decoration: BoxDecoration( - color: _theme.primaryColorDark, - borderRadius: BorderRadius.circular(Adapt.px(15)), - image: DecorationImage( - fit: BoxFit.cover, - image: CachedNetworkImageProvider( - ImageUrl.getUrl(data.posterPath, ImageSize.w400))))), - Container( - //alignment: Alignment.bottomCenter, - width: Adapt.px(250), - padding: EdgeInsets.all(Adapt.px(10)), - child: Text( - data.title ?? data.name, - maxLines: 2, - //textAlign: TextAlign.center, - style: TextStyle( - fontSize: Adapt.px(28), - fontWeight: FontWeight.bold, + width: Adapt.px(250), + height: Adapt.px(350), + decoration: BoxDecoration( + color: _theme.primaryColorDark, + borderRadius: BorderRadius.circular(Adapt.px(15)), + image: DecorationImage( + fit: BoxFit.cover, + image: CachedNetworkImageProvider( + ImageUrl.getUrl(data.posterPath, ImageSize.w400), ), - )) + ), + ), + ), + Container( + //alignment: Alignment.bottomCenter, + width: Adapt.px(250), + padding: EdgeInsets.all(Adapt.px(10)), + child: Text( + data.title ?? data.name, + maxLines: 2, + //textAlign: TextAlign.center, + style: TextStyle( + fontSize: Adapt.px(28), + fontWeight: FontWeight.bold, + ), + ), + ) ], ), ); diff --git a/lib/views/home_page/components/share_component/view.dart b/lib/views/home_page/components/share_component/view.dart index c98ea1ea..19054085 100644 --- a/lib/views/home_page/components/share_component/view.dart +++ b/lib/views/home_page/components/share_component/view.dart @@ -201,15 +201,19 @@ class _Cell extends StatelessWidget { child: Column( children: [ Container( - width: Adapt.px(250), - height: Adapt.px(350), - decoration: BoxDecoration( - color: _theme.primaryColorDark, - borderRadius: BorderRadius.circular(Adapt.px(15)), - image: DecorationImage( - fit: BoxFit.cover, - image: CachedNetworkImageProvider( - ImageUrl.getUrl(data.photourl, ImageSize.w400))))), + width: Adapt.px(250), + height: Adapt.px(350), + decoration: BoxDecoration( + color: _theme.primaryColorDark, + borderRadius: BorderRadius.circular(Adapt.px(15)), + image: DecorationImage( + fit: BoxFit.cover, + image: CachedNetworkImageProvider( + ImageUrl.getUrl(data.photourl, ImageSize.w400), + ), + ), + ), + ), Container( //alignment: Alignment.bottomCenter, width: Adapt.px(250), diff --git a/lib/views/home_page/components/swiper_component/view.dart b/lib/views/home_page/components/swiper_component/view.dart index f36dcc8d..641b5492 100644 --- a/lib/views/home_page/components/swiper_component/view.dart +++ b/lib/views/home_page/components/swiper_component/view.dart @@ -71,106 +71,110 @@ class _Cell extends StatelessWidget { Widget build(BuildContext context) { final ThemeData _theme = ThemeStyle.getTheme(context); return GestureDetector( - key: ValueKey('card${data.id}'), - onTap: onTap, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - decoration: new BoxDecoration( - color: _theme.brightness == Brightness.light - ? const Color(0xFFFFFFFF) - : const Color(0xFF404040), - boxShadow: [ - BoxShadow( - color: _theme.brightness == Brightness.light - ? Colors.grey[200] - : Colors.transparent, - offset: Offset(0, Adapt.px(20)), - blurRadius: Adapt.px(30), - spreadRadius: Adapt.px(1)), - ], - ), - margin: EdgeInsets.fromLTRB( - Adapt.px(30), Adapt.px(5), Adapt.px(30), Adapt.px(30)), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: Adapt.px(120), - height: Adapt.px(170), - decoration: BoxDecoration( - color: _theme.primaryColorLight, - image: DecorationImage( - fit: BoxFit.cover, - image: CachedNetworkImageProvider(ImageUrl.getUrl( - data.posterPath, ImageSize.w300)))), - ), - SizedBox( - width: Adapt.px(20), - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: Adapt.px(20), + key: ValueKey('card${data.id}'), + onTap: onTap, + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + decoration: new BoxDecoration( + color: _theme.brightness == Brightness.light + ? const Color(0xFFFFFFFF) + : const Color(0xFF404040), + boxShadow: [ + BoxShadow( + color: _theme.brightness == Brightness.light + ? Colors.grey[200] + : Colors.transparent, + offset: Offset(0, Adapt.px(20)), + blurRadius: Adapt.px(30), + spreadRadius: Adapt.px(1)), + ], + ), + margin: EdgeInsets.fromLTRB( + Adapt.px(30), Adapt.px(5), Adapt.px(30), Adapt.px(30)), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + width: Adapt.px(120), + height: Adapt.px(170), + decoration: BoxDecoration( + color: _theme.primaryColorLight, + image: DecorationImage( + fit: BoxFit.cover, + image: CachedNetworkImageProvider( + ImageUrl.getUrl(data.posterPath, ImageSize.w300), ), - Row( - children: [ - Container( - width: Adapt.screenW() - Adapt.px(450), - child: Text( - data.title ?? data.name, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - //color: Colors.black, - fontWeight: FontWeight.w800, - fontSize: Adapt.px(35)), - ), + ), + ), + ), + SizedBox( + width: Adapt.px(20), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + SizedBox( + height: Adapt.px(20), + ), + Row( + children: [ + Container( + width: Adapt.screenW() - Adapt.px(450), + child: Text( + data.title ?? data.name, + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + //color: Colors.black, + fontWeight: FontWeight.w800, + fontSize: Adapt.px(35)), ), - Container( - width: Adapt.px(160), - child: RatingBarIndicator( - itemBuilder: (context, _) => Icon( - Icons.star, - color: Colors.amber, - ), - unratedColor: Colors.grey[300], - itemSize: Adapt.px(22), - itemPadding: EdgeInsets.only(right: Adapt.px(8)), - rating: data.voteAverage / 2, + ), + Container( + width: Adapt.px(160), + child: RatingBarIndicator( + itemBuilder: (context, _) => Icon( + Icons.star, + color: Colors.amber, ), + unratedColor: Colors.grey[300], + itemSize: Adapt.px(22), + itemPadding: EdgeInsets.only(right: Adapt.px(8)), + rating: data.voteAverage / 2, ), - Text( - data.voteAverage.toStringAsFixed(1), - style: TextStyle( - fontSize: Adapt.px(22), - fontWeight: FontWeight.w700), - ) - ], - ), - SizedBox( - height: Adapt.px(20), - ), - Container( - width: Adapt.screenW() - Adapt.px(210), - child: Text( - data.overview, - maxLines: 2, - overflow: TextOverflow.ellipsis, - style: TextStyle( - //color: Colors.grey, - fontSize: Adapt.px(24)), ), - ) - ], - ) - ], - ), - ) - ], - )); + Text( + data.voteAverage.toStringAsFixed(1), + style: TextStyle( + fontSize: Adapt.px(22), + fontWeight: FontWeight.w700), + ) + ], + ), + SizedBox( + height: Adapt.px(20), + ), + Container( + width: Adapt.screenW() - Adapt.px(210), + child: Text( + data.overview, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + //color: Colors.grey, + fontSize: Adapt.px(24)), + ), + ) + ], + ) + ], + ), + ) + ], + ), + ); } } diff --git a/lib/views/home_page/components/trending_component/view.dart b/lib/views/home_page/components/trending_component/view.dart index efeb20d8..4b15b57d 100644 --- a/lib/views/home_page/components/trending_component/view.dart +++ b/lib/views/home_page/components/trending_component/view.dart @@ -38,7 +38,7 @@ Widget buildView( } Widget _buildTrending() { - double _size = (Adapt.screenW() - Adapt.px(70)) / 2; + final double _size = (Adapt.screenW() - Adapt.px(70)) / 2; Widget _child = state.trending.results.length > 0 ? StaggeredGridView.countBuilder( key: ValueKey('Trending'), @@ -53,30 +53,34 @@ Widget buildView( itemBuilder: (BuildContext contxt, int index) { var d = state.trending.results[index]; return GestureDetector( - onTap: () => dispatch(HomePageActionCreator.onCellTapped( - d.id, - d.backdropPath, - d.title ?? d.name, - d.posterPath, - d.title != null ? MediaType.movie : MediaType.tv)), - child: Container( - padding: EdgeInsets.symmetric(horizontal: Adapt.px(10)), - alignment: Alignment.bottomLeft, - decoration: BoxDecoration( - color: _theme.primaryColorDark, - image: DecorationImage( - fit: BoxFit.cover, - image: CachedNetworkImageProvider(ImageUrl.getUrl( - d.backdropPath, ImageSize.w400)))), - child: Text( - d.title ?? d.name, - style: TextStyle( - color: Colors.white, - fontSize: Adapt.px(30) / _mediaQuery.textScaleFactor, - fontWeight: FontWeight.bold, - shadows: [Shadow(offset: Offset(1, 1))]), + onTap: () => dispatch(HomePageActionCreator.onCellTapped( + d.id, + d.backdropPath, + d.title ?? d.name, + d.posterPath, + d.title != null ? MediaType.movie : MediaType.tv)), + child: Container( + padding: EdgeInsets.symmetric(horizontal: Adapt.px(10)), + alignment: Alignment.bottomLeft, + decoration: BoxDecoration( + color: _theme.primaryColorDark, + image: DecorationImage( + fit: BoxFit.cover, + image: CachedNetworkImageProvider( + ImageUrl.getUrl(d.backdropPath, ImageSize.w400), + ), ), - )); + ), + child: Text( + d.title ?? d.name, + style: TextStyle( + color: Colors.white, + fontSize: Adapt.px(30) / _mediaQuery.textScaleFactor, + fontWeight: FontWeight.bold, + shadows: [Shadow(offset: Offset(1, 1))]), + ), + ), + ); }, ) : Shimmer.fromColors( @@ -125,15 +129,18 @@ Widget buildView( return Column( children: [ _buildFrontTitel( - 'Trending', - GestureDetector( - onTap: () => dispatch(HomePageActionCreator.onTrendingMore()), - child: Text( - I18n.of(viewService.context).more, - style: TextStyle(color: Colors.grey[600]), - ), + 'Trending', + GestureDetector( + onTap: () => dispatch(HomePageActionCreator.onTrendingMore()), + child: Text( + I18n.of(viewService.context).more, + style: TextStyle(color: Colors.grey[600]), ), - padding: EdgeInsets.symmetric(horizontal: Adapt.px(30))), + ), + padding: EdgeInsets.symmetric( + horizontal: Adapt.px(30), + ), + ), SizedBox(height: Adapt.px(30)), _buildTrending(), SizedBox(height: Adapt.px(50)), diff --git a/lib/views/home_page/view.dart b/lib/views/home_page/view.dart index 09369f2d..eb2145a9 100644 --- a/lib/views/home_page/view.dart +++ b/lib/views/home_page/view.dart @@ -23,8 +23,8 @@ Widget buildView( elevation: 0.0, automaticallyImplyLeading: false, title: _SearchBar( - onTap: () => - dispatch(HomePageActionCreator.onSearchBarTapped())), + onTap: () => dispatch(HomePageActionCreator.onSearchBarTapped()), + ), ), //backgroundColor: Colors.white, body: BackDrop( diff --git a/lib/views/login_page/action.dart b/lib/views/login_page/action.dart index 9442c397..1c098db3 100644 --- a/lib/views/login_page/action.dart +++ b/lib/views/login_page/action.dart @@ -3,8 +3,6 @@ import 'package:fish_redux/fish_redux.dart'; enum LoginPageAction { action, loginclicked, - accoutChanged, - pwdChanged, signUp, googleSignIn, switchLoginMode, @@ -22,14 +20,6 @@ class LoginPageActionCreator { return const Action(LoginPageAction.loginclicked); } - static Action onAccountChange(String account) { - return Action(LoginPageAction.accoutChanged, payload: account); - } - - static Action onPwdChange(String pwd) { - return Action(LoginPageAction.pwdChanged, payload: pwd); - } - static Action onSignUp() { return const Action(LoginPageAction.signUp); } diff --git a/lib/views/login_page/effect.dart b/lib/views/login_page/effect.dart index 11cc8c17..decaae80 100644 --- a/lib/views/login_page/effect.dart +++ b/lib/views/login_page/effect.dart @@ -105,10 +105,12 @@ Future _onLoginClicked(Action action, Context ctx) async { Future _emailSignIn( Action action, Context ctx) async { - if (ctx.state.account != '' && ctx.state.pwd != '') { + if (ctx.state.accountTextController.text != '' && + ctx.state.passWordTextController.text != '') { try { return await _auth.signInWithEmailAndPassword( - email: ctx.state.account, password: ctx.state.pwd); + email: ctx.state.accountTextController.text, + password: ctx.state.passWordTextController.text); } on Exception catch (e) { Toast.show(e.toString(), ctx.context, duration: 3, gravity: Toast.BOTTOM); ctx.state.submitAnimationController.reverse(); @@ -201,7 +203,9 @@ void _onSendVerificationCode(Action action, Context ctx) async { timeout: Duration(seconds: 60), verificationCompleted: null, verificationFailed: (AuthException e) { - Toast.show(e.message, ctx.context, gravity: Toast.CENTER); + print('error code: ${e.code}, message: ${e.message}'); + Toast.show(e.message, ctx.context, + gravity: Toast.TOP, duration: Toast.LENGTH_LONG); }, codeSent: (String verificationId, [int]) { _verificationId = verificationId; diff --git a/lib/views/login_page/reducer.dart b/lib/views/login_page/reducer.dart index 30bb2f36..d721319a 100644 --- a/lib/views/login_page/reducer.dart +++ b/lib/views/login_page/reducer.dart @@ -7,8 +7,6 @@ Reducer buildReducer() { return asReducer( >{ LoginPageAction.action: _onAction, - LoginPageAction.accoutChanged: _onAccountChanged, - LoginPageAction.pwdChanged: _onPwdChanged, LoginPageAction.switchLoginMode: _switchLoginMode, LoginPageAction.countryCodeChange: _onCountryCodeChange, }, @@ -20,20 +18,6 @@ LoginPageState _onAction(LoginPageState state, Action action) { return newState; } -LoginPageState _onAccountChanged(LoginPageState state, Action action) { - String account = action.payload ?? ''; - final LoginPageState newState = state.clone(); - newState.account = account; - return newState; -} - -LoginPageState _onPwdChanged(LoginPageState state, Action action) { - String pwd = action.payload ?? ''; - final LoginPageState newState = state.clone(); - newState.pwd = pwd; - return newState; -} - LoginPageState _switchLoginMode(LoginPageState state, Action action) { final LoginPageState newState = state.clone(); newState.emailLogin = !state.emailLogin; diff --git a/lib/views/login_page/view.dart b/lib/views/login_page/view.dart index 49da1ee3..9ae8baf5 100644 --- a/lib/views/login_page/view.dart +++ b/lib/views/login_page/view.dart @@ -16,44 +16,67 @@ import 'state.dart'; Widget buildView( LoginPageState state, Dispatch dispatch, ViewService viewService) { double headerHeight = Adapt.screenH() / 3; - Widget _buildHeader() { - return ClipPath( - clipper: CustomCliperPath( - height: headerHeight, width: Adapt.screenW(), radius: Adapt.px(1000)), - child: Container( - height: headerHeight, - width: Adapt.screenW(), - decoration: BoxDecoration( - color: Colors.black87, - image: DecorationImage( - colorFilter: ColorFilter.mode(Colors.black, BlendMode.color), - fit: BoxFit.cover, - image: CachedNetworkImageProvider( - 'https://image.tmdb.org/t/p/original/mAkPFEWkwKz9nmKyCiuETfTdpgX.jpg'))), - alignment: Alignment.center, - child: Container( - color: Color.fromRGBO(20, 20, 20, 0.8), - alignment: Alignment.center, + Widget _buildBackGround() { + return Column(children: [ + ClipPath( + clipper: CustomCliperPath( + height: headerHeight, + width: Adapt.screenW(), + radius: Adapt.px(1000)), + child: Container( height: headerHeight, width: Adapt.screenW(), - child: SlideTransition( - position: Tween(begin: Offset(0, -1), end: Offset.zero) - .animate(CurvedAnimation( + decoration: BoxDecoration( + color: Colors.black87, + image: DecorationImage( + colorFilter: + ColorFilter.mode(Colors.black, BlendMode.color), + fit: BoxFit.cover, + image: CachedNetworkImageProvider( + 'https://image.tmdb.org/t/p/original/mAkPFEWkwKz9nmKyCiuETfTdpgX.jpg'))), + alignment: Alignment.center, + child: Container( + color: Color.fromRGBO(20, 20, 20, 0.8), + alignment: Alignment.center, + height: headerHeight, + width: Adapt.screenW(), + child: SlideTransition( + position: Tween(begin: Offset(0, -1), end: Offset.zero) + .animate(CurvedAnimation( + parent: state.animationController, + curve: Interval( + 0.0, + 0.4, + curve: Curves.ease, + ), + )), + child: Image.asset( + 'images/tmdb_blue.png', + width: Adapt.px(150), + height: Adapt.px(150), + color: Colors.white, + )), + )), + ), + Expanded(child: SizedBox()), + Container( + height: Adapt.px(200), + width: Adapt.screenW(), + padding: EdgeInsets.only(bottom: Adapt.px(20)), + alignment: Alignment.bottomCenter, + child: SafeArea( + child: FadeTransition( + opacity: Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation( parent: state.animationController, curve: Interval( - 0.0, - 0.4, + 0.7, + 1.0, curve: Curves.ease, ), )), - child: Image.asset( - 'images/tmdb_blue.png', - width: Adapt.px(150), - height: Adapt.px(150), - color: Colors.white, - )), + child: Text('Powered by The Movie DB')), )), - ); + ]); } Widget _buildAppbar() { @@ -111,8 +134,6 @@ Widget buildView( TextStyle(color: Colors.black, fontSize: Adapt.px(35)), focusedBorder: new UnderlineInputBorder( borderSide: new BorderSide(color: Colors.black87))), - onChanged: (String t) => - dispatch(LoginPageActionCreator.onAccountChange(t)), onSubmitted: (s) { state.accountFocusNode.nextFocus(); }, @@ -141,8 +162,6 @@ Widget buildView( TextStyle(color: Colors.black, fontSize: Adapt.px(35)), focusedBorder: new UnderlineInputBorder( borderSide: new BorderSide(color: Colors.black87))), - onChanged: (String t) => - dispatch(LoginPageActionCreator.onPwdChange(t)), onSubmitted: (s) => dispatch(LoginPageActionCreator.onLoginClicked()), ), @@ -193,7 +212,7 @@ Widget buildView( Theme( child: TextField( controller: state.codeTextContraller, - keyboardType: TextInputType.text, + keyboardType: TextInputType.number, textInputAction: TextInputAction.done, cursorColor: Colors.black, decoration: InputDecoration( @@ -318,6 +337,13 @@ Widget buildView( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ + /*IndexedStack( + index: state.emailLogin ? 0 : 1, + children: [ + _buildEmailEntry(), + _buildPhoneNumberEntry(), + ], + ),*/ AnimatedSwitcher( duration: Duration(milliseconds: 300), child: state.emailLogin @@ -408,28 +434,12 @@ Widget buildView( } return Scaffold( + resizeToAvoidBottomPadding: false, body: Stack( children: [ - _buildHeader(), + _buildBackGround(), _buildLoginBody(), - Container( - height: Adapt.screenH(), - width: Adapt.screenW(), - padding: EdgeInsets.only(bottom: Adapt.px(20)), - alignment: Alignment.bottomCenter, - child: SafeArea( - child: FadeTransition( - opacity: Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation( - parent: state.animationController, - curve: Interval( - 0.7, - 1.0, - curve: Curves.ease, - ), - )), - child: Text('Powered by The Movie DB')), - )), - _buildAppbar() + _buildAppbar(), ], ), ); @@ -561,7 +571,9 @@ class _CountryCodeDialogState extends State<_CountryCodeDialog> { width: _width, child: ListView.separated( padding: EdgeInsets.all(Adapt.px(40)), - separatorBuilder: (_, __) => Divider(), + separatorBuilder: (_, __) => Divider( + height: 25, + ), itemCount: _countrys.length, itemBuilder: (_, index) { final d = _countrys[index]; @@ -586,6 +598,7 @@ class _CountryCell extends StatelessWidget { final _width = Adapt.screenW() - Adapt.px(80); final _textStyle = TextStyle(fontSize: Adapt.px(28)); return InkWell( + key: ValueKey(data.name), onTap: () { onTap(data.dialCode); Navigator.of(context).pop(); @@ -596,7 +609,7 @@ class _CountryCell extends StatelessWidget { Text(data.flag, style: _textStyle), SizedBox(width: Adapt.px(20)), Container( - constraints: BoxConstraints(maxWidth: _width - Adapt.px(320)), + constraints: BoxConstraints(maxWidth: _width - Adapt.px(340)), child: Text(data.name, style: _textStyle), ), Text(' (${data.dialCode})', style: _textStyle), diff --git a/lib/views/main_page/action.dart b/lib/views/main_page/action.dart index 121bfbcd..22cd06e9 100644 --- a/lib/views/main_page/action.dart +++ b/lib/views/main_page/action.dart @@ -1,6 +1,6 @@ import 'package:fish_redux/fish_redux.dart'; -enum MainPageAction { action, tabchanged } +enum MainPageAction { action, tabchanged, openDrawer } class MainPageActionCreator { static Action onAction() { @@ -10,4 +10,8 @@ class MainPageActionCreator { static Action onTabChanged(int index) { return Action(MainPageAction.tabchanged, payload: index); } + + static Action openDrawer() { + return Action(MainPageAction.openDrawer); + } } diff --git a/lib/views/main_page/effect.dart b/lib/views/main_page/effect.dart index 1b013e4e..98caa38b 100644 --- a/lib/views/main_page/effect.dart +++ b/lib/views/main_page/effect.dart @@ -13,6 +13,7 @@ import 'state.dart'; Effect buildEffect() { return combineEffects(>{ MainPageAction.action: _onAction, + MainPageAction.openDrawer: _onOpenDrawer, Lifecycle.initState: _onInit }); } @@ -56,3 +57,7 @@ Future _push(Map message, Context ctx) async { })); } } + +void _onOpenDrawer(Action action, Context ctx) { + ctx.state.scaffoldKey.currentState.openEndDrawer(); +} diff --git a/lib/views/main_page/view.dart b/lib/views/main_page/view.dart index 1e6bc22a..7e8c8380 100644 --- a/lib/views/main_page/view.dart +++ b/lib/views/main_page/view.dart @@ -33,6 +33,7 @@ Widget buildView( return Scaffold( key: state.scaffoldKey, + endDrawer: Drawer(), body: PageView( physics: ClampingScrollPhysics(), children: state.pages.map(_buildPage).toList(), diff --git a/lib/views/register_page/action.dart b/lib/views/register_page/action.dart index 4ab0b4e8..205eef24 100644 --- a/lib/views/register_page/action.dart +++ b/lib/views/register_page/action.dart @@ -3,9 +3,6 @@ import 'package:fish_redux/fish_redux.dart'; enum RegisterPageAction { action, registerWithEmail, - nameTextChanged, - emailTextChanged, - pwdTextChanged } class RegisterPageActionCreator { @@ -16,16 +13,4 @@ class RegisterPageActionCreator { static Action onRegisterWithEmail() { return const Action(RegisterPageAction.registerWithEmail); } - - static Action onNameTextChanged(String t) { - return Action(RegisterPageAction.nameTextChanged, payload: t); - } - - static Action onEmailTextChanged(String t) { - return Action(RegisterPageAction.emailTextChanged, payload: t); - } - - static Action onPwdTextChanged(String t) { - return Action(RegisterPageAction.pwdTextChanged, payload: t); - } } diff --git a/lib/views/register_page/effect.dart b/lib/views/register_page/effect.dart index 73bbed1c..cc81f8f2 100644 --- a/lib/views/register_page/effect.dart +++ b/lib/views/register_page/effect.dart @@ -13,6 +13,7 @@ Effect buildEffect() { return combineEffects(>{ RegisterPageAction.action: _onAction, Lifecycle.initState: _onInit, + Lifecycle.dispose: _onDispose, RegisterPageAction.registerWithEmail: _onRegisterWithEmail }); } @@ -23,16 +24,28 @@ void _onInit(Action action, Context ctx) { ctx.state.emailFocusNode = FocusNode(); ctx.state.nameFocusNode = FocusNode(); ctx.state.pwdFocusNode = FocusNode(); - + ctx.state.emailTextController = TextEditingController(); + ctx.state.nameTextController = TextEditingController(); + ctx.state.passWordTextController = TextEditingController(); final Object ticker = ctx.stfState; ctx.state.submitAnimationController = AnimationController( vsync: ticker, duration: Duration(milliseconds: 1000)); } +void _onDispose(Action action, Context ctx) { + ctx.state.emailFocusNode.dispose(); + ctx.state.nameFocusNode.dispose(); + ctx.state.passWordTextController.dispose(); + ctx.state.pwdFocusNode.dispose(); + ctx.state.nameTextController.dispose(); + ctx.state.emailTextController.dispose(); + ctx.state.submitAnimationController.dispose(); +} + void _onRegisterWithEmail(Action action, Context ctx) async { - if (ctx.state.name == null || - ctx.state.emailAddress == null || - ctx.state.password == null) { + if (ctx.state.nameTextController.text == '' || + ctx.state.emailTextController.text == '' || + ctx.state.passWordTextController.text == '') { Toast.show('Please enter all information', ctx.context, duration: 3, gravity: Toast.BOTTOM); } else { @@ -40,22 +53,23 @@ void _onRegisterWithEmail(Action action, Context ctx) async { ctx.state.submitAnimationController.forward(); final FirebaseAuth _auth = FirebaseAuth.instance; final FirebaseUser user = (await _auth.createUserWithEmailAndPassword( - email: ctx.state.emailAddress, password: ctx.state.password)) + email: ctx.state.emailTextController.text, + password: ctx.state.passWordTextController.text)) .user; if (user != null) { - assert(ctx.state.name != null); + assert(ctx.state.nameTextController.text != ''); final UserUpdateInfo userUpdateInfo = UserUpdateInfo() - ..displayName = ctx.state.name; + ..displayName = ctx.state.nameTextController.text; user.updateProfile(userUpdateInfo).then((d) { GlobalStore.store.dispatch(GlobalActionCreator.setUser(user)); BaseApi.updateUser(user.uid, user.email, user.photoUrl, - ctx.state.name, user.phoneNumber); + ctx.state.nameTextController.text, user.phoneNumber); Navigator.pop( ctx.context, PopWithResults( fromPage: "registerPage", toPage: 'mainpage', - results: {'s': true, 'name': ctx.state.name}, + results: {'s': true, 'name': ctx.state.nameTextController.text}, ), ); }); diff --git a/lib/views/register_page/reducer.dart b/lib/views/register_page/reducer.dart index c63f757c..102abaa0 100644 --- a/lib/views/register_page/reducer.dart +++ b/lib/views/register_page/reducer.dart @@ -7,9 +7,6 @@ Reducer buildReducer() { return asReducer( >{ RegisterPageAction.action: _onAction, - RegisterPageAction.nameTextChanged: _onNameTextChanged, - RegisterPageAction.emailTextChanged: _onEmailTextChanged, - RegisterPageAction.pwdTextChanged: _onPwdTextChanged, }, ); } @@ -18,24 +15,3 @@ RegisterPageState _onAction(RegisterPageState state, Action action) { final RegisterPageState newState = state.clone(); return newState; } - -RegisterPageState _onNameTextChanged(RegisterPageState state, Action action) { - final String text = action.payload ?? ''; - final RegisterPageState newState = state.clone(); - newState.name = text; - return newState; -} - -RegisterPageState _onEmailTextChanged(RegisterPageState state, Action action) { - final String text = action.payload ?? ''; - final RegisterPageState newState = state.clone(); - newState.emailAddress = text; - return newState; -} - -RegisterPageState _onPwdTextChanged(RegisterPageState state, Action action) { - final String text = action.payload ?? ''; - final RegisterPageState newState = state.clone(); - newState.password = text; - return newState; -} diff --git a/lib/views/register_page/state.dart b/lib/views/register_page/state.dart index 82d7fcc4..b79836b5 100644 --- a/lib/views/register_page/state.dart +++ b/lib/views/register_page/state.dart @@ -5,6 +5,9 @@ class RegisterPageState implements Cloneable { String emailAddress; String password; String name; + TextEditingController nameTextController; + TextEditingController passWordTextController; + TextEditingController emailTextController; FocusNode nameFocusNode; FocusNode emailFocusNode; FocusNode pwdFocusNode; @@ -19,7 +22,10 @@ class RegisterPageState implements Cloneable { ..nameFocusNode = nameFocusNode ..emailFocusNode = emailFocusNode ..pwdFocusNode = pwdFocusNode - ..submitAnimationController = submitAnimationController; + ..submitAnimationController = submitAnimationController + ..emailTextController = emailTextController + ..passWordTextController = passWordTextController + ..nameTextController = nameTextController; } } diff --git a/lib/views/register_page/view.dart b/lib/views/register_page/view.dart index b72f21ec..ea450e1c 100644 --- a/lib/views/register_page/view.dart +++ b/lib/views/register_page/view.dart @@ -120,7 +120,11 @@ Widget buildView( Padding( padding: EdgeInsets.all(Adapt.px(40)), child: TextFormField( + controller: state.nameTextController, focusNode: state.nameFocusNode, + keyboardType: TextInputType.text, + textInputAction: TextInputAction.next, + cursorColor: Colors.black, style: TextStyle(fontSize: Adapt.px(35)), decoration: InputDecoration( fillColor: Colors.transparent, @@ -138,13 +142,15 @@ Widget buildView( } return null; }, - onChanged: (t) => dispatch( - RegisterPageActionCreator.onNameTextChanged(t)), + onFieldSubmitted: (_) => state.nameFocusNode.nextFocus(), )), Padding( padding: EdgeInsets.all(Adapt.px(40)), child: TextFormField( + controller: state.emailTextController, focusNode: state.emailFocusNode, + textInputAction: TextInputAction.next, + cursorColor: Colors.black, style: TextStyle(fontSize: Adapt.px(35)), decoration: InputDecoration( fillColor: Colors.transparent, @@ -162,14 +168,16 @@ Widget buildView( } return null; }, - onChanged: (t) => dispatch( - RegisterPageActionCreator.onEmailTextChanged(t)), + onFieldSubmitted: (_) => state.emailFocusNode.nextFocus(), )), Padding( padding: EdgeInsets.all(Adapt.px(40)), child: TextFormField( obscureText: true, + controller: state.passWordTextController, focusNode: state.pwdFocusNode, + textInputAction: TextInputAction.done, + cursorColor: Colors.black, style: TextStyle(fontSize: Adapt.px(35)), decoration: InputDecoration( fillColor: Colors.transparent, @@ -187,8 +195,6 @@ Widget buildView( } return null; }, - onChanged: (t) => dispatch( - RegisterPageActionCreator.onPwdTextChanged(t)), )), _buildSubmit(), ], @@ -214,8 +220,13 @@ Widget buildView( } return Scaffold( + resizeToAvoidBottomPadding: false, body: Stack( - children: [_buildHeader(), _buildRegisterForm(), _buildAppBar()], + children: [ + _buildHeader(), + _buildRegisterForm(), + _buildAppBar(), + ], ), ); } diff --git a/lib/views/start_page/effect.dart b/lib/views/start_page/effect.dart index 9c53f84b..9ce3f011 100644 --- a/lib/views/start_page/effect.dart +++ b/lib/views/start_page/effect.dart @@ -1,3 +1,4 @@ +import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:fish_redux/fish_redux.dart'; import 'package:flutter/material.dart' hide Action; import 'package:movie/routes/routes.dart'; @@ -17,6 +18,10 @@ Effect buildEffect() { void _onAction(Action action, Context ctx) {} void _onInit(Action action, Context ctx) async { + final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); + _firebaseMessaging.requestNotificationPermissions(); + _firebaseMessaging.configure(); + _firebaseMessaging.autoInitEnabled(); ctx.state.pageController = PageController(); SharedPreferences.getInstance().then((_p) async { final _isFirst = _p.getBool('isFirstTime') ?? true; diff --git a/lib/views/start_page/view.dart b/lib/views/start_page/view.dart index 1d2f12b6..84106d01 100644 --- a/lib/views/start_page/view.dart +++ b/lib/views/start_page/view.dart @@ -161,9 +161,6 @@ class _SubscribeTopicPageState extends State<_SubscribeTopicPage> { @override void initState() { - _firebaseMessaging.requestNotificationPermissions(); - _firebaseMessaging.configure(); - _firebaseMessaging.autoInitEnabled(); super.initState(); }