admin
2021-11-03 0daa197dbaf611eacdf9eeb3763ddcb10038585b
功能完善
20个文件已修改
42个文件已添加
3795 ■■■■■ 已修改文件
.flutter-plugins 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.flutter-plugins-dependencies 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.packages 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/build.gradle 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/AndroidManifest.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/app/src/main/java/com/yeshi/location/MainActivity.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
android/build.gradle 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/ic_permission_notify_top.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_ask.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_calendar.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_date_start_end.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_date_start_end_small.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_delete.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_edit.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_permission_notify_location.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_permission_notify_phone.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_share.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_share_qq.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_share_sina.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_share_wx.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_sos.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_sos_back.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/common/icon_travel.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/ic_splash.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/login/ic_login_logo.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/login/ic_login_onekey.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/login/ic_login_phone.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/login/ic_login_qq.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/login/ic_login_wx.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/login/icon_code.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/login/icon_phone.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/map/icon_location_back.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/map/icon_location_location.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/map/icon_location_position_input.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/map/icon_location_search_type_eat.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/map/icon_location_search_type_hotel.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/map/icon_location_search_type_movie.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/map/icon_location_search_type_sense.png 补丁 | 查看 | 原始文档 | blame | 历史
assets/images/map/icon_location_search_type_waimai.png 补丁 | 查看 | 原始文档 | blame | 历史
lib/generated_plugin_registrant.dart 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/main.dart 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/common/browser.dart 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/main/location.dart 848 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/main/main.dart 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/main/mine.dart 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/map/travel.dart 702 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/mine/add_location_person.dart 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/mine/login.dart 313 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/mine/settings.dart 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/mine/share_to_friends.dart 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/mine/try_functions.dart 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/sos/sos.dart 446 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/sos/sos_contacts.dart 246 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/splash.dart 148 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/widget/button.dart 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/widget/dialog.dart 323 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/ui/widget/nav.dart 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/utils/jsinterface.dart 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/utils/pageutils.dart 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/utils/ui_constant.dart 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pubspec.lock 238 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pubspec.yaml 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.flutter-plugins
@@ -4,6 +4,8 @@
flutter_baidu_mapapi_search=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\flutter_baidu_mapapi_search-3.0.0\\
flutter_baidu_mapapi_utils=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\flutter_baidu_mapapi_utils-3.0.0\\
flutter_plugin_android_lifecycle=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\flutter_plugin_android_lifecycle-2.0.4\\
flutter_tencentad=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\flutter_tencentad-1.0.4\\
flutter_unionad=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\flutter_unionad-1.1.6\\
fluttertoast=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\fluttertoast-8.0.8\\
path_provider_linux=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\path_provider_linux-2.1.0\\
path_provider_windows=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\path_provider_windows-2.0.3\\
@@ -14,3 +16,11 @@
shared_preferences_web=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\shared_preferences_web-2.0.2\\
shared_preferences_windows=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\shared_preferences_windows-2.0.2\\
sqflite=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\sqflite-2.0.0+4\\
video_player=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\video_player-2.2.6\\
video_player_web=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\video_player_web-2.0.4\\
wakelock=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\wakelock-0.5.6\\
wakelock_macos=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\wakelock_macos-0.4.0\\
wakelock_web=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\wakelock_web-0.4.0\\
webview_flutter=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\webview_flutter-2.1.2\\
webview_flutter_android=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\webview_flutter_android-2.2.0\\
webview_flutter_wkwebview=D:\\Program Files\\flutter_windows_2.5.3-stable\\flutter\\.pub-cache\\hosted\\pub.flutter-io.cn\\webview_flutter_wkwebview-2.2.0\\
.flutter-plugins-dependencies
@@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_baidu_mapapi_base","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_base-3.0.0\\\\","dependencies":[]},{"name":"flutter_baidu_mapapi_map","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_map-3.0.0+2\\\\","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_search","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_search-3.0.0\\\\","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_utils","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_utils-3.0.0\\\\","dependencies":["flutter_baidu_mapapi_base"]},{"name":"fluttertoast","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\fluttertoast-8.0.8\\\\","dependencies":[]},{"name":"permission_handler","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler-3.3.0\\\\","dependencies":[]},{"name":"shared_preferences","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences-2.0.8\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-2.0.0+4\\\\","dependencies":[]}],"android":[{"name":"flutter_baidu_mapapi_base","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_base-3.0.0\\\\","dependencies":[]},{"name":"flutter_baidu_mapapi_map","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_map-3.0.0+2\\\\","dependencies":["flutter_plugin_android_lifecycle","flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_search","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_search-3.0.0\\\\","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_utils","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_utils-3.0.0\\\\","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_plugin_android_lifecycle-2.0.4\\\\","dependencies":[]},{"name":"fluttertoast","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\fluttertoast-8.0.8\\\\","dependencies":[]},{"name":"permission_handler","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler-3.3.0\\\\","dependencies":[]},{"name":"shared_preferences","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences-2.0.8\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-2.0.0+4\\\\","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_macos-2.0.2\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-2.0.0+4\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.1.0\\\\","dependencies":[]},{"name":"shared_preferences_linux","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_linux-2.0.2\\\\","dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.0.3\\\\","dependencies":[]},{"name":"shared_preferences_windows","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_windows-2.0.2\\\\","dependencies":["path_provider_windows"]}],"web":[{"name":"fluttertoast","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\fluttertoast-8.0.8\\\\","dependencies":[]},{"name":"shared_preferences_web","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_web-2.0.2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_baidu_mapapi_base","dependencies":[]},{"name":"flutter_baidu_mapapi_map","dependencies":["flutter_plugin_android_lifecycle","flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_search","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_utils","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"fluttertoast","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]}],"date_created":"2021-10-29 17:56:42.052768","version":"2.5.3"}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_baidu_mapapi_base","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_base-3.0.0\\\\","dependencies":[]},{"name":"flutter_baidu_mapapi_map","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_map-3.0.0+2\\\\","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_search","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_search-3.0.0\\\\","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_utils","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_utils-3.0.0\\\\","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_tencentad","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_tencentad-1.0.4\\\\","dependencies":[]},{"name":"flutter_unionad","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_unionad-1.1.6\\\\","dependencies":[]},{"name":"fluttertoast","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\fluttertoast-8.0.8\\\\","dependencies":[]},{"name":"permission_handler","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler-3.3.0\\\\","dependencies":[]},{"name":"shared_preferences","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences-2.0.8\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-2.0.0+4\\\\","dependencies":[]},{"name":"video_player","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\video_player-2.2.6\\\\","dependencies":[]},{"name":"wakelock","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\wakelock-0.5.6\\\\","dependencies":[]},{"name":"webview_flutter_wkwebview","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\webview_flutter_wkwebview-2.2.0\\\\","dependencies":[]}],"android":[{"name":"flutter_baidu_mapapi_base","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_base-3.0.0\\\\","dependencies":[]},{"name":"flutter_baidu_mapapi_map","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_map-3.0.0+2\\\\","dependencies":["flutter_plugin_android_lifecycle","flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_search","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_search-3.0.0\\\\","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_utils","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_baidu_mapapi_utils-3.0.0\\\\","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_plugin_android_lifecycle-2.0.4\\\\","dependencies":[]},{"name":"flutter_tencentad","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_tencentad-1.0.4\\\\","dependencies":[]},{"name":"flutter_unionad","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\flutter_unionad-1.1.6\\\\","dependencies":[]},{"name":"fluttertoast","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\fluttertoast-8.0.8\\\\","dependencies":[]},{"name":"permission_handler","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\permission_handler-3.3.0\\\\","dependencies":[]},{"name":"shared_preferences","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences-2.0.8\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-2.0.0+4\\\\","dependencies":[]},{"name":"video_player","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\video_player-2.2.6\\\\","dependencies":[]},{"name":"wakelock","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\wakelock-0.5.6\\\\","dependencies":[]},{"name":"webview_flutter_android","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\webview_flutter_android-2.2.0\\\\","dependencies":[]}],"macos":[{"name":"shared_preferences_macos","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_macos-2.0.2\\\\","dependencies":[]},{"name":"sqflite","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\sqflite-2.0.0+4\\\\","dependencies":[]},{"name":"wakelock_macos","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\wakelock_macos-0.4.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.1.0\\\\","dependencies":[]},{"name":"shared_preferences_linux","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_linux-2.0.2\\\\","dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.0.3\\\\","dependencies":[]},{"name":"shared_preferences_windows","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_windows-2.0.2\\\\","dependencies":["path_provider_windows"]}],"web":[{"name":"fluttertoast","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\fluttertoast-8.0.8\\\\","dependencies":[]},{"name":"shared_preferences_web","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\shared_preferences_web-2.0.2\\\\","dependencies":[]},{"name":"video_player_web","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\video_player_web-2.0.4\\\\","dependencies":[]},{"name":"wakelock_web","path":"D:\\\\Program Files\\\\flutter_windows_2.5.3-stable\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.flutter-io.cn\\\\wakelock_web-0.4.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_baidu_mapapi_base","dependencies":[]},{"name":"flutter_baidu_mapapi_map","dependencies":["flutter_plugin_android_lifecycle","flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_search","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_baidu_mapapi_utils","dependencies":["flutter_baidu_mapapi_base"]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_tencentad","dependencies":[]},{"name":"flutter_unionad","dependencies":[]},{"name":"fluttertoast","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"permission_handler","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_linux","shared_preferences_macos","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"sqflite","dependencies":[]},{"name":"video_player","dependencies":["video_player_web"]},{"name":"video_player_web","dependencies":[]},{"name":"wakelock","dependencies":["wakelock_macos","wakelock_web"]},{"name":"wakelock_macos","dependencies":[]},{"name":"wakelock_web","dependencies":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2021-11-03 19:08:11.277992","version":"2.5.3"}
.packages
@@ -3,13 +3,16 @@
# For more info see: https://dart.dev/go/dot-packages-deprecation
# Generated by pub on 2021-10-29 15:57:50.196612.
# Generated by pub on 2021-11-03 17:17:44.801731.
async:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.8.1/lib/
boolean_selector:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-2.1.0/lib/
characters:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/characters-1.1.0/lib/
charcode:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.3.1/lib/
chewie:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/chewie-1.2.2/lib/
chewie_audio:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/chewie_audio-1.2.0/lib/
clock:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/clock-1.1.0/lib/
collection:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.15.0/lib/
csslib:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.17.1/lib/
cupertino_icons:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-1.0.3/lib/
dio:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-4.0.1/lib/
fake_async:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/fake_async-1.2.0/lib/
@@ -20,26 +23,43 @@
flutter_baidu_mapapi_map:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_baidu_mapapi_map-3.0.0+2/lib/
flutter_baidu_mapapi_search:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_baidu_mapapi_search-3.0.0/lib/
flutter_baidu_mapapi_utils:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_baidu_mapapi_utils-3.0.0/lib/
flutter_datetime_picker:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_datetime_picker-1.5.1/lib/
flutter_html:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_html-2.1.5/lib/
flutter_layout_grid:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_layout_grid-1.0.3/lib/
flutter_lints:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_lints-1.0.4/lib/
flutter_math_fork:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_math_fork-0.3.3+1/lib/
flutter_page_indicator:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_indicator-0.0.3/lib/
flutter_plugin_android_lifecycle:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-2.0.4/lib/
flutter_svg:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_svg-0.22.0/lib/
flutter_swiper:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_swiper-1.1.6/lib/
flutter_tencentad:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_tencentad-1.0.4/lib/
flutter_test:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/packages/flutter_test/lib/
flutter_unionad:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_unionad-1.1.6/lib/
flutter_web_plugins:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/packages/flutter_web_plugins/lib/
fluttertoast:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-8.0.8/lib/
html:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/html-0.15.0/lib/
http_parser:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-4.0.0/lib/
js:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.3/lib/
lints:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/lints-1.0.1/lib/
matcher:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.10/lib/
meta:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.7.0/lib/
nested:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/nested-1.0.0/lib/
numerus:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/numerus-1.1.1/lib/
path:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.8.0/lib/
path_drawing:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_drawing-0.5.1+1/lib/
path_parsing:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_parsing-0.2.1/lib/
path_provider_linux:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-2.1.0/lib/
path_provider_platform_interface:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_platform_interface-2.0.1/lib/
path_provider_windows:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-2.0.3/lib/
permission_handler:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/permission_handler-3.3.0/lib/
petitparser:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/petitparser-4.4.0/lib/
platform:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-3.0.2/lib/
plugin_platform_interface:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin_platform_interface-2.0.2/lib/
process:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/process-4.2.4/lib/
provider:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/provider-5.0.0/lib/
qr:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/qr-2.1.0/lib/
qr_flutter:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/qr_flutter-4.0.0/lib/
quiver:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-3.0.1+1/lib/
shared_preferences:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-2.0.8/lib/
shared_preferences_linux:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-2.0.2/lib/
shared_preferences_macos:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-2.0.2/lib/
@@ -57,8 +77,22 @@
term_glyph:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.2.0/lib/
test_api:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.4.2/lib/
transformer_page_view:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.6/lib/
tuple:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/tuple-2.0.0/lib/
typed_data:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.3.0/lib/
vector_math:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.1.0/lib/
video_player:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/video_player-2.2.6/lib/
video_player_platform_interface:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/video_player_platform_interface-4.2.0/lib/
video_player_web:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/video_player_web-2.0.4/lib/
wakelock:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/wakelock-0.5.6/lib/
wakelock_macos:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/wakelock_macos-0.4.0/lib/
wakelock_platform_interface:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/wakelock_platform_interface-0.3.0/lib/
wakelock_web:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/wakelock_web-0.4.0/lib/
wakelock_windows:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/wakelock_windows-0.2.0/lib/
webview_flutter:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-2.1.2/lib/
webview_flutter_android:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter_android-2.2.0/lib/
webview_flutter_platform_interface:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter_platform_interface-1.3.0/lib/
webview_flutter_wkwebview:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter_wkwebview-2.2.0/lib/
win32:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/win32-2.2.10/lib/
xdg_directories:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/xdg_directories-0.2.0/lib/
xml:file:///D:/Program%20Files/flutter_windows_2.5.3-stable/flutter/.pub-cache/hosted/pub.flutter-io.cn/xml-5.3.1/lib/
location:lib/
android/app/build.gradle
@@ -47,8 +47,9 @@
    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        multiDexEnabled true
        applicationId "com.yeshi.location"
        minSdkVersion 16
        minSdkVersion 19
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
@@ -76,4 +77,10 @@
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:multidex:1.0.3'
/*    //穿山甲
    implementation 'com.pangle.cn:ads-sdk-pro:4.0.1.1'
    //广点通
    implementation 'com.qq.e.union:union:4.422.1292'*/
}
android/app/src/main/AndroidManifest.xml
@@ -1,6 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.location">
    <uses-permission android:name="android.permission.INTERNET"/>
   <application
       android:usesCleartextTraffic="true"
       tools:replace="android:label"
       android:name="com.yeshi.location.MyApplication"
        android:label="location"
        android:icon="@mipmap/ic_launcher">
android/app/src/main/java/com/yeshi/location/MainActivity.java
New file
@@ -0,0 +1,8 @@
package com.yeshi.location;
import io.flutter.embedding.android.FlutterActivity;
class MainActivity extends FlutterActivity {
}
android/build.gradle
@@ -8,6 +8,7 @@
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
assets/images/common/ic_permission_notify_top.png
assets/images/common/icon_ask.png
assets/images/common/icon_calendar.png
assets/images/common/icon_date_start_end.png
assets/images/common/icon_date_start_end_small.png
assets/images/common/icon_delete.png
assets/images/common/icon_edit.png
assets/images/common/icon_permission_notify_location.png
assets/images/common/icon_permission_notify_phone.png
assets/images/common/icon_share.png
assets/images/common/icon_share_qq.png
assets/images/common/icon_share_sina.png
assets/images/common/icon_share_wx.png
assets/images/common/icon_sos.png
assets/images/common/icon_sos_back.png
assets/images/common/icon_travel.png
assets/images/ic_splash.png
assets/images/login/ic_login_logo.png
assets/images/login/ic_login_onekey.png
assets/images/login/ic_login_phone.png
assets/images/login/ic_login_qq.png
assets/images/login/ic_login_wx.png
assets/images/login/icon_code.png
assets/images/login/icon_phone.png
assets/images/map/icon_location_back.png
assets/images/map/icon_location_location.png
assets/images/map/icon_location_position_input.png
assets/images/map/icon_location_search_type_eat.png
assets/images/map/icon_location_search_type_hotel.png
assets/images/map/icon_location_search_type_movie.png
assets/images/map/icon_location_search_type_sense.png
assets/images/map/icon_location_search_type_waimai.png
lib/generated_plugin_registrant.dart
@@ -7,6 +7,8 @@
import 'package:fluttertoast/fluttertoast_web.dart';
import 'package:shared_preferences_web/shared_preferences_web.dart';
import 'package:video_player_web/video_player_web.dart';
import 'package:wakelock_web/wakelock_web.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
@@ -14,5 +16,7 @@
void registerPlugins(Registrar registrar) {
  FluttertoastWebPlugin.registerWith(registrar);
  SharedPreferencesPlugin.registerWith(registrar);
  VideoPlayerPlugin.registerWith(registrar);
  WakelockWeb.registerWith(registrar);
  registrar.registerMessageHandler();
}
lib/main.dart
@@ -5,8 +5,10 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
import 'package:location/ui/main/location.dart';
import 'package:location/ui/mine/advice.dart';
import 'package:location/ui/mine/permission.dart';
import 'package:location/utils/ui_constant.dart';
import 'ui/main/mine.dart';
@@ -85,7 +87,7 @@
    print("initState");
    _pages
      ..add(AdvicePage(title: "建议"))
      ..add(PermissionPage(title: "权限"))
      ..add(LocationPage(title: "定位"))
      ..add(MinePage(title: "我的"));
    super.initState();
@@ -227,7 +229,7 @@
              style: TextStyle(
                  fontSize: 15,
                  color: selectIndex == index
                      ? Color(0xFF0E95FE)
                      ? ColorConstant.theme
                      : Color(0xFF9DAAB3)),
            )
          ],
@@ -247,7 +249,7 @@
          width: 54,
          height: 54,
          decoration: BoxDecoration(
              color: selectIndex == 1 ? Color(0xFF0E95FE) : Color(0xFF9DAAB3),
              color: selectIndex == 1 ? ColorConstant.theme : Color(0xFF9DAAB3),
              borderRadius: BorderRadius.circular(27),
              boxShadow: selectIndex == 1
                  ? [
lib/ui/common/browser.dart
New file
@@ -0,0 +1,84 @@
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:location/ui/widget/nav.dart';
import 'package:location/utils/jsinterface.dart';
import 'package:webview_flutter/webview_flutter.dart';
class BrowserPage extends StatefulWidget {
  BrowserPage({Key? key, required this.title}) : super(key: key);
  final String title;
  @override
  _BrowserPageState createState() => _BrowserPageState();
}
class _BrowserPageState extends State<BrowserPage>
    with SingleTickerProviderStateMixin {
  String title = "";
  double progress = 0;
  @override
  void initState() {
    super.initState();
    if (Platform.isAndroid) {
      WebView.platform = SurfaceAndroidWebView();
    }
  }
  WebViewController? _webViewController;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.white,
        body: Flex(
          direction: Axis.vertical,
          children: [
            TopNavBar(title: title),
            SizedBox(
              height: 1,
              child: LinearProgressIndicator(
                backgroundColor: Colors.white,
                valueColor: AlwaysStoppedAnimation(Color(0xFF0E96FF)),
                value: progress,
              ),
            ),
            Expanded(
                child: WebView(
                  //http://192.168.3.122:8848/test/JsTest.html
              initialUrl: 'http://192.168.3.122:8848/test/JsTest.html',
              onWebViewCreated: (WebViewController webViewController){
                _webViewController=webViewController;
              },
              javascriptMode: JavascriptMode.unrestricted,
              javascriptChannels: JavascriptInterface(context,_webViewController).getInterfaces(),
              navigationDelegate: (NavigationRequest request) {
                print("链接:${request.url}");
                if (!request.url.startsWith("http")) {
                  return NavigationDecision.prevent;
                }
                return NavigationDecision.navigate;
              },
              onPageStarted: (url) {
                print("process:onPageStarted-$url");
              },
              onPageFinished: (url) {
                print("process:onPageFinished-$url");
              },
              onProgress: (int process) {
                print("process:$process");
                setState(() {
                  if (process == 100) {
                    progress = 0;
                  } else {
                    progress = process / 100.0;
                  }
                });
              },
            ))
          ],
        ));
  }
}
lib/ui/main/location.dart
@@ -4,12 +4,19 @@
import 'package:flutter/material.dart';
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart';
import 'package:flutter_baidu_mapapi_search/flutter_baidu_mapapi_search.dart';
import 'package:location/ui/mine/advice.dart';
import 'package:location/ui/mine/permission.dart';
import 'package:location/ui/mine/settings.dart';
import 'package:location/ui/mine/share_to_friends.dart';
import 'package:location/ui/mine/try_functions.dart';
import 'package:location/ui/widget/button.dart';
import 'package:location/utils/pageutils.dart';
import 'package:location/utils/ui_constant.dart';
typedef OnPositionHiidenChange = void Function(bool hidden);
BMFMapController? _mapController;
class MyApp extends StatelessWidget {
  // This widget is the root of your application.
@@ -52,13 +59,14 @@
}
class _LocationPageState extends State<LocationPage>
    with SingleTickerProviderStateMixin {
  //位置信息是否隐藏
  bool locationInfoHidden = true;
    with AutomaticKeepAliveClientMixin  {
  BMFMapOptions mapOptions = BMFMapOptions(
      showMapScaleBar: false,
      mapType: BMFMapType.Standard,
      center: BMFCoordinate(39.917215, 116.380341),
      mapScaleBarPosition: BMFPoint(0, 200),
      zoomLevel: 12,
      mapPadding: BMFEdgeInsets(left: 30, top: 0, right: 30, bottom: 0));
      mapPadding: BMFEdgeInsets(left: 30, top: 0, right: 30, bottom: 200));
  @override
  void initState() {
@@ -68,179 +76,16 @@
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        resizeToAvoidBottomInset: false,
        backgroundColor: Colors.white,
        body: Stack(
          children: [
            getMapView(),
            Container(
                padding: const EdgeInsets.fromLTRB(10, 35, 10, 0),
                child: Flex(direction: Axis.vertical, children: [
                  //----------搜索框--------
                  Flex(
                    direction: Axis.horizontal,
                    children: [
                      Expanded(
                          child: InkWell(
                              onTap: () {
                                print("跳转定位");
                              },
                              child: Container(
                                alignment: Alignment.center,
                                padding: EdgeInsets.fromLTRB(13, 0, 13, 0),
                                height: 45,
                                decoration: BoxDecoration(
                                    color: Colors.white,
                                    borderRadius: BorderRadius.circular(10),
                                    boxShadow: getViewShadow()),
                                child: Flex(
                                  direction: Axis.horizontal,
                                  children: [
                                    Image.asset(
                                      "assets/images/main/icon_location_search.png",
                                      height: 19,
                                    ),
                                    Container(
                                      width: 10,
                                    ),
                                    const Expanded(
                                        child: Text("地图上找位置",
                                            style: TextStyle(
                                                fontSize: 14,
                                                color: Color(0xFFC4CDD1))))
                                  ],
                                ),
                              ))),
                      InkWell(
                          onTap: () {
                            print("sos");
                          },
                          child: Container(
                            width: 45,
                            height: 45,
                            margin: const EdgeInsets.only(left: 8.5),
                            decoration: BoxDecoration(
                                color: Colors.white,
                                boxShadow: getViewShadow(),
                                borderRadius: BorderRadius.circular(23)),
                            alignment: Alignment.center,
                            child: Image.asset(
                              "assets/images/main/icon_location_sos.png",
                              height: 35,
                            ),
                          ))
                    ],
                  ),
                  //---------个人信息与定位信息---
                  Container(
                      height: 400,
                      child: Stack(
                        children: [
                          //位置信息
                          getPositionInfoView(),
                          //个人信息
                          Container(
                            height: 100,
                            margin: EdgeInsets.only(top: 10),
                            padding:
                                EdgeInsets.only(left: 15, top: 8, right: 15),
                            decoration: BoxDecoration(
                                borderRadius: BorderRadius.only(
                                    bottomLeft: Radius.circular(
                                        locationInfoHidden ? 10 : 0),
                                    bottomRight: Radius.circular(
                                        locationInfoHidden ? 10 : 0),
                                    topLeft: Radius.circular(10),
                                    topRight: Radius.circular(10)),
                                color: Colors.white,
                                boxShadow: getViewShadow()),
                            child: Stack(
                              alignment: Alignment.topCenter,
                              children: [
                                Flex(
                                  mainAxisAlignment: MainAxisAlignment.center,
                                  direction: Axis.horizontal,
                                  children: [
                                    Image.asset(
                                      "assets/images/main/icon_location_change_person.png",
                                      width: 13,
                                    ),
                                    Text(
                                      " 切换实时定位人",
                                      style: TextStyle(
                                          color: Color(0xFF0E95FE),
                                          fontSize: 15),
                                    )
                                  ],
                                ),
                                //个人信息
                                Flex(direction: Axis.horizontal,children: [],)
                              ],
                            ),
                          ),
                          //更多
                          Positioned(
                              left: MediaQuery.of(context).size.width / 2 -
                                  10 -
                                  70 / 2,
                              top: 80,
                              child: InkWell(
                                  onTap: () {
                                    setState(() {
                                      locationInfoHidden = !locationInfoHidden;
                                    });
                                  },
                                  child: Container(
                                      width: 70,
                                      height: 40,
                                      child: Stack(
                                          alignment: Alignment.bottomCenter,
                                          children: [
                                            Container(
                                              height: 30,
                                              width: 60,
                                              margin: EdgeInsets.only(top: 0),
                                              alignment: Alignment.center,
                                              decoration: BoxDecoration(
                                                  color: Colors.white,
                                                  borderRadius:
                                                      BorderRadius.circular(15),
                                                  boxShadow: getViewShadow()),
                                            ),
                                            Positioned(
                                                top: 0,
                                                child: Container(
                                                  height: 25,
                                                  width: 70,
                                                  alignment:
                                                      Alignment.bottomCenter,
                                                  decoration: BoxDecoration(
                                                    color: Colors.white,
                                                  ),
                                                  // child: Text(
                                                  //   "收起",
                                                  //   style: TextStyle(
                                                  //       color: Color(0xFF0E95FE),
                                                  //       fontSize: 11),
                                                  // )
                                                )),
                                            Positioned(
                                                bottom: 5,
                                                child: Text(
                                                  locationInfoHidden
                                                      ? "展开"
                                                      : "收起",
                                                  style: TextStyle(
                                                      color: Color(0xFF0E95FE),
                                                      fontSize: 11),
                                                )),
                                          ]))))
                        ],
                      )),
                ])),
            // PositionInfoPage((bool hiiden) {
            //
            //
            // }),
            LocationSearchPage(),
            Align(
                alignment: Alignment.bottomCenter,
                child: getAddLocationObjectView()),
@@ -248,7 +93,325 @@
        ));
  }
  Widget getPositionInfoView() {
  //控件阴影
  List<BoxShadow> getViewShadow() {
    return [
      BoxShadow(
        blurRadius: 6.5,
        spreadRadius: 1,
        color: Color(0x4D0E96FF),
      )
    ];
  }
  //获取地图视图
  Widget getMapView() {
    return Container(
      child: BMFMapWidget(
        onBMFMapCreated: (controller) {
          // onBMFMapCreated(controller);
          _mapController = controller;
        },
        mapOptions: mapOptions,
      ),
    );
  }
  //添加想定位的人
  Widget getAddLocationObjectView() {
    return Container(
      alignment: Alignment.topCenter,
      height: 72,
      margin: const EdgeInsets.fromLTRB(10, 0, 10, 0),
      padding: const EdgeInsets.fromLTRB(0, 18, 0, 0),
      decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.only(
              topLeft: Radius.circular(10), topRight: Radius.circular(10)),
          boxShadow: getViewShadow()),
      child: Flex(
        direction: Axis.horizontal,
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Image.asset(
            "assets/images/common/icon_person.png",
            height: 17,
          ),
          Container(
            width: 11,
            height: 1,
          ),
          const Text(
            "添加想定位的对象",
            style: TextStyle(color: ColorConstant.theme, fontSize: 15),
          )
        ],
      ),
    );
  }
  @override
  bool get wantKeepAlive => true;
}
//控件阴影
List<BoxShadow> getViewShadow() {
  return [
    BoxShadow(
      blurRadius: 6.5,
      spreadRadius: 1,
      color: Color(0x4D0E96FF),
    )
  ];
}
/*****************定位信息****************/
class PositionInfoPage extends StatefulWidget {
  PositionInfoPage({Key? key}) : super(key: key);
  @override
  _PositionInfoPageState createState() => _PositionInfoPageState();
}
class _PositionInfoPageState extends State<PositionInfoPage>
    with SingleTickerProviderStateMixin {
  //位置信息是否隐藏
  bool locationInfoHidden = true;
  @override
  Widget build(BuildContext context) {
    return Container(
        padding: const EdgeInsets.fromLTRB(10, 35, 10, 0),
        child: Flex(direction: Axis.vertical, children: [
          //----------搜索框--------
          Flex(
            direction: Axis.horizontal,
            children: [
              Expanded(
                  child: InkWell(
                      onTap: () {
                        print("跳转定位");
                      },
                      child: Container(
                        alignment: Alignment.center,
                        padding: EdgeInsets.fromLTRB(13, 0, 13, 0),
                        height: 45,
                        decoration: BoxDecoration(
                            color: Colors.white,
                            borderRadius: BorderRadius.circular(10),
                            boxShadow: getViewShadow()),
                        child: Flex(
                          direction: Axis.horizontal,
                          children: [
                            Image.asset(
                              "assets/images/main/icon_location_search.png",
                              height: 19,
                            ),
                            Container(
                              width: 10,
                            ),
                            const Expanded(
                                child: Text("地图上找位置",
                                    style: TextStyle(
                                        fontSize: 14,
                                        color: Color(0xFFC4CDD1))))
                          ],
                        ),
                      ))),
              InkWell(
                  onTap: () {
                    print("sos");
                  },
                  child: Container(
                    width: 45,
                    height: 45,
                    margin: const EdgeInsets.only(left: 8.5),
                    decoration: BoxDecoration(
                        color: Colors.white,
                        boxShadow: getViewShadow(),
                        borderRadius: BorderRadius.circular(23)),
                    alignment: Alignment.center,
                    child: Image.asset(
                      "assets/images/main/icon_location_sos.png",
                      height: 35,
                    ),
                  ))
            ],
          ),
          //---------个人信息与定位信息---
          Container(
              height: 400,
              child: Stack(
                children: [
                  //位置信息
                  getPositionInfoView(context),
                  //个人信息
                  Container(
                    height: 100,
                    margin: EdgeInsets.only(top: 10),
                    padding: EdgeInsets.only(left: 15, top: 8, right: 15),
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.only(
                            bottomLeft:
                                Radius.circular(locationInfoHidden ? 10 : 0),
                            bottomRight:
                                Radius.circular(locationInfoHidden ? 10 : 0),
                            topLeft: Radius.circular(10),
                            topRight: Radius.circular(10)),
                        color: Colors.white,
                        boxShadow: getViewShadow()),
                    child: Stack(
                      alignment: Alignment.topCenter,
                      children: [
                        Flex(
                          mainAxisAlignment: MainAxisAlignment.center,
                          direction: Axis.horizontal,
                          children: [
                            Image.asset(
                              "assets/images/main/icon_location_change_person.png",
                              width: 13,
                            ),
                            Text(
                              " 切换实时定位人",
                              style: TextStyle(
                                  color:ColorConstant.theme, fontSize: 15),
                            )
                          ],
                        ),
                        //个人信息
                        Flex(
                          direction: Axis.horizontal,
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            Image.asset(
                              "assets/images/mine/icon_mine_default_portrait.png",
                              height: 33,
                              width: 33,
                            ),
                            Container(
                              width: 5,
                            ),
                            Expanded(
                                child: Flex(
                              direction: Axis.vertical,
                              mainAxisAlignment: MainAxisAlignment.center,
                              crossAxisAlignment: CrossAxisAlignment.start,
                              children: [
                                Text(
                                  "我自己",
                                  softWrap: false,
                                  overflow: TextOverflow.ellipsis,
                                  style: TextStyle(
                                      color: Color(0xFFA0A0A0), fontSize: 18),
                                ),
                                Container(
                                  height: 2,
                                ),
                                Text(
                                  "ID:128312",
                                  style: TextStyle(
                                      color: Color(0xFFA0A0A0), fontSize: 12),
                                )
                              ],
                            )),
                            Container(
                              width: 5,
                            ),
                            Flex(
                                direction: Axis.vertical,
                                mainAxisAlignment: MainAxisAlignment.center,
                                children: [
                                  MyOutlineButton(
                                    "生成轨迹",
                                    13,
                                    height: 26,
                                    width: 82,
                                    fontSize: 12,
                                    onClick: () {
                                      print("生成轨迹");
                                    },
                                  ),
                                  Container(
                                    height: 6,
                                  ),
                                  MyOutlineButton(
                                    "实时共享",
                                    13,
                                    height: 26,
                                    width: 82,
                                    fontSize: 12,
                                    onClick: () {
                                      print("实时共享");
                                    },
                                  ),
                                ])
                          ],
                        )
                      ],
                    ),
                  ),
                  //更多
                  Positioned(
                      left: MediaQuery.of(context).size.width / 2 - 10 - 70 / 2,
                      top: 80,
                      child: InkWell(
                          onTap: () {
                            setState(() {
                              locationInfoHidden = !locationInfoHidden;
                            });
                          },
                          child: Container(
                              width: 70,
                              height: 40,
                              child: Stack(
                                  alignment: Alignment.bottomCenter,
                                  children: [
                                    Container(
                                      height: 30,
                                      width: 60,
                                      margin: EdgeInsets.only(top: 0),
                                      alignment: Alignment.center,
                                      decoration: BoxDecoration(
                                          color: Colors.white,
                                          borderRadius:
                                              BorderRadius.circular(15),
                                          boxShadow: getViewShadow()),
                                    ),
                                    Positioned(
                                        top: 0,
                                        child: Container(
                                          height: 25,
                                          width: 70,
                                          alignment: Alignment.bottomCenter,
                                          decoration: BoxDecoration(
                                            color: Colors.white,
                                          ),
                                          // child: Text(
                                          //   "收起",
                                          //   style: TextStyle(
                                          //       color: ColorConstant.theme,
                                          //       fontSize: 11),
                                          // )
                                        )),
                                    Positioned(
                                        bottom: 5,
                                        child: Text(
                                          locationInfoHidden ? "展开" : "收起",
                                          style: TextStyle(
                                              color:ColorConstant.theme,
                                              fontSize: 11),
                                        )),
                                  ]))))
                ],
              )),
        ]));
  }
  Widget getPositionInfoView(BuildContext context) {
    if (!locationInfoHidden) {
      return Positioned(
          top: 110,
@@ -355,61 +518,318 @@
      return Container();
    }
  }
}
  //控件阴影
  List<BoxShadow> getViewShadow() {
    return [
      BoxShadow(
        blurRadius: 6.5,
        spreadRadius: 1,
        color: Color(0x4D0E96FF),
      )
    ];
/********************POI搜索********************/
class LocationSearchPage extends StatefulWidget {
  @override
  _LocationSearchPageState createState() => _LocationSearchPageState();
}
class _LocationSearchPageState extends State<LocationSearchPage>
    with SingleTickerProviderStateMixin {
  //1-搜索页面  2-建议搜索页面 3-结果展示页面
  int state = 1;
  TextEditingController? editingController;
  @override
  void initState() {
    super.initState();
    editingController = TextEditingController();
  }
  //获取地图视图
  Widget getMapView() {
    return Container(
      child: BMFMapWidget(
        onBMFMapCreated: (controller) {
          // onBMFMapCreated(controller);
        },
        mapOptions: mapOptions,
  @override
  Widget build(BuildContext context) {
    return Flex(direction: Axis.vertical, children: [
      //搜索框
      Container(
        margin: EdgeInsets.fromLTRB(10, 35, 10, 11),
        alignment: Alignment.center,
        padding: EdgeInsets.fromLTRB(8, 0, 8, 0),
        height: 45,
        decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.circular(10),
            boxShadow: getViewShadow()),
        child: Flex(
          direction: Axis.horizontal,
          children: [
            Image.asset(
              "assets/images/map/icon_location_back.png",
              height: 30,
            ),
            Container(
              width: 10,
            ),
            Expanded(
                child: TextField(
              controller: editingController,
              onChanged: (text) {
                print(text);
                setState(() {
                  if (text.isNotEmpty)
                    state = 2;
                  else
                    state = 1;
                });
              },
              decoration: const InputDecoration(
                  focusedBorder: InputBorder.none,
                  border: InputBorder.none,
                  hintText: "地图上找位置",
                  hintStyle: TextStyle(fontSize: 14, color: Color(0xFFC4CDD1))),
            )),
            InkWell(
              child: Container(
                  padding: EdgeInsets.only(right: 10),
                  child: Text(
                    "搜索",
                    style: TextStyle(color: ColorConstant.theme, fontSize: 15),
                  )),
            )
          ],
        ),
      ),
      Expanded(child: getContentView())
    ]);
  }
  Widget getContentView() {
    if (state == 1)
      return getNotSearchView();
    else if (state == 2) {
      return getSearchSuggestView();
    } else
      return Container();
  }
  Widget getNotSearchView() {
    return Column(
      children: [
        Container(
          padding: EdgeInsets.only(left: 7, right: 7, bottom: 7, top: 7),
          decoration: BoxDecoration(
            color: Colors.white,
            borderRadius: BorderRadius.only(
                topRight: Radius.circular(15), topLeft: Radius.circular(15)),
            boxShadow: getViewShadow(),
          ),
          child: Column(mainAxisSize: MainAxisSize.min, children: [
            //分类
            Container(
                padding:
                    EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 9),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    getSugguestSearchType(
                        "酒店",
                        Image.asset(
                          "assets/images/map/icon_location_search_type_hotel.png",
                          height: 34,
                        ), () {
                      setSearchKey("酒店");
                    }),
                    getSugguestSearchType(
                        "餐馆",
                        Image.asset(
                          "assets/images/map/icon_location_search_type_eat.png",
                          height: 34,
                        ), () {
                      setSearchKey("餐馆");
                    }),
                    getSugguestSearchType(
                        "外卖",
                        Image.asset(
                          "assets/images/map/icon_location_search_type_waimai.png",
                          height: 34,
                        ), () {
                      setSearchKey("外卖");
                    }),
                    getSugguestSearchType(
                        "电影院",
                        Image.asset(
                          "assets/images/map/icon_location_search_type_movie.png",
                          height: 34,
                        ), () {
                      setSearchKey("电影院");
                    }),
                    getSugguestSearchType(
                        "景点",
                        Image.asset(
                          "assets/images/map/icon_location_search_type_sense.png",
                          height: 34,
                        ), () {
                      setSearchKey("景点");
                    }),
                  ],
                )),
            //广告
            Container(
              height: 210,
            ),
          ]),
        ),
        //分隔线
        Container(
          height: 10,
          color: Color(0xFFF0F0F0),
        ),
        Expanded(
            child: Container(
          color: Colors.white,
          padding: EdgeInsets.only(left: 20, right: 20),
          child: Column(
            children: [getHistoryItem("融恒盈嘉中心-西门", "重庆市江北区", 0)],
          ),
        ))
      ],
    );
  }
  //添加想定位的人
  Widget getAddLocationObjectView() {
  setSearchKey(String key) {
    editingController!.text = key;
    editingController!.selection = TextSelection(
        baseOffset: key.length, extentOffset: editingController!.text.length);
    startPOISearch(key);
  }
  startPOISearch(String key) async {
    BMFPoiNearbySearchOption poiNearbySearchOption = BMFPoiNearbySearchOption(
        keywords: <String>[key],
        location: BMFCoordinate(40.049557, 116.279295),
        isRadiusLimit: false);
// 检索实例
    BMFPoiNearbySearch nearbySearch = BMFPoiNearbySearch();
// 检索回调
    nearbySearch.onGetPoiNearbySearchResult(
        callback: (BMFPoiSearchResult result, BMFSearchErrorCode errorCode) {
      print("poi周边检索回调 errorCode = ${errorCode}  result = ${result.toMap()}");
      // 解析reslut,具体参考demo
    });
// 发起检索
    bool flag = await nearbySearch.poiNearbySearch(poiNearbySearchOption);
  }
  //建议搜索视图
  Widget getSearchSuggestView() {
    return Container(
      alignment: Alignment.topCenter,
      height: 72,
      margin: const EdgeInsets.fromLTRB(10, 0, 10, 0),
      padding: const EdgeInsets.fromLTRB(0, 18, 0, 0),
      decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.only(
              topLeft: Radius.circular(10), topRight: Radius.circular(10)),
              topLeft: Radius.circular(15), topRight: Radius.circular(15)),
          boxShadow: getViewShadow()),
      child: Flex(
        direction: Axis.horizontal,
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
      padding: EdgeInsets.fromLTRB(20, 0, 20, 0),
      child: ListView(
        padding: const EdgeInsets.all(0),
        children: [
          Image.asset(
            "assets/images/common/icon_person.png",
            height: 17,
          ),
          Container(
            width: 11,
            height: 1,
          ),
          const Text(
            "添加想定位的对象",
            style: TextStyle(color: Color(0xFF0E95FE), fontSize: 15),
          )
          getHistoryItem("标题", "内容", 0),
          getHistoryItem("标题", "内容", 1),
          getHistoryItem("标题", "内容", 2),
          getHistoryItem("标题", "内容", 3),
          getHistoryItem("标题", "内容", 4),
          getHistoryItem("标题", "内容", 5),
          getHistoryItem("标题", "内容", 6),
          getHistoryItem("标题", "内容", 7),
          getHistoryItem("标题", "内容", 8),
          getHistoryItem("标题", "内容", 9),
        ],
      ),
    );
  }
  //历史记录项目
  Widget getHistoryItem(String title, String content, int index) {
    return InkWell(
        onTap: () {
          print("点击:$index");
        },
        child: Container(
          height: 67,
          decoration: BoxDecoration(
              color: Colors.white,
              border: const Border(
                  bottom: BorderSide(
                      // 设置单侧边框的样式
                      color: Color(0xFFF1F2F3),
                      width: 1,
                      style: BorderStyle.solid))),
          child: Row(
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Container(
                  padding: EdgeInsets.only(top: 12, right: 9),
                  alignment: Alignment.topCenter,
                  child: Image.asset(
                    "assets/images/map/icon_location_location.png",
                    height: 16,
                  )),
              Expanded(
                  child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text(
                    title,
                    softWrap: false,
                    overflow: TextOverflow.ellipsis,
                    style:
                        const TextStyle(color: Color(0xFF333333), fontSize: 13),
                  ),
                  Container(
                    height: 5,
                  ),
                  Text(
                    content,
                    style:
                        const TextStyle(color: Color(0xFF9DAAB3), fontSize: 11),
                  ),
                ],
              )),
              Image.asset(
                "assets/images/map/icon_location_position_input.png",
                height: 20,
              )
            ],
          ),
        ));
  }
  Widget getSugguestSearchType(
      String title, Image icon, GestureTapCallback _onClick) {
    return InkWell(
        onTap: () {
          _onClick();
        },
        child: Flex(
          direction: Axis.vertical,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            icon,
            Container(
              height: 5,
            ),
            Text(
              title,
              style: const TextStyle(color: Color(0xFF333333), fontSize: 11),
            )
          ],
        ));
  }
}
/********************位置详情********************/
class PositionDetailPage extends StatefulWidget {
  @override
  _PositionDetailPageState createState() => _PositionDetailPageState();
}
class _PositionDetailPageState extends State<PositionDetailPage>
    with SingleTickerProviderStateMixin {
  @override
  Widget build(BuildContext context) {
    return Container();
  }
}
lib/ui/main/main.dart
@@ -6,6 +6,7 @@
import 'package:flutter/services.dart';
import 'package:location/ui/mine/advice.dart';
import 'package:location/ui/mine/permission.dart';
import 'package:location/utils/ui_constant.dart';
import 'location.dart';
import 'mine.dart';
@@ -195,7 +196,9 @@
                  )))
            ],
          ),
        ));
        ),
    );
  }
  Widget getNavItem(
@@ -219,7 +222,7 @@
              style: TextStyle(
                  fontSize: 15,
                  color: selectIndex == index
                      ? Color(0xFF0E95FE)
                      ? ColorConstant.theme
                      : Color(0xFF9DAAB3)),
            )
          ],
@@ -239,7 +242,7 @@
          width: 54,
          height: 54,
          decoration: BoxDecoration(
              color: selectIndex == 1 ? Color(0xFF0E95FE) : Color(0xFF9DAAB3),
              color: selectIndex == 1 ? ColorConstant.theme : Color(0xFF9DAAB3),
              borderRadius: BorderRadius.circular(27),
              boxShadow: selectIndex == 1
                  ? [
lib/ui/main/mine.dart
@@ -2,13 +2,14 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:location/ui/common/browser.dart';
import 'package:location/ui/mine/advice.dart';
import 'package:location/ui/mine/permission.dart';
import 'package:location/ui/mine/settings.dart';
import 'package:location/ui/mine/share_to_friends.dart';
import 'package:location/ui/mine/try_functions.dart';
import 'package:location/utils/pageutils.dart';
import 'package:location/utils/ui_constant.dart';
void main() {
  runApp(MyApp());
@@ -97,6 +98,7 @@
        Navigator.of(context).push(CustomRouteSlide(AdvicePage(title: "")));
        break;
      case "protocol":
        Navigator.of(context).push(CustomRouteSlide(BrowserPage(title: "")));
        break;
      case "privacy":
        break;
@@ -116,7 +118,7 @@
            Container(
                child: Text(
                  item.name,
                  style: new TextStyle(color: const Color(0xFF0E95FE)),
                  style: new TextStyle(color:ColorConstant.theme),
                ),
                margin: const EdgeInsets.fromLTRB(0, 13, 0, 0))
          ],
lib/ui/map/travel.dart
New file
@@ -0,0 +1,702 @@
import 'dart:async';
import 'dart:io';
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_baidu_mapapi_base/flutter_baidu_mapapi_base.dart';
import 'package:flutter_baidu_mapapi_map/flutter_baidu_mapapi_map.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
import 'package:location/main.dart';
import 'package:location/ui/sos/sos_contacts.dart';
import 'package:location/ui/widget/button.dart';
import 'package:location/ui/widget/dialog.dart';
import 'package:location/ui/widget/nav.dart';
import 'package:location/utils/pageutils.dart';
import 'package:location/utils/ui_constant.dart';
import 'package:qr_flutter/qr_flutter.dart';
class MyTravelPage extends StatefulWidget {
  MyTravelPage({Key? key, required this.title}) : super(key: key);
  final String title;
  @override
  _MyTravelPageState createState() => _MyTravelPageState();
}
class _MyTravelPageState extends State<MyTravelPage>
    with SingleTickerProviderStateMixin {
  DateTime? startDate;
  DateTime? endDate;
  @override
  void initState() {
    super.initState();
    startDate = DateTime(2021, 10, 31, 13, 5, 50);
    endDate = DateTime(2021, 11, 2, 13, 5, 50);
  }
  @override
  void dispose() {
    super.dispose();
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.white,
        body: Container(
          child: Column(
            children: [
              TopNavBar(title: "我的轨迹"),
              //日期选择
              Container(
                padding: EdgeInsets.fromLTRB(10, 8, 10, 8),
                child: Row(
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: [
                    Image.asset(
                      "assets/images/common/icon_calendar.png",
                      height: 24.5,
                    ),
                    Container(
                      width: 9,
                    ),
                    Expanded(
                        child: Container(
                      height: 84,
                      padding: EdgeInsets.fromLTRB(16, 0, 16, 0),
                      decoration: BoxDecoration(
                          color: Color(0xFFF0F0F0),
                          borderRadius: BorderRadius.circular(10)),
                      child: Row(
                        children: [
                          Image.asset(
                            "assets/images/common/icon_date_start_end.png",
                            height: 54,
                          ),
                          Container(
                            width: 14.5,
                          ),
                          Expanded(
                              child: Column(
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: [
                              Container(
                                  padding: EdgeInsets.only(left: 30, right: 16),
                                  child: Row(
                                    mainAxisAlignment:
                                        MainAxisAlignment.spaceBetween,
                                    children: [
                                      InkWell(
                                        onTap: () {
                                          showDatePicker(startDate, (date) {
                                            setState(() {
                                              startDate = DateTime(
                                                  date.year,
                                                  date.month,
                                                  date.day,
                                                  startDate!.hour,
                                                  startDate!.minute,
                                                  startDate!.second);
                                            });
                                          });
                                        },
                                        child: Text(
                                          "${startDate!.year.toString()}.${startDate!.month.toString().padLeft(2, '0')}.${startDate!.day.toString().padLeft(2, '0')}",
                                          style: getDateStyle(),
                                        ),
                                      ),
                                      InkWell(
                                        onTap: () {
                                          showTimePicker(startDate, (date) {
                                            setState(() {
                                              startDate = DateTime(
                                                  startDate!.year,
                                                  startDate!.month,
                                                  startDate!.day,
                                                  date.hour,
                                                  date.minute,
                                                  date.second);
                                            });
                                          });
                                        },
                                        child: Text(
                                          "${startDate!.hour.toString().padLeft(2, '0')}:${startDate!.minute.toString().padLeft(2, '0')}:${startDate!.second.toString().padLeft(2, '0')}",
                                          style: getDateStyle(),
                                        ),
                                      )
                                    ],
                                  )),
                              Container(
                                margin: EdgeInsets.fromLTRB(0, 8, 0, 8),
                                height: 1,
                                color: Color(0xFFCED4D9),
                              ),
                              Container(
                                  padding: EdgeInsets.only(left: 30, right: 16),
                                  child: Row(
                                    mainAxisAlignment:
                                        MainAxisAlignment.spaceBetween,
                                    children: [
                                      InkWell(
                                        onTap: () {
                                          showDatePicker(endDate, (date) {
                                            setState(() {
                                              endDate = DateTime(
                                                  date.year,
                                                  date.month,
                                                  date.day,
                                                  endDate!.hour,
                                                  endDate!.minute,
                                                  endDate!.second);
                                            });
                                          });
                                        },
                                        child: Text(
                                          "${endDate!.year.toString()}.${endDate!.month.toString().padLeft(2, '0')}.${endDate!.day.toString().padLeft(2, '0')}",
                                          style: getDateStyle(),
                                        ),
                                      ),
                                      InkWell(
                                        onTap: () {
                                          showTimePicker(endDate, (date) {
                                            setState(() {
                                              endDate = DateTime(
                                                  endDate!.year,
                                                  endDate!.month,
                                                  endDate!.day,
                                                  date.hour,
                                                  date.minute,
                                                  date.second);
                                            });
                                          });
                                        },
                                        child: Text(
                                          "${endDate!.hour.toString().padLeft(2, '0')}:${endDate!.minute.toString().padLeft(2, '0')}:${endDate!.second.toString().padLeft(2, '0')}",
                                          style: getDateStyle(),
                                        ),
                                      )
                                    ],
                                  )),
                            ],
                          ))
                        ],
                      ),
                    ))
                  ],
                ),
              ),
              Expanded(
                child: Container(
                  color: Color(0xFFB4E4FF),
                  padding: EdgeInsets.fromLTRB(10, 10, 10, 0),
                  child: Stack(
                    children: [
                      Container(
                        decoration: BoxDecoration(
                            color: Colors.white,
                            borderRadius: BorderRadius.only(
                                topLeft: Radius.circular(10),
                                topRight: Radius.circular(10)),
                            boxShadow: getViewShadow()),
                        child: ListView(
                          padding: EdgeInsets.fromLTRB(0, 0, 0, 55),
                          children: [getListViewItem(0), getListViewItem(1)],
                        ),
                      ),
                      Positioned(
                          bottom: 0,
                          left: 0,
                          right: 0,
                          child: InkWell(
                              onTap: () {
                                NavigatorUtil.navigateToNextPage(context,
                                    MaterialPageRoute(builder: (context) {
                                  return MyTravelMapPage(title: "");
                                }), (data) {});
                              },
                              child: Container(
                                alignment: Alignment.center,
                                height: 55,
                                decoration: BoxDecoration(
                                    color: Colors.white,
                                    borderRadius: BorderRadius.only(
                                        topLeft: Radius.circular(10),
                                        topRight: Radius.circular(10)),
                                    boxShadow: getViewShadow()),
                                child: Row(
                                  mainAxisAlignment: MainAxisAlignment.center,
                                  crossAxisAlignment: CrossAxisAlignment.center,
                                  children: [
                                    Image.asset(
                                      "assets/images/common/icon_travel.png",
                                      height: 17.5,
                                    ),
                                    Container(
                                      width: 8,
                                    ),
                                    Text(
                                      "生成轨迹",
                                      style: TextStyle(
                                          color: ColorConstant.theme,
                                          fontSize: 15),
                                    )
                                  ],
                                ),
                              )))
                    ],
                  ),
                ),
              )
            ],
          ),
        ));
  }
  TextStyle getDateStyle() {
    return TextStyle(color: Color(0xFF333333), fontSize: 17);
  }
  showDatePicker(currentDate, DateChangedCallback confim) {
    DatePicker.showDatePicker(context,
        // 是否展示顶部操作按钮
        showTitleActions: true,
        // 最小时间
        minTime: DateTime(2020, 1, 1),
        // 最大时间
        maxTime: DateTime.now(),
        // change事件
        onChanged: (date) {},
        // 确定事件
        onConfirm: (date) {
      confim(date);
    },
        // 当前时间
        currentTime: currentDate,
        // 语言
        locale: LocaleType.zh);
  }
  showTimePicker(currentDate, DateChangedCallback confim) {
    DatePicker.showTimePicker(context,
        // 是否展示顶部操作按钮
        showTitleActions: true,
        // change事件
        onChanged: (date) {},
        // 确定事件
        onConfirm: (date) {
      confim(date);
    },
        // 当前时间
        currentTime: currentDate,
        // 语言
        locale: LocaleType.zh);
  }
  Widget getListViewItem(int index) {
    return Container(
      padding: const EdgeInsets.fromLTRB(18, 18, 18, 9),
      child: Column(
        children: [
          //日期
          Container(
            padding: const EdgeInsets.fromLTRB(12, 5, 12, 5),
            decoration: BoxDecoration(
                color: const Color(0xFFCACDD3),
                borderRadius: BorderRadius.circular(20)),
            child: const Text(
              "2021.08.08 12:00",
              style: TextStyle(color: Colors.white, fontSize: 10),
            ),
          ),
          //地址
          Container(
            height: 2,
          ),
          Flex(
            direction: Axis.horizontal,
            children: [
              Image.asset(
                "assets/images/main/icon_location_position_name.png",
                height: 16,
              ),
              Text(
                " 当前位置:",
                style: TextStyle(color: Color(0xFF999999), fontSize: 12),
              ),
              Expanded(
                  child: Text(
                "重庆市重庆市重庆市重庆市重庆市重庆市重庆市重庆庆市重庆市重庆",
                softWrap: false,
                overflow: TextOverflow.ellipsis,
                style: TextStyle(color: Color(0xFFBABABA), fontSize: 12),
              ))
            ],
          ),
          Container(
            height: 4,
          ),
          Container(
              child: Flex(
            direction: Axis.horizontal,
            children: [
              Image.asset(
                "assets/images/main/icon_location_position_location.png",
                height: 15,
              ),
              Text(
                " 经  纬  度:",
                style: TextStyle(color: Color(0xFF999999), fontSize: 12),
              ),
              Expanded(
                  child: Text(
                "N 41141.1233,W 28741.389",
                softWrap: false,
                overflow: TextOverflow.ellipsis,
                style: TextStyle(color: Color(0xFFBABABA), fontSize: 12),
              ))
            ],
          )),
        ],
      ),
    );
  }
  //控件阴影
  List<BoxShadow> getViewShadow() {
    return [
      BoxShadow(
        blurRadius: 6.5,
        spreadRadius: 1,
        color: Color(0x4D0E96FF),
      )
    ];
  }
}
class MyTravelMapPage extends StatefulWidget {
  MyTravelMapPage({Key? key, required this.title}) : super(key: key);
  final String title;
  @override
  _MyTravelMapPageState createState() => _MyTravelMapPageState();
}
class _MyTravelMapPageState extends State<MyTravelMapPage>
    with SingleTickerProviderStateMixin {
  BMFMapOptions mapOptions = BMFMapOptions(
      showMapScaleBar: false,
      mapType: BMFMapType.Standard,
      center: BMFCoordinate(39.917215, 116.380341),
      mapScaleBarPosition: BMFPoint(0, 200),
      zoomLevel: 12,
      zoomEnabled: false,
      zoomEnabledWithTap: false,
      scrollEnabled: false,
      //不支持手势
      gesturesEnabled: false,
      mapPadding: BMFEdgeInsets(left: 30, top: 0, right: 30, bottom: 0));
  BMFMapController? _mapController;
  AnimationController? controller;
  Animation<double>? animation;
  double? mapWidth;
  double? mapHeight;
  @override
  void initState() {
    super.initState();
    controller = new AnimationController(
        duration: const Duration(milliseconds: 300), vsync: this);
    final CurvedAnimation curve =
        CurvedAnimation(parent: controller!, curve: Curves.easeIn);
    animation = Tween(begin: -165.0, end: 0.0).animate(curve)
      ..addListener(() {
        setState(() {});
      });
  }
  //获取地图视图
  Widget getMapView() {
    return BMFMapWidget(
      onBMFMapCreated: (controller) {
        // onBMFMapCreated(controller);
        _mapController = controller;
      },
      mapOptions: mapOptions,
    );
  }
  @override
  void dispose() {
    super.dispose();
    controller!.dispose();
  }
  @override
  Widget build(BuildContext context) {
    mapWidth = MediaQuery.of(context).size.width - 20;
    mapHeight = mapWidth! * 1.6;
    print("mapwidth:$mapWidth mapHeight:$mapHeight");
    return Scaffold(
        backgroundColor: const Color(0xFFB4E4FF),
        body: Stack(
          children: [
            Column(
              children: [
                TopNavBar(title: "我的轨迹"),
                Expanded(
                    child: Container(
                        alignment: Alignment.center,
                        margin: EdgeInsets.only(bottom: 55),
                        child: SingleChildScrollView(
                          child: ClipRRect(
                              borderRadius: BorderRadius.circular(10),
                              child: Container(
                                width: mapWidth,
                                height: mapHeight,
                                decoration: BoxDecoration(
                                  color: Colors.white,
                                  borderRadius: BorderRadius.circular(10),
                                ),
                                child: Stack(
                                  children: [
                                    getMapView(),
                                    Positioned(
                                        bottom: 0,
                                        left: 0,
                                        right: 0,
                                        child: Container(
                                          alignment: Alignment.center,
                                          padding:
                                              EdgeInsets.fromLTRB(18, 0, 10, 0),
                                          height: 90,
                                          color: Colors.white,
                                          child: Row(children: [
                                            Image.asset(
                                              "assets/images/mine/icon_mine_default_portrait.png",
                                              width: 50,
                                              height: 50,
                                            ),
                                            Container(
                                              width: 20,
                                            ),
                                            Expanded(
                                                child: Column(
                                              crossAxisAlignment:
                                                  CrossAxisAlignment.start,
                                              mainAxisAlignment:
                                                  MainAxisAlignment.center,
                                              children: [
                                                Text.rich(TextSpan(children: [
                                                  TextSpan(
                                                      text: "共定位到",
                                                      style: TextStyle(
                                                          color:
                                                          ColorConstant.theme,
                                                          fontSize: 15,
                                                          fontWeight:
                                                              FontWeight.bold)),
                                                  TextSpan(
                                                      text: "8",
                                                      style: TextStyle(
                                                          color:
                                                              Color(0xFFFF1F35),
                                                          fontSize: 24,
                                                          fontWeight:
                                                              FontWeight.bold)),
                                                  TextSpan(
                                                      text: "个位置",
                                                      style: TextStyle(
                                                          color:
                                                          ColorConstant.theme,
                                                          fontSize: 15,
                                                          fontWeight:
                                                              FontWeight.bold))
                                                ])),
                                                Container(
                                                  height: 10,
                                                ),
                                                Row(
                                                  children: [
                                                    Image.asset(
                                                      "assets/images/common/icon_date_start_end_small.png",
                                                      height: 35,
                                                    ),
                                                    Container(
                                                      width: 5,
                                                    ),
                                                    Column(
                                                      children: [
                                                        Text(
                                                          "2021.09.30 00:00:00",
                                                          style: TextStyle(
                                                              color: Color(
                                                                  0xFF9DAAB3),
                                                              fontSize: 12),
                                                        ),
                                                        Container(
                                                          height: 8,
                                                        ),
                                                        Text(
                                                          "2021.09.30 00:00:00",
                                                          style: TextStyle(
                                                              color: Color(
                                                                  0xFF9DAAB3),
                                                              fontSize: 12),
                                                        )
                                                      ],
                                                    )
                                                  ],
                                                )
                                              ],
                                            )),
                                            Stack(
                                                alignment: Alignment.center,
                                                children: [
                                                  Container(
                                                    height: 68,
                                                    width: 68,
                                                    decoration: BoxDecoration(
                                                        color:
                                                            Color(0xFFEFF3F7),
                                                        borderRadius:
                                                            BorderRadius
                                                                .circular(10)),
                                                  ),
                                                  QrImage(
                                                      data:
                                                          "http://www.baidu.com",
                                                      size: 54,
                                                      padding:
                                                          const EdgeInsets.all(
                                                              0),
                                                      foregroundColor:
                                                      ColorConstant.theme)
                                                ])
                                          ]),
                                        ))
                                  ],
                                ),
                              )),
                        ))),
              ],
            ),
            Positioned(
                bottom: animation!.value,
                left: 10,
                right: 10,
                child: Column(children: [
                  InkWell(
                      onTap: () {
                        if (controller!.status == AnimationStatus.dismissed) {
                          controller!.forward();
                        } else if (controller!.status ==
                            AnimationStatus.completed) {
                          controller!.reverse();
                        }
                      },
                      child: Container(
                        alignment: Alignment.center,
                        height: 55,
                        decoration: BoxDecoration(
                            color: Colors.white,
                            borderRadius: BorderRadius.only(
                                topLeft: Radius.circular(10),
                                topRight: Radius.circular(10)),
                            boxShadow: getViewShadow()),
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.center,
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            Image.asset(
                              "assets/images/common/icon_share.png",
                              height: 17.5,
                            ),
                            Container(
                              width: 8,
                            ),
                            Text(
                              "点击分享",
                              style: TextStyle(
                                  color: ColorConstant.theme, fontSize: 15),
                            )
                          ],
                        ),
                      )),
                  Container(
                      color: Colors.white,
                      padding: EdgeInsets.fromLTRB(23, 15, 23, 15),
                      child: Column(children: [
                        Row(
                          mainAxisAlignment: MainAxisAlignment.spaceAround,
                          children: [
                            getSharePlatform(
                              "微信好友",
                              "assets/images/common/icon_share_wx.png",
                            ),
                            getSharePlatform("QQ好友",
                                "assets/images/common/icon_share_qq.png"),
                            getSharePlatform("微博",
                                "assets/images/common/icon_share_sina.png")
                          ],
                        ),
                        Container(
                          height: 20,
                        ),
                        MyOutlineButton(
                          "取消",
                          10,
                          height: 40,
                          fontSize: 18,
                          onClick: () {
                            if (controller!.status ==
                                AnimationStatus.completed) {
                              controller!.reverse();
                            }
                          },
                        )
                      ]))
                ]))
          ],
        ));
  }
  Widget getSharePlatform(text, iconAsset) {
    return InkWell(
        onTap: () {
          print(text);
        },
        child: Column(
          children: [
            Image.asset(
              iconAsset,
              width: 49,
            ),
            Container(
              height: 5,
            ),
            Text(
              text,
              style: TextStyle(color: Color(0xFF9DAAB3), fontSize: 12),
            )
          ],
        ));
  }
  //控件阴影
  List<BoxShadow> getViewShadow() {
    return [
      BoxShadow(
        blurRadius: 6.5,
        spreadRadius: 1,
        color: Color(0x4D0E96FF),
      )
    ];
  }
}
lib/ui/mine/add_location_person.dart
@@ -2,6 +2,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:location/utils/ui_constant.dart';
void main() {
  runApp(MyApp());
@@ -12,7 +13,7 @@
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '添加定位人',
      title: '添加定位对象',
      theme: ThemeData(primaryColor: Color(0xFFF5F5F5)),
      home: AddLocationPersonPage(title: ''),
    );
@@ -93,7 +94,7 @@
                              Text(
                                " 添加其他定位对象",
                                style: TextStyle(
                                    color: Color(0xFF0E95FE), fontSize: 15),
                                    color: ColorConstant.theme, fontSize: 15),
                              )
                            ],
                          ),
lib/ui/mine/login.dart
New file
@@ -0,0 +1,313 @@
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:location/ui/widget/button.dart';
import 'package:location/ui/widget/nav.dart';
import 'package:location/utils/pageutils.dart';
import 'package:location/utils/ui_constant.dart';
import 'advice_submit.dart';
import 'package:html/dom.dart' as dom;
void main() {
  runApp(MyApp());
}
class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '登录',
      theme: ThemeData(primaryColor: Color(0xFFF5F5F5)),
      home: LoginPage(title: ''),
    );
  }
}
class LoginPage extends StatefulWidget {
  LoginPage({Key? key, required this.title}) : super(key: key);
  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.
  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".
  final String title;
  @override
  _LoginPageState createState() => _LoginPageState();
}
class _LoginPageState extends State<LoginPage>
    with SingleTickerProviderStateMixin {
  bool oneKeyLogin = false;
  bool checked = false;
  TextEditingController? phoneController = TextEditingController();
  TextEditingController? codeController = TextEditingController();
  String phone = "";
  String code = "";
  @override
  void initState() {
    super.initState();
  }
  BoxDecoration getItemDecoration(Color bgColor, Color shadowColor) {
    return BoxDecoration(
        borderRadius: BorderRadius.all(Radius.elliptical(10, 10)),
        color: bgColor,
        boxShadow: [
          BoxShadow(
              color: shadowColor,
              blurRadius: 2.0,
              offset: Offset(0.0, 5.0), //阴影y轴偏移量
              spreadRadius: 1 //阴影扩散程度
              )
        ]);
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.white,
        body: Stack(
          children: [
            Column(children: [
              Expanded(
                  child: SingleChildScrollView(
                      child: Padding(
                          padding: EdgeInsets.fromLTRB(40, 100, 40, 14),
                          child: Column(
                              crossAxisAlignment: CrossAxisAlignment.center,
                              children: [
                                Image.asset(
                                  "assets/images/login/ic_login_logo.png",
                                  width: 131,
                                ),
                                Container(
                                  height: 70,
                                ),
                                Container(
                                    constraints: BoxConstraints(minHeight: 200),
                                    child: getLoginContent()),
                                Container(
                                  height: 30,
                                ),
                                Text(
                                  "其他方式登录",
                                  style: TextStyle(
                                      color: Color(0xFF666666), fontSize: 14),
                                ),
                                Container(
                                  height: 21,
                                ),
                                Row(
                                  mainAxisAlignment:
                                      MainAxisAlignment.spaceAround,
                                  children: [
                                    getThirdLoginItem("微信登录",
                                        "assets/images/login/ic_login_wx.png"),
                                    getThirdLoginItem("QQ登录",
                                        "assets/images/login/ic_login_qq.png"),
                                    oneKeyLogin
                                        ? getThirdLoginItem("手机号登录",
                                            "assets/images/login/ic_login_phone.png")
                                        : getThirdLoginItem("一键登录",
                                            "assets/images/login/ic_login_onekey.png"),
                                  ],
                                )
                              ])))),
              Row(children: [
                Container(width: 25,),
                RoundCheckBox(
                  value: checked,
                  onChanged: (value) {
                    setState(() {
                      checked = value;
                    });
                  },
                ),
                Expanded(
                    child: Container(
                        child: Html(
                            data:
                                "<p>登录即表明同意<a href='http://www.baidu.com'>&nbsp;用户协议&nbsp;</a>和<a href='http://www.baidu.com'>&nbsp;隐私政策&nbsp;</a></p>",
                            style: {
                              "a": Style(
                                  textDecoration: TextDecoration.none,
                                  color: ColorConstant.theme),
                              "p": Style(
                                  textDecoration: TextDecoration.none,
                                  color: Color(0xFF999999),
                                  fontSize: FontSize.medium)
                            },
                            onLinkTap: (String? url,
                                RenderContext context,
                                Map<String, String> attributes,
                                dom.Element? element) {
                              print(url);
                            }))),
              ])
            ]),
            Positioned(
                top: 30,
                left: 20,
                child: InkWell(
                    onTap: () {
                      Navigator.of(context).pop();
                    },
                    child: Icon(
                      Icons.close,
                      size: 30,
                    )))
          ],
        ));
  }
  Widget getLoginContent() {
    return oneKeyLogin
        ? Container(
            child: Column(children: [
            MyFillButton(
              "本机号码一键登录",
              10,
              height: 45,
              fontSize: 17,
              onClick: () {},
            )
          ]))
        : Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Container(
                alignment: Alignment.centerLeft,
                padding: EdgeInsets.fromLTRB(20, 0, 5, 0),
                decoration: BoxDecoration(
                    color: const Color(0xFFF5F5F5),
                    borderRadius: BorderRadius.circular(10)),
                child: Row(
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: [
                    Image.asset(
                      "assets/images/login/icon_phone.png",
                      width: 14,
                      height: 20,
                    ),
                    Container(width: 14),
                    Expanded(
                        child: TextField(
                      style: TextStyle(color: Color(0xFF333333), fontSize: 17),
                      onChanged: (value) {
                        setState(() {
                          phone = value;
                        });
                      },
                      textAlign: TextAlign.start,
                      keyboardType: TextInputType.phone,
                      controller: phoneController,
                      decoration: InputDecoration(
                        hintText: "请输入手机号",
                        hintStyle:
                            TextStyle(color: Color(0xFFCCCCCC), fontSize: 17),
                        contentPadding: EdgeInsets.only(bottom: 3),
                        border: InputBorder.none,
                        focusedBorder: InputBorder.none,
                      ),
                    )),
                    MyOutlineButton("获取验证码", 5,height: 30, padding: EdgeInsets.fromLTRB(5, 0, 5, 0),),
                  ],
                ),
              ),
              Container(height: 10),
              Container(
                alignment: Alignment.centerLeft,
                padding: EdgeInsets.fromLTRB(20, 0, 20, 0),
                decoration: BoxDecoration(
                    color: const Color(0xFFF5F5F5),
                    borderRadius: BorderRadius.circular(10)),
                child: Row(
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: [
                    Image.asset(
                      "assets/images/login/icon_code.png",
                      width: 16,
                    ),
                    Container(width: 14),
                    Expanded(
                        child: TextField(
                          style: TextStyle(color: Color(0xFF333333), fontSize: 17),
                          onChanged: (value) {
                            setState(() {
                              phone = value;
                            });
                          },
                          textAlign: TextAlign.start,
                          keyboardType: TextInputType.phone,
                          controller: codeController,
                          decoration: InputDecoration(
                            hintText: "请输入验证码",
                            hintStyle:
                            TextStyle(color: Color(0xFFCCCCCC), fontSize: 17),
                            contentPadding: EdgeInsets.only(bottom: 3),
                            border: InputBorder.none,
                            focusedBorder: InputBorder.none,
                          ),
                        ))
                  ],
                ),
              ),
              Container(height: 10),
              const Text("未注册的手机号注册后系统会自动创建账户",
                  style: TextStyle(color: Color(0xFFA0A0A0), fontSize: 12)),
              Container(height: 20),
              MyFillButton(
                "获取短信验证码",
                10,
                height: 45,
                color: phone.length == 11
                    ? const Color(0xFFFF2B4B)
                    : const Color(0xFFCBCBCB),
                fontSize: 17,
                onClick: () {},
              ),
            ],
          );
  }
  Widget getThirdLoginItem(String name, String iconAsset) {
    return InkWell(
      onTap: () {
        if (name == "一键登录" || name == "手机号登录") {
          setState(() {
            oneKeyLogin = !oneKeyLogin;
          });
        }
      },
      child: Container(
          constraints: BoxConstraints(minWidth: 80),
          child: Column(
            children: [
              Image.asset(
                iconAsset,
                height: 49,
              ),
              Container(
                height: 8,
              ),
              Text(
                name,
                style: const TextStyle(color: Color(0xFF9DAAB3), fontSize: 12),
              )
            ],
          )),
    );
  }
}
lib/ui/mine/settings.dart
@@ -3,6 +3,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:location/ui/widget/nav.dart';
import 'package:location/utils/ui_constant.dart';
void main() {
  runApp(MyApp());
@@ -128,7 +129,7 @@
                          child: Text(
                            "退出登录",
                            style: TextStyle(
                                color: Color(0xFF0E95FE), fontSize: 16),
                                color: ColorConstant.theme, fontSize: 16),
                          )))
                ],
              )),
lib/ui/mine/share_to_friends.dart
@@ -3,6 +3,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:location/ui/widget/nav.dart';
import 'package:location/utils/ui_constant.dart';
void main() {
  runApp(MyApp());
@@ -93,7 +94,7 @@
                              Text(
                                " 点击分享",
                                style: TextStyle(
                                    color: Color(0xFF0E95FE), fontSize: 15),
                                    color: ColorConstant.theme, fontSize: 15),
                              )
                            ],
                          ),
lib/ui/mine/try_functions.dart
@@ -3,6 +3,7 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:location/ui/widget/nav.dart';
import 'package:location/utils/ui_constant.dart';
void main() {
@@ -89,7 +90,7 @@
                                TextSpan(text: '天试用'),
                              ],
                              style: TextStyle(
                                  color: Color(0xFF0E95FE), fontSize: 15),
                                  color: ColorConstant.theme, fontSize: 15),
                            )),
                            Container(
                              height: 5,
@@ -133,7 +134,7 @@
                              Text(
                                " 看广告",
                                style: TextStyle(
                                    color: Color(0xFF0E95FE), fontSize: 15),
                                    color: ColorConstant.theme, fontSize: 15),
                              )
                            ],
                          ),
lib/ui/sos/sos.dart
New file
@@ -0,0 +1,446 @@
import 'dart:async';
import 'dart:io';
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:location/main.dart';
import 'package:location/ui/sos/sos_contacts.dart';
import 'package:location/ui/widget/button.dart';
import 'package:location/ui/widget/dialog.dart';
import 'package:location/ui/widget/nav.dart';
import 'package:location/utils/pageutils.dart';
import 'package:location/utils/ui_constant.dart';
class SOSPage extends StatefulWidget {
  SOSPage({Key? key, required this.title}) : super(key: key);
  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.
  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".
  final String title;
  @override
  _SOSPageState createState() => _SOSPageState();
}
class _SOSPageState extends State<SOSPage> with SingleTickerProviderStateMixin {
  int selectIndex = 1;
  AnimationController? controller;
  Animation<double>? animation;
  @override
  void initState() {
    super.initState();
    controller = new AnimationController(
        duration: const Duration(milliseconds: 300), vsync: this);
    final CurvedAnimation curve =
        CurvedAnimation(parent: controller!, curve: Curves.easeIn);
    animation = Tween(begin: -245.0, end: 0.0).animate(curve)
      ..addListener(() {
        setState(() {});
      });
  }
  @override
  void dispose() {
    controller!.dispose();
    super.dispose();
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.white,
        body: Stack(
          children: [
            //------------内容层----------
            Positioned(
                left: 0,
                right: 0,
                bottom: 0,
                top: 0,
                child: Container(
                  padding: EdgeInsets.fromLTRB(0,
                      MediaQuery.of(context).viewPadding.top + 48 + 10, 0, 0),
                  decoration: BoxDecoration(
                      gradient: LinearGradient(
                    colors: [Color(0xFFEC0017), Color(0xFFDC002F)],
                  )),
                  child: Column(
                    mainAxisSize: MainAxisSize.max,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: [
                      Text(
                        "温馨提示:点击“SOS”系统将会自动推送消息给紧急联系人",
                        style: TextStyle(color: Colors.white, fontSize: 12),
                      ),
                      //--------SOS动效--------
                      Container(
                        margin: EdgeInsets.only(top: 38),
                        height: 249,
                        width: 249,
                        decoration: BoxDecoration(
                            color: Color(0xFFFF2B31),
                            border:
                                Border.all(color: Color(0xFFFF4E4A), width: 2),
                            borderRadius: BorderRadius.circular(125),
                            boxShadow: [
                              BoxShadow(
                                  color: Color(0x85D3001B),
                                  blurRadius: 10,
                                  spreadRadius: 17)
                            ]),
                        child: Stack(
                          alignment: Alignment.center,
                          children: [
                            // Positioned(
                            //     top: 20,
                            //     child: Container(
                            //       height: 100,
                            //       width: 100,
                            //       decoration: BoxDecoration(
                            //           color: Colors.transparent,
                            //           borderRadius: BorderRadius.circular(50),
                            //           boxShadow: [
                            //             BoxShadow(
                            //               color: Color(0xFFF6FF00),
                            //               blurRadius: 30,
                            //               spreadRadius: 0,
                            //             )
                            //           ]),
                            //     )),
                            Center(
                                child: Image.asset(
                                    "assets/images/common/icon_sos.png")),
                            Positioned(
                                bottom: 20,
                                child: Text(
                                  "sos",
                                  style: TextStyle(
                                      fontSize: 60,
                                      color: Colors.white,
                                      fontWeight: FontWeight.bold),
                                ))
                          ],
                        ),
                      ),
                      //----------求助记录-------------
                      Expanded(
                          child: Container(
                        margin: EdgeInsets.only(top: 30),
                        padding: EdgeInsets.all(15),
                        decoration: BoxDecoration(
                            color: Colors.white,
                            borderRadius: BorderRadius.only(
                                topRight: Radius.circular(10),
                                topLeft: Radius.circular(10))),
                        child: Flex(
                          direction: Axis.vertical,
                          mainAxisSize: MainAxisSize.min,
                          crossAxisAlignment: CrossAxisAlignment.end,
                          children: [
                            Flex(
                                direction: Axis.horizontal,
                                mainAxisAlignment: MainAxisAlignment.center,
                                crossAxisAlignment: CrossAxisAlignment.center,
                                children: [
                                  Text(
                                    "求助记录",
                                    style: TextStyle(
                                        color: ColorConstant.theme, fontSize: 16),
                                  ),
                                  Container(
                                    width: 5,
                                  ),
                                  Image.asset(
                                    "assets/images/common/icon_ask.png",
                                    height: 15,
                                  )
                                ]),
                            Container(
                              width: 12.5,
                            ),
                            InkWell(
                              child: Text(
                                "清空记录",
                                style: TextStyle(
                                    color: Color(0xFF999999), fontSize: 12),
                              ),
                            ),
                            Expanded(
                                child: ListView(
                              padding: EdgeInsets.only(top: 10),
                              children: [
                                getListViewItem(),
                                getListViewItem(),
                              ],
                            ))
                          ],
                        ),
                      )),
                    ],
                  ),
                )),
            //------------导航栏----------
            TopNavBar(
              title: "紧急求助",
              rightText: "紧急联系人",
              rightClick: () {
                NavigatorUtil.navigateToNextPage(context,
                    MaterialPageRoute(builder: (context) {
                  return SOSContactPage(title: "");
                }), (data) {});
              },
              backIcon: Image.asset(
                "assets/images/common/icon_sos_back.png",
                height: 17.5,
              ),
              textColor: Colors.white,
              backGround: Colors.transparent,
            ),
            //------------弹出框----------
            Positioned(
                bottom: animation!.value,
                left: 0,
                right: 0,
                child: EmergencyContactEdit("添加紧急联系人", () {
                  setState(() {
                    if (controller!.status == AnimationStatus.completed) {
                      controller!.reverse();
                    } else if (controller!.status ==
                        AnimationStatus.dismissed) {
                      controller!.forward();
                    }
                  });
                }, () {
                  if (controller!.status == AnimationStatus.completed) {
                    controller!.reverse();
                  }
                }, () {
                  if (controller!.status == AnimationStatus.completed) {
                    controller!.reverse();
                  }
                }))
          ],
        ));
  }
  Widget getListViewItem() {
    return Container(
      padding: EdgeInsets.fromLTRB(18, 8, 18, 8),
      decoration: BoxDecoration(
          border: Border.all(color: Color(0xFFCACACA), width: 1),
          borderRadius: BorderRadius.circular(8)),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: [
          Align(
              alignment: Alignment.center,
              child: Container(
                padding: EdgeInsets.fromLTRB(0, 4, 0, 4),
                width: 110,
                alignment: Alignment.center,
                decoration: BoxDecoration(
                    color: Color(0xFFC7C7C7),
                    borderRadius: BorderRadius.circular(10)),
                child: Text(
                  "2021.09.09 12:00",
                  style: TextStyle(color: Colors.white, fontSize: 10),
                ),
              )),
          Container(
            height: 6,
          ),
          Row(
            children: [
              Image.asset(
                "assets/images/mine/icon_mine_default_portrait.png",
                height: 14,
              ),
              Text(
                "由自己发出",
                style: TextStyle(fontSize: 12, color: Color(0xFF999999)),
              )
            ],
          ),
          Container(
            height: 6,
          ),
          Text(
            "刘洪瑞已查阅、贺小辉未查阅",
            style: TextStyle(fontSize: 12, color: Color(0xFF8CAFC8)),
          ),
          Container(
            height: 6,
          ),
          Text(
            "你在位置:\"位置中文名\",经纬度:\"经纬度\"于2021.09.09 21:00发出了一条紧急救助信息,求助信息推送成功。",
            maxLines: 2,
            overflow: TextOverflow.ellipsis,
            style: TextStyle(fontSize: 12, color: Color(0xFFBABABA)),
          ),
          Container(
            height: 6,
          ),
          Container(
            color: Color(0xFFCED4D9),
            height: 1,
          ),
          Container(
            height: 6,
          ),
          Row(
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Image.asset("assets/images/main/icon_location_position_name.png",
                  height: 16),
              Container(
                width: 6,
              ),
              FittedBox(
                  fit: BoxFit.fitWidth,
                  child: Text(
                    "位置名称位置名称位置名称位置名称位置名称称位置名称位置名称位置名称位置名",
                    softWrap: false,
                    overflow: TextOverflow.ellipsis,
                    style: TextStyle(fontSize: 12, color: Color(0xFF999999)),
                  )),
              Container(
                width: 6,
              ),
              Image.asset(
                "assets/images/main/icon_location_position_more.png",
                height: 10,
              ),
            ],
          )
        ],
      ),
    );
  }
}
class EmergencyContactEdit extends StatelessWidget {
  GestureTapCallback? titleClick;
  GestureTapCallback? cancelClick;
  GestureTapCallback? sureClick;
  final String title;
  EmergencyContactEdit(String this.title, GestureTapCallback? this.titleClick,
      GestureTapCallback? this.cancelClick, GestureTapCallback? this.sureClick);
  Widget getInputView(String hintText) {
    return TextField(
      decoration: InputDecoration(
          hintText: hintText,
          hintStyle: const TextStyle(color: Color(0xFFBABABA), fontSize: 14),
          border: OutlineInputBorder(
              borderRadius: BorderRadius.circular(10),
              borderSide: BorderSide.none),
          focusedBorder: OutlineInputBorder(
              borderRadius: BorderRadius.circular(10),
              borderSide: BorderSide.none),
          fillColor: Color(0xFFF0F0F0),
          contentPadding: EdgeInsets.fromLTRB(20, 14, 20, 14),
          filled: true),
    );
  }
  //控件阴影
  List<BoxShadow> getViewShadow() {
    return [
      BoxShadow(
        blurRadius: 6.5,
        spreadRadius: 1,
        color: Color(0x4D0E96FF),
      )
    ];
  }
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.fromLTRB(10, 0, 10, 0),
      padding: EdgeInsets.fromLTRB(25, 0, 25, 15),
      decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.only(
              topLeft: Radius.circular(10), topRight: Radius.circular(10)),
          boxShadow: getViewShadow()),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          InkWell(
              onTap: () {
                titleClick!();
              },
              child: Container(
                  padding: EdgeInsets.fromLTRB(0, 15, 0, 15),
                  child: Row(
                      mainAxisAlignment: MainAxisAlignment.center,
                      crossAxisAlignment: CrossAxisAlignment.center,
                      children: [
                        Image.asset(
                          "assets/images/common/icon_person.png",
                          height: 17,
                        ),
                        Container(width: 12),
                        Text(
                          title,
                          style:
                              TextStyle(color: ColorConstant.theme, fontSize: 15),
                        )
                      ]))),
          getInputView("联系人称呼"),
          Container(
            height: 14,
          ),
          getInputView("联系人手机号码"),
          Container(
            height: 14,
          ),
          getInputView("备注(选填)"),
          Container(
            height: 16,
          ),
          Flex(
            direction: Axis.horizontal,
            children: [
              Expanded(
                  flex: 1,
                  child: MyOutlineButton(
                    "取消",
                    10,
                    fontSize: 18,
                    height: 40,
                    onClick: () {
                      cancelClick!();
                    },
                  )),
              Container(width: 13),
              Expanded(
                  flex: 1,
                  child: MyFillButton(
                    "保存",
                    10,
                    fontSize: 18,
                    height: 40,
                    onClick: () {
                      sureClick!();
                    },
                  )),
            ],
          )
        ],
      ),
    );
  }
}
lib/ui/sos/sos_contacts.dart
New file
@@ -0,0 +1,246 @@
import 'dart:async';
import 'dart:io';
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:location/main.dart';
import 'package:location/ui/sos/sos.dart';
import 'package:location/ui/widget/button.dart';
import 'package:location/ui/widget/dialog.dart';
import 'package:location/ui/widget/nav.dart';
import 'package:location/utils/pageutils.dart';
import 'package:location/utils/ui_constant.dart';
class SOSContactPage extends StatefulWidget {
  SOSContactPage({Key? key, required this.title}) : super(key: key);
  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.
  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".
  final String title;
  @override
  _SOSContactPageState createState() => _SOSContactPageState();
}
class _SOSContactPageState extends State<SOSContactPage>
    with SingleTickerProviderStateMixin {
  int selectedIndex = -1;
  AnimationController? controller;
  Animation<double>? animation;
  @override
  void initState() {
    super.initState();
    controller = new AnimationController(
        duration: const Duration(milliseconds: 300), vsync: this);
    final CurvedAnimation curve =
        CurvedAnimation(parent: controller!, curve: Curves.easeIn);
    animation = Tween(begin: -300.0, end: 0.0).animate(curve)
      ..addListener(() {
        setState(() {});
      });
  }
  @override
  void dispose() {
    controller!.dispose();
    super.dispose();
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.white,
        body: Stack(children: [
          Container(
            color: Color(0xFFB4E4FF),
            child: Column(
              children: [
                TopNavBar(title: "紧急联系人"),
                Expanded(
                    child: Container(
                  margin: EdgeInsets.all(10),
                  decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(10),
                      color: Colors.white),
                  child: ListView(
                    padding: EdgeInsets.all(0),
                    children: [getListViewItem(0), getListViewItem(1)],
                  ),
                )),
                //---------底部菜单----------
                Container(
                  height: 55,
                  margin: EdgeInsets.only(top: 3, left: 10, right: 10),
                  decoration: BoxDecoration(
                      color: Colors.white,
                      borderRadius: BorderRadius.only(
                          topLeft: Radius.circular(10),
                          topRight: Radius.circular(10)),
                      boxShadow: getViewShadow()),
                  child: Row(
                    children: [
                      Expanded(
                          child: InkWell(
                        onTap: () {
                          //TODO 赋值弹出框
                          if (controller!.status == AnimationStatus.dismissed) {
                            controller!.forward();
                          }
                        },
                        child: Container(
                          child: Flex(
                            mainAxisAlignment: MainAxisAlignment.center,
                            crossAxisAlignment: CrossAxisAlignment.center,
                            direction: Axis.horizontal,
                            children: [
                              Image.asset(
                                "assets/images/common/icon_edit.png",
                                height: 17,
                              ),
                              Container(
                                width: 8,
                              ),
                              const Text(
                                "编辑",
                                style: TextStyle(
                                    color: ColorConstant.theme, fontSize: 15),
                              )
                            ],
                          ),
                        ),
                      )),
                      Container(
                        height: 28,
                        width: 1,
                        color: ColorConstant.theme,
                      ),
                      Expanded(
                          child: InkWell(
                        onTap: () {
                          showGeneralDialog(
                              context: context,
                              pageBuilder: (BuildContext buildContext,
                                  Animation<double> animation,
                                  Animation<double> secondaryAnimation) {
                                return NotifyDialog("温馨提示", "你确认要删除这位紧急联系人吗?",
                                    () {
                                  // Navigator.of(context).pop();
                                }, () {
                                  // Navigator.of(context).pop();
                                });
                              });
                        },
                        child: Container(
                          child: Flex(
                            mainAxisAlignment: MainAxisAlignment.center,
                            crossAxisAlignment: CrossAxisAlignment.center,
                            direction: Axis.horizontal,
                            children: [
                              Image.asset(
                                "assets/images/common/icon_delete.png",
                                height: 17,
                              ),
                              Container(
                                width: 8,
                              ),
                              const Text(
                                "删除",
                                style: TextStyle(
                                    color:ColorConstant.theme, fontSize: 15),
                              )
                            ],
                          ),
                        ),
                      ))
                    ],
                  ),
                )
              ],
            ),
          ),
          Positioned(
              bottom: animation!.value,
              left: 0,
              right: 0,
              child: EmergencyContactEdit("编辑紧急联系人", () {}, () {
                print("点击取消");
                if (controller!.status == AnimationStatus.completed) {
                  controller!.reverse();
                }
              }, () {
                if (controller!.status == AnimationStatus.completed) {
                  controller!.reverse();
                }
              }))
        ]));
  }
  Widget getListViewItem(int index) {
    return InkWell(
        onTap: () {
          setState(() {
            selectedIndex = index;
          });
        },
        child: Container(
          height: 77,
          alignment: Alignment.centerLeft,
          padding: const EdgeInsets.fromLTRB(25, 0, 25, 0),
          decoration: BoxDecoration(
            color:
                index == selectedIndex ? const Color(0xFFF0F8FF) : Colors.white,
            borderRadius: BorderRadius.only(
                topLeft: index == 0 ? const Radius.circular(10) : Radius.zero,
                topRight: index == 0 ? const Radius.circular(10) : Radius.zero),
          ),
          child: Row(
            children: [
              Image.asset(
                "assets/images/mine/icon_mine_default_portrait.png",
                height: 50,
              ),
              Container(
                width: 10,
              ),
              Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text(
                    "刘洪瑞",
                    style: TextStyle(color: ColorConstant.theme, fontSize: 18),
                  ),
                  Container(
                    height: 5,
                  ),
                  Text("18888888888",
                      style: TextStyle(color: Color(0xFF9DAAB3), fontSize: 15))
                ],
              )
            ],
          ),
        ));
  }
  //控件阴影
  List<BoxShadow> getViewShadow() {
    return [
      BoxShadow(
        blurRadius: 6.5,
        spreadRadius: 3,
        color: Color(0x4D0E96FF),
      )
    ];
  }
}
lib/ui/splash.dart
New file
@@ -0,0 +1,148 @@
import 'dart:async';
import 'dart:io';
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:location/main.dart';
import 'package:location/ui/map/travel.dart';
import 'package:location/ui/mine/login.dart';
import 'package:location/ui/sos/sos.dart';
import 'package:location/ui/widget/dialog.dart';
import 'package:location/utils/pageutils.dart';
void main() {
  if (Platform.isAndroid) {
    SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
      statusBarColor: Colors.transparent,
      systemNavigationBarColor: Color(0xFF000000),
      systemNavigationBarDividerColor: null,
      systemNavigationBarIconBrightness: Brightness.light,
      statusBarIconBrightness: Brightness.dark,
      statusBarBrightness: Brightness.light,
    ));
  }
  runApp(MyApp());
}
class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
          // This is the theme of your application.
          //
          // Try running your application with "flutter run". You'll see the
          // application has a blue toolbar. Then, without quitting the app, try
          // changing the primarySwatch below to Colors.green and then invoke
          // "hot reload" (press "r" in the console where you ran "flutter run",
          // or simply save your changes to "hot reload" in a Flutter IDE).
          // Notice that the counter didn't reset back to zero; the application
          // is not restarted.
          primaryColor: Color(0xFFFFFFFF)),
      home: SplashPage(title: ''),
    );
  }
}
class SplashPage extends StatefulWidget {
  SplashPage({Key? key, required this.title}) : super(key: key);
  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.
  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".
  final String title;
  @override
  _SplashPageState createState() => _SplashPageState();
}
class _SplashPageState extends State<SplashPage>
    with SingleTickerProviderStateMixin {
  int selectIndex = 1;
  @override
  void initState() {
    super.initState();
    // Timer(const Duration(seconds: 5), () {
    //   Navigator.of(context).push(CustomRouteSlide(MainPage(title: "")));
    // });
    Timer(const Duration(seconds: 2), () {
      // Navigator.of(context).push(CustomRouteSlide(MainPage(title: "")));
      NavigatorUtil.navigateToNextPageWithFinish(context, MaterialPageRoute(builder: (context) {
        return LoginPage(title: "");
      }));
      // showGeneralDialog(context: context,
      //     pageBuilder: (BuildContext buildContext, Animation<double> animation,
      //         Animation<double> secondaryAnimation) {
      //       return PermissionNotifyDialog(() {
      //         Navigator.of(context).pop();
      //         Navigator.of(context).push(CustomRouteSlide(MainPage(title: "")));
      //       });
      //     });
    });
    // showDialog(
    //     context: context,
    //     builder: (context) => PermissionNotifyDialog((){
    //       Navigator.of(context).push(CustomRouteSlide(MainPage(title: "")));
    //     }));
// String content="欢迎您使用百度地图服务!<a href='http://www.baidu.com'> http://www.baidu.com </a> 我们非常重视您的隐私保护和个人信息保护。本隐私政策适用于您通过任何方式对百度地图各项服务的访问和使用。您可以利用百度地图搜索路况信息、商家信息、定位您所在的位置,进行路径规划、导航您想去的地址,搜索周边的服务等(以下统称“百度地图产品或服务”)。您具体获得的百度地图服务内容可能因为您使用的百度地图的版本及搭载设备不同而有所差异,如果在部分版本或搭载设备中不涵盖某些服务内容或未提供特定功能(例如:部分版本不支持登录,我们可能无法为您提供第三方服务以及其他登录后才能使用的功能;手表等穿戴设备暂时只支持步骑行的路线规划及导航,所以我们在穿戴设备上搭载的地图无法为您提供如驾车路线规划及导航等其他功能),本隐私政策中涉及到上述服务/功能及相关个人信息的内容将不适用。您可以通过多种不同的方式来使用我们的产品和服务,包括百度地图的网站、软件、供第三方网站和应用程序使用的百度地图软件开发工具包(SDK)和应用程序编程接口(API)、车载导航仪、智能后视镜等智能硬件设备。";
//       showDialog(
//           context: context,
//           builder: (context) => NotifyDialog("用户协议&隐私政策", content, () {}, () {},richText: true,height: 400,));
  }
  @override
  Widget build(BuildContext context) {
    print("build");
    return Scaffold(
        backgroundColor: Colors.white,
        body: Flex(
          direction: Axis.vertical,
          children: [
            Expanded(
                child: Container(
              alignment: Alignment.center,
              padding: EdgeInsets.all(72),
              color: Colors.white,
              child: Image.asset("assets/images/ic_splash.png"),
            )),
            Container(
              alignment: Alignment.center,
              color: Color(0xFFF8F8F8),
              height: 94,
              child: Flex(
                direction: Axis.vertical,
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text(
                    "定位追踪轨迹",
                    style: TextStyle(color: Color(0xFF03B5FF), fontSize: 23),
                  ),
                  SizedBox(
                    height: 15,
                  ),
                  Text(
                    "腾讯云提供网络服务",
                    style: TextStyle(color: Color(0xFF999999), fontSize: 9),
                  ),
                ],
              ),
            )
          ],
        ));
  }
}
lib/ui/widget/button.dart
New file
@@ -0,0 +1,130 @@
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:location/utils/ui_constant.dart';
class MyOutlineButton extends StatelessWidget {
  final String text;
  final double radius;
  final double height;
  final double? width;
  final Color color;
  final double fontSize;
  final GestureTapCallback? onClick;
  final EdgeInsets? padding;
  MyOutlineButton(this.text, this.radius,
      {GestureTapCallback? this.onClick,
      Color this.color = ColorConstant.theme,
      double this.height = 26,
      double this.fontSize = 12,
      double? this.width = null,EdgeInsets? this.padding = null});
  @override
  Widget build(BuildContext context) {
    Container child = Container(
      alignment: Alignment.center,
      height: height,
      width: width,
      padding: padding,
      decoration: BoxDecoration(
        color: Colors.transparent,
        border: Border.all(color: color, width: 1),
        borderRadius: BorderRadius.circular(radius),
      ),
      child: Text(
        text,
        style: TextStyle(color: color, fontSize: fontSize),
      ),
    );
    return InkWell(
        onTap: () {
          onClick!();
        },
        child: child);
  }
}
class MyFillButton extends StatelessWidget {
  final String text;
  final Color textColor;
  final double radius;
  final double height;
  final double? width;
  final Color color;
  final double fontSize;
  final GestureTapCallback? onClick;
  MyFillButton(this.text, this.radius,
      {GestureTapCallback? this.onClick,
      Color this.color = ColorConstant.theme,
      Color this.textColor = Colors.white,
      double this.height = 26,
      double this.fontSize = 12,
      double? this.width = null});
  @override
  Widget build(BuildContext context) {
    Container child = Container(
      alignment: Alignment.center,
      height: height,
      width: width,
      decoration: BoxDecoration(
        color: color,
        border: Border.all(color: color, width: 1),
        borderRadius: BorderRadius.circular(radius),
      ),
      child: Text(
        text,
        style: TextStyle(color: textColor, fontSize: fontSize),
      ),
    );
    return InkWell(
        onTap: () {
          onClick!();
        },
        child: child);
  }
}
class RoundCheckBox extends StatefulWidget {
  var value = false;
  Function(bool) onChanged;
  RoundCheckBox({ Key? key, required this.value, required this.onChanged})
      : super(key: key);
  @override
  _RoundCheckBoxState createState() => _RoundCheckBoxState();
}
class _RoundCheckBoxState extends State<RoundCheckBox> {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: GestureDetector(
          onTap: () {
            widget.value = !widget.value;
            widget.onChanged(widget.value);
          },
          child: Padding(
            padding: const EdgeInsets.all(10.0),
            child: widget.value
                ? const Icon(
              Icons.check_circle,
              size: 19,
              color: Colors.green,
            )
                : const Icon(
              Icons.panorama_fish_eye,
              size: 19,
              color: Colors.black12,
            ),
          )),
    );
  }
}
lib/ui/widget/dialog.dart
@@ -1,14 +1,170 @@
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:html/dom.dart' as dom;
class NotifyDialog extends Dialog {
  BuildContext? context;
  final String title;
  final String content;
  final GestureTapCallback onCancel;
  final GestureTapCallback onSure;
  final bool richText;
  final double fontSize;
  final double height;
  final Color contentColor;
  bool touchOutCancel = false;
  NotifyDialog(this.title, this.content, this.onCancel, this.onSure);
  NotifyDialog(this.title, this.content, this.onCancel, this.onSure,
      {this.fontSize = 16.0,
      this.richText = false,
      this.height = 240,
      this.contentColor = const Color(0xFF7E7E7E)});
  Widget getContent() {
    if (richText) {
      return SingleChildScrollView(
          child: Html(
              data: content,
              style: {
                "a": Style(
                  textDecoration: TextDecoration.none,
                )
              },
              onLinkTap: (String? url, RenderContext context,
                  Map<String, String> attributes, dom.Element? element) {}));
    } else {
      return Text(
        content,
        style: TextStyle(color: contentColor, fontSize: fontSize),
      );
    }
  }
  Offset? offset;
  @override
  Widget build(BuildContext context) {
    this.context = context;
    double width = MediaQuery.of(context).size.width;
    double dialogWidth = width * 4 / 5;
    print("屏幕宽:$width");
    //关闭弹框
    // Navigator.pop(context);
    return Listener(
        onPointerDown: touchOutCancel == true
            ? (event) {
                Offset pos = event.position;
                if (offset == null ||
                    pos.dy != offset!.dy ||
                    pos.dx != offset!.dx) {
                  print("点击外区域");
                  Navigator.pop(context);
                }
              }
            : null,
        child: Material(
            type: MaterialType.transparency,
            child: Align(
                alignment: Alignment.center,
                child: GestureDetector(
                    onPanDown: (event) {
                      offset = event.globalPosition;
                    },
                    child: Container(
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.all(Radius.circular(15)),
                          color: Colors.white),
                      alignment: Alignment.topCenter,
                      height: height,
                      width: dialogWidth,
                      child: Flex(
                        mainAxisAlignment: MainAxisAlignment.start,
                        direction: Axis.vertical,
                        children: [
                          //-------标题区域--------
                          Container(
                              alignment: Alignment.center,
                              height: 60,
                              child: Text(
                                title,
                                style: TextStyle(
                                    fontSize: 18, color: Colors.white),
                              ),
                              decoration: BoxDecoration(
                                color: Color(0xFF1CC7FF),
                                borderRadius: BorderRadius.only(
                                    topLeft: Radius.circular(15),
                                    topRight: Radius.circular(15)),
                              )),
                          //-------内容区域--------
                          Expanded(
                              child: Container(
                            alignment: Alignment.center,
                            padding: EdgeInsets.fromLTRB(15, 5, 15, 5),
                            child: getContent(),
                          )),
                          //------按钮区域--------
                          Flex(
                            direction: Axis.horizontal,
                            children: [
                              Expanded(
                                  child: InkWell(
                                onTap: () {
                                  Navigator.pop(context);
                                  onCancel();
                                },
                                child: Container(
                                  margin: EdgeInsets.fromLTRB(15, 0, 6, 15),
                                  alignment: Alignment.center,
                                  height: 44,
                                  decoration: BoxDecoration(
                                      border:
                                          Border.all(color: Color(0xFF0E96FF)),
                                      borderRadius: BorderRadius.circular(10)),
                                  child: Text(
                                    "取消",
                                    style: TextStyle(
                                        color: Color(0xFF0E96FF), fontSize: 18),
                                  ),
                                ),
                              )),
                              Expanded(
                                  child: InkWell(
                                onTap: () {
                                  Navigator.pop(context);
                                  onSure();
                                },
                                child: Container(
                                  margin: EdgeInsets.fromLTRB(6, 0, 15, 15),
                                  alignment: Alignment.center,
                                  height: 44,
                                  decoration: BoxDecoration(
                                      color: Color(0xFF0E96FF),
                                      borderRadius: BorderRadius.circular(10)),
                                  child: Text(
                                    "同意",
                                    style: TextStyle(
                                        color: Colors.white, fontSize: 18),
                                  ),
                                ),
                              ))
                            ],
                          )
                        ],
                      ),
                    )))));
  }
}
class PermissionNotifyDialog extends Dialog {
  final GestureTapCallback onOpen;
  PermissionNotifyDialog(this.onOpen);
  @override
  Widget build(BuildContext context) {
@@ -22,84 +178,95 @@
        child: Align(
            alignment: Alignment.center,
            child: Container(
              decoration: BoxDecoration(
                  borderRadius: BorderRadius.all(Radius.circular(15)),
                  color: Colors.white),
              alignment: Alignment.topCenter,
              height: 240,
              width: dialogWidth,
              child: Flex(
                mainAxisAlignment: MainAxisAlignment.start,
                direction: Axis.vertical,
                children: [
                  Container(
                      alignment: Alignment.center,
                      height: 60,
                      child: Text(
                        title,
                        style: TextStyle(fontSize: 18, color: Colors.white),
                      ),
                width: dialogWidth,
                child: Flex(
                  mainAxisAlignment: MainAxisAlignment.center,
                  direction: Axis.vertical,
                  children: [
                    Image.asset(
                        "assets/images/common/ic_permission_notify_top.png"),
                    Container(
                      padding: EdgeInsets.all(16),
                      decoration: BoxDecoration(
                        color: Color(0xFF1CC7FF),
                        borderRadius: BorderRadius.only(
                            topLeft: Radius.circular(15),
                            topRight: Radius.circular(15)),
                      )),
                  Expanded(
                      child: Container(
                    alignment: Alignment.center,
                    padding: EdgeInsets.fromLTRB(15, 5, 15, 5),
                    child: Text(
                      content,
                      style: TextStyle(color: Color(0xFF7E7E7E), fontSize: 16),
                          borderRadius: BorderRadius.only(
                              bottomLeft: Radius.circular(15),
                              bottomRight: Radius.circular(15)),
                          color: Colors.white),
                      child: Flex(
                        direction: Axis.vertical,
                        children: [
                          getPermissionItem(
                              title: "手机",
                              content: "校验手机识别码,防止账号被盗",
                              icon: Image.asset(
                                "assets/images/common/icon_permission_notify_phone.png",
                                width: 21,
                              )),
                          Container(
                            height: 30,
                          ),
                          getPermissionItem(
                              title: "定位",
                              content: "缓存图片和视频,降低流量消耗",
                              icon: Image.asset(
                                "assets/images/common/icon_permission_notify_location.png",
                                width: 26,
                              )),
                          Container(
                            height: 36,
                          ),
                          InkWell(
                            onTap: () {
                              onOpen();
                            },
                            child: Container(
                              height: 44,
                              alignment: Alignment.center,
                              decoration: BoxDecoration(
                                  borderRadius: BorderRadius.circular(10),
                                  color: const Color(0xFF0E96FF)),
                              child: const Text(
                                "立即开启",
                                style: TextStyle(
                                    fontSize: 18, color: Colors.white),
                              ),
                            ),
                          )
                        ],
                      ),
                    ),
                  )),
                  Flex(
                    direction: Axis.horizontal,
                    children: [
                      Expanded(
                          child: InkWell(
                        onTap: () {
                          Navigator.pop(context);
                          onCancel();
                        },
                        child: Container(
                          margin: EdgeInsets.fromLTRB(15, 0, 6, 15),
                          alignment: Alignment.center,
                          height: 44,
                          decoration: BoxDecoration(
                              border: Border.all(color: Color(0xFF0E96FF)),
                              borderRadius: BorderRadius.circular(10)),
                          child: Text(
                            "取消",
                            style: TextStyle(
                                color: Color(0xFF0E96FF), fontSize: 18),
                          ),
                        ),
                      )),
                      Expanded(
                          child: InkWell(
                        onTap: () {
                          Navigator.pop(context);
                          onSure();
                        },
                        child: Container(
                          margin: EdgeInsets.fromLTRB(6, 0, 15, 15),
                          alignment: Alignment.center,
                          height: 44,
                          decoration: BoxDecoration(
                              color: Color(0xFF0E96FF),
                              borderRadius: BorderRadius.circular(10)),
                          child: Text(
                            "同意",
                            style: TextStyle(color: Colors.white, fontSize: 18),
                          ),
                        ),
                      ))
                    ],
                  )
                ],
              ),
            )));
                  ],
                ))));
  }
  //权限项
  Widget getPermissionItem(
      {required Image icon, required String title, required String content}) {
    return Flex(
      direction: Axis.horizontal,
      crossAxisAlignment: CrossAxisAlignment.center,
      children: [
        Container(
          width: 34,
        ),
        icon,
        Container(
          width: 4,
        ),
        Expanded(
            child: Flex(
          crossAxisAlignment: CrossAxisAlignment.start,
          direction: Axis.vertical,
          children: [
            Text(title,
                style: TextStyle(fontSize: 17, color: Color(0xFF6B6B6B))),
            Text(content,
                style: TextStyle(fontSize: 12, color: Color(0xFFA0A0A0)),
                softWrap: false,
                overflow: TextOverflow.ellipsis)
          ],
        ))
      ],
    );
  }
}
lib/ui/widget/nav.dart
@@ -6,20 +6,34 @@
class TopNavBar extends StatelessWidget {
  final String title;
  GestureTapCallback? back;
  String? rightText;
  GestureTapCallback? rightClick;
  final Color textColor;
  final Color backGround;
  final Image backIcon;
  TopNavBar({required this.title, GestureTapCallback? back}) {
    this.back = back;
  }
  TopNavBar(
      {required this.title,
      GestureTapCallback? this.back,
      String? this.rightText,
      GestureTapCallback? this.rightClick,
      Color this.textColor = const Color(0xFF333333),
      Color this.backGround = Colors.white,
      Image this.backIcon = const Image(
          image: AssetImage(
            "assets/images/common/icon_back.png",
          ),
          height: 19)});
  @override
  Widget build(BuildContext context) {
    return Flex(direction: Axis.vertical, children: [
      Container(
        height: MediaQuery.of(context).viewPadding.top,
        color: Colors.white,
        color: backGround,
      ),
      Container(
        color: Colors.white,
        color: backGround,
        height: 48,
        child: Stack(
          alignment: Alignment.centerLeft,
@@ -39,13 +53,32 @@
                                child: Text(
                          title,
                          style:
                              TextStyle(fontSize: 18, color: Color(0xFF333333)),
                              TextStyle(fontSize: 18, color: textColor),
                        ))),
                        Container(
                          width: 50,
                        )
                      ],
                    ))),
            rightText != null && rightText!.length > 0
                ? Positioned(
                    right: 0,
                    top: 0,
                    bottom: 0,
                    child: InkWell(
                        onTap: () {
                          rightClick!();
                        },
                        child: Container(
                          alignment: Alignment.center,
                          padding: EdgeInsets.only(right: 10),
                          child: Text(
                            rightText!,
                            style: TextStyle(
                                fontSize: 15, color: textColor),
                          ),
                        )))
                : Container(),
            InkWell(
                onTap: () {
                  if (back != null)
@@ -57,10 +90,7 @@
                  alignment: Alignment.center,
                  width: 42,
                  height: 48,
                  child: Image.asset(
                    "assets/images/common/icon_back.png",
                    height: 19,
                  ),
                  child: backIcon,
                ))
          ],
        ),
lib/utils/jsinterface.dart
New file
@@ -0,0 +1,70 @@
import 'dart:convert';
import 'package:flutter/widgets.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:webview_flutter/platform_interface.dart';
import 'package:webview_flutter/webview_flutter.dart';
class JavascriptInterface {
  final BuildContext context;
  final WebViewController? _controller;
  JavascriptInterface(
      BuildContext this.context, WebViewController? this._controller);
  Set<JavascriptChannel> getInterfaces() {
    List<JavascriptChannel> list = [];
    list.add(JavascriptChannel(
        name: 'yestv',
        onMessageReceived: (JavascriptMessage message) {
          var data = jsonDecode(message.message);
          String method = data["method"];
          var params = data["params"];
          String? _callback = data["callback"];
          switch (method) {
            case "toast":
              toast(params);
              break;
            case "getUid":
              getUid(params, _callback);
              break;
            case "getBaseRequestParams":
              getBaseRequestParams(params, _callback);
              break;
          }
        }));
    return list.toSet();
  }
  callback(String method, String params) {
    _controller!.evaluateJavascript("$method('$params')");
    _controller!.evaluateJavascript("delete $method");
  }
  //获取用户ID
  getUid(var params, String? callbackName) {
    if (callbackName != null) {
      callback(callbackName, "购");
    }
  }
  //toast
  toast(params) {
    if (params != null && params["msg"] != null) {
      Fluttertoast.showToast(msg: params["msg"]);
    }
  }
  //获取基本的网络请求参数
  getBaseRequestParams(var params, String? callbackName) {
    var ps = {};
    if (params != null) {
      ps.addAll(params);
    }
    String result = jsonEncode(ps);
    if (callbackName != null) {
      callback(callbackName, result);
    }
  }
}
lib/utils/pageutils.dart
@@ -2,6 +2,8 @@
import 'package:flutter/cupertino.dart';
typedef PageDataLisener = void Function(dynamic data);
//滑动效果
class CustomRouteSlide extends PageRouteBuilder {
  final Widget widget;
@@ -26,3 +28,16 @@
              );
            });
}
class NavigatorUtil {
  static void navigateToNextPage(BuildContext context, PageRoute route,
      PageDataLisener? dataLisener) async {
    final result = await Navigator.of(context).push(route);
    dataLisener!(result);
  }
  static void navigateToNextPageWithFinish(
      BuildContext context, PageRoute route) {
    Navigator.of(context).pushReplacement(route);
  }
}
lib/utils/ui_constant.dart
New file
@@ -0,0 +1,8 @@
import 'dart:ui';
import 'package:flutter/cupertino.dart';
//滑动效果
class ColorConstant {
  static const Color theme =  Color(0xFF0E95FE);
}
pubspec.lock
@@ -29,6 +29,20 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.3.1"
  chewie:
    dependency: transitive
    description:
      name: chewie
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.2.2"
  chewie_audio:
    dependency: transitive
    description:
      name: chewie_audio
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.2.0"
  clock:
    dependency: transitive
    description:
@@ -43,6 +57,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.15.0"
  csslib:
    dependency: transitive
    description:
      name: csslib
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.17.1"
  cupertino_icons:
    dependency: "direct main"
    description:
@@ -111,6 +132,27 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "3.0.0"
  flutter_datetime_picker:
    dependency: "direct main"
    description:
      name: flutter_datetime_picker
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.5.1"
  flutter_html:
    dependency: "direct main"
    description:
      name: flutter_html
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.1.5"
  flutter_layout_grid:
    dependency: transitive
    description:
      name: flutter_layout_grid
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.0.3"
  flutter_lints:
    dependency: "direct dev"
    description:
@@ -118,6 +160,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.0.4"
  flutter_math_fork:
    dependency: transitive
    description:
      name: flutter_math_fork
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.3.3+1"
  flutter_page_indicator:
    dependency: transitive
    description:
@@ -132,6 +181,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.0.4"
  flutter_svg:
    dependency: transitive
    description:
      name: flutter_svg
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.22.0"
  flutter_swiper:
    dependency: "direct main"
    description:
@@ -139,11 +195,25 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.1.6"
  flutter_tencentad:
    dependency: "direct main"
    description:
      name: flutter_tencentad
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.0.4"
  flutter_test:
    dependency: "direct dev"
    description: flutter
    source: sdk
    version: "0.0.0"
  flutter_unionad:
    dependency: "direct main"
    description:
      name: flutter_unionad
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.1.6"
  flutter_web_plugins:
    dependency: transitive
    description: flutter
@@ -156,6 +226,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "8.0.8"
  html:
    dependency: transitive
    description:
      name: html
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.15.0"
  http_parser:
    dependency: transitive
    description:
@@ -191,6 +268,20 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.7.0"
  nested:
    dependency: transitive
    description:
      name: nested
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.0.0"
  numerus:
    dependency: transitive
    description:
      name: numerus
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.1.1"
  path:
    dependency: transitive
    description:
@@ -198,6 +289,20 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.8.0"
  path_drawing:
    dependency: transitive
    description:
      name: path_drawing
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.5.1+1"
  path_parsing:
    dependency: transitive
    description:
      name: path_parsing
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.2.1"
  path_provider_linux:
    dependency: transitive
    description:
@@ -226,6 +331,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "3.3.0"
  petitparser:
    dependency: transitive
    description:
      name: petitparser
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "4.4.0"
  platform:
    dependency: transitive
    description:
@@ -247,6 +359,34 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "4.2.4"
  provider:
    dependency: transitive
    description:
      name: provider
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "5.0.0"
  qr:
    dependency: transitive
    description:
      name: qr
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.1.0"
  qr_flutter:
    dependency: "direct main"
    description:
      name: qr_flutter
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "4.0.0"
  quiver:
    dependency: transitive
    description:
      name: quiver
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "3.0.1+1"
  shared_preferences:
    dependency: "direct main"
    description:
@@ -364,6 +504,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.1.6"
  tuple:
    dependency: transitive
    description:
      name: tuple
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.0.0"
  typed_data:
    dependency: transitive
    description:
@@ -378,6 +525,90 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.1.0"
  video_player:
    dependency: transitive
    description:
      name: video_player
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.2.6"
  video_player_platform_interface:
    dependency: transitive
    description:
      name: video_player_platform_interface
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "4.2.0"
  video_player_web:
    dependency: transitive
    description:
      name: video_player_web
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.0.4"
  wakelock:
    dependency: transitive
    description:
      name: wakelock
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.5.6"
  wakelock_macos:
    dependency: transitive
    description:
      name: wakelock_macos
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.4.0"
  wakelock_platform_interface:
    dependency: transitive
    description:
      name: wakelock_platform_interface
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.3.0"
  wakelock_web:
    dependency: transitive
    description:
      name: wakelock_web
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.4.0"
  wakelock_windows:
    dependency: transitive
    description:
      name: wakelock_windows
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.2.0"
  webview_flutter:
    dependency: "direct main"
    description:
      name: webview_flutter
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.1.2"
  webview_flutter_android:
    dependency: transitive
    description:
      name: webview_flutter_android
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.2.0"
  webview_flutter_platform_interface:
    dependency: transitive
    description:
      name: webview_flutter_platform_interface
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "1.3.0"
  webview_flutter_wkwebview:
    dependency: transitive
    description:
      name: webview_flutter_wkwebview
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "2.2.0"
  win32:
    dependency: transitive
    description:
@@ -392,6 +623,13 @@
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "0.2.0"
  xml:
    dependency: transitive
    description:
      name: xml
      url: "https://pub.flutter-io.cn"
    source: hosted
    version: "5.3.1"
sdks:
  dart: ">=2.14.0 <3.0.0"
  flutter: ">=2.5.0"
pubspec.yaml
@@ -39,18 +39,30 @@
  dio: ^4.0.0
    #轮播图插件
  #轮播图插件
  flutter_swiper: ^1.1.6
  fluttertoast: ^8.0.8
   #百度地图
#  flutter_bmflocation: ^2.0.0-nullsafety.1
  #百度地图
  #  flutter_bmflocation: ^2.0.0-nullsafety.1
  flutter_baidu_mapapi_base: ^3.0.0
  flutter_baidu_mapapi_map: ^3.0.0+2
  flutter_baidu_mapapi_search: ^3.0.0
  flutter_baidu_mapapi_utils: ^3.0.0
#  flutter_bmflocation: ^2.0.0-nullsafety.1
  #  flutter_bmflocation: ^2.0.0-nullsafety.1
  webview_flutter: ^2.1.2
  #穿山甲广告
  flutter_unionad: ^1.1.6
  flutter_tencentad: ^1.0.4
  flutter_html: ^2.1.5
  #时间日期选择
  flutter_datetime_picker: ^1.5.1
  #二维码生成
  qr_flutter: ^4.0.0
@@ -76,41 +88,13 @@
  # the material Icons class.
  uses-material-design: true
  assets:
    - assets/images/mine/icon_mine_advice.png
    - assets/images/mine/icon_mine_course.png
    - assets/images/mine/icon_mine_footmark.png
    - assets/images/mine/icon_mine_functions.png
    - assets/images/mine/icon_mine_kefu.png
    - assets/images/mine/icon_mine_permission.png
    - assets/images/mine/icon_mine_privacy.png
    - assets/images/mine/icon_mine_protocol.png
    - assets/images/mine/icon_mine_setting.png
    - assets/images/mine/icon_mine_share.png
    - assets/images/mine/ic_mine_top_bg.png
    - assets/images/mine/icon_vip.png
    - assets/images/mine/label_vip.png
    - assets/images/mine/icon_mine_default_portrait.png
    - assets/images/main/icon_main_nav_history.png
    - assets/images/main/icon_main_nav_history_highlight.png
    - assets/images/main/icon_main_nav_location.png
    - assets/images/main/icon_main_nav_mine.png
    - assets/images/main/icon_main_nav_mine_highlight.png
    - assets/images/mine/
    - assets/images/main/
    - assets/images/common/icon_check_false.png
    - assets/images/common/icon_check_true.png
    - assets/images/common/icon_array_right.png
    - assets/images/common/icon_btn_share.png
    - assets/images/common/icon_btn_watch_ad.png
    - assets/images/common/icon_try_functions_logo.png
    - assets/images/common/ic_add_location_person_top.png
    - assets/images/common/icon_back.png
    - assets/images/common/icon_person.png
    - assets/images/advice/ic_advice_top.png
    - assets/images/advice/icon_advice_like.png
    - assets/images/advice/icon_advice_msg.png
    - assets/images/common/
    - assets/images/advice/
    - assets/images/map/
    - assets/images/login/
    - assets/images/ic_splash.png
  # To add assets to your application, add an assets section, like this:
  # assets: