Browse Source

更新路由工具

tags/0.0.1
Weller 4 years ago
parent
commit
dad19b3dda
8 changed files with 299 additions and 58 deletions
  1. +1
    -1
      .idea/libraries/Flutter_Plugins.xml
  2. +7
    -0
      .idea/vcs.xml
  3. +211
    -40
      .idea/workspace.xml
  4. +15
    -1
      example/pubspec.lock
  5. +13
    -0
      lib/pages/login_page.dart
  6. +30
    -15
      lib/util/router_util.dart
  7. +15
    -1
      pubspec.lock
  8. +7
    -0
      zhiying_comm.iml

+ 1
- 1
.idea/libraries/Flutter_Plugins.xml View File

@@ -5,7 +5,6 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+7" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+7" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/flutter_native_image-0.0.5+2" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/flutter_native_image-0.0.5+2" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-7.0.4" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.14" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.14" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.10" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.10" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+1" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+1" />
@@ -13,6 +12,7 @@
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+3" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+3" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2" /> <root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2" />
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />


+ 7
- 0
.idea/vcs.xml View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm" vcs="Git" />
</component>
</project>

+ 211
- 40
.idea/workspace.xml View File

@@ -1,7 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="0ff6f366-28dc-4efd-9bca-709f40bc6813" name="Default Changelist" comment="" />
<list default="true" id="0ff6f366-28dc-4efd-9bca-709f40bc6813" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/lib/pages/login_page.dart" afterDir="false" />
<change afterPath="$PROJECT_DIR$/lib/pages/login_page.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/libraries/Flutter_Plugins.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Flutter_Plugins.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/.idea/libraries/Flutter_Plugins.xml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/.idea/libraries/Flutter_Plugins.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/example/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/example/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/lib/util/net_util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/lib/util/net_util.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/lib/util/router_util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/lib/util/router_util.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/zhiying_comm.iml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/zhiying_comm/zhiying_comm.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/util/net_util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/util/net_util.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/util/router_util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/util/router_util.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/zhiying_comm.iml" beforeDir="false" afterPath="$PROJECT_DIR$/zhiying_comm.iml" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/.dart_tool/" /> <ignored path="$PROJECT_DIR$/.dart_tool/" />
<ignored path="$PROJECT_DIR$/.idea/" /> <ignored path="$PROJECT_DIR$/.idea/" />
<ignored path="$PROJECT_DIR$/.pub/" /> <ignored path="$PROJECT_DIR$/.pub/" />
@@ -15,53 +32,58 @@
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="DefaultGradleProjectSettings"> <component name="DefaultGradleProjectSettings">
<option name="testRunner" value="GRADLE" />
<option name="delegatedBuild" value="true" />
<option name="isMigrated" value="true" />
</component> </component>
<component name="ExecutionTargetManager" SELECTED_TARGET="63eb889" /> <component name="ExecutionTargetManager" SELECTED_TARGET="63eb889" />
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/zhiying_comm.dart">
<entry file="file://$PROJECT_DIR$/ios/Classes/ZhiyingCommPlugin.m">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="294">
<caret line="14" column="31" selection-start-line="14" selection-start-column="31" selection-end-line="14" selection-end-column="31" />
<state relative-caret-position="210">
<caret line="10" selection-start-line="10" selection-end-line="10" />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/android/src/main/AndroidManifest.xml">
<entry file="file://$PROJECT_DIR$/lib/pages/empty_page.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="63">
<caret line="3" selection-start-line="3" selection-end-line="3" />
<state relative-caret-position="273">
<caret line="13" lean-forward="true" selection-start-line="13" selection-end-line="13" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/ios/Classes/ZhiyingCommPlugin.h">
<entry file="file://$PROJECT_DIR$/lib/pages/login_page.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="84">
<caret line="4" selection-start-line="4" selection-end-line="4" />
<state relative-caret-position="273">
<caret line="13" lean-forward="true" selection-start-line="13" selection-end-line="13" />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/ios/Classes/ZhiyingCommPlugin.m">
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="10" selection-start-line="10" selection-end-line="10" />
<state relative-caret-position="336">
<caret line="16" column="22" selection-start-line="16" selection-start-column="22" selection-end-line="16" selection-end-column="22" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<entry file="file://$PROJECT_DIR$/lib/util/widget_factory.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="101">
<caret line="16" column="22" selection-start-line="16" selection-start-column="22" selection-end-line="16" selection-end-column="22" />
<state relative-caret-position="398">
<caret line="52" column="33" selection-start-line="52" selection-start-column="33" selection-end-line="52" selection-end-column="33" />
<folding> <folding>
<element signature="e#0#39#0" expanded="true" /> <element signature="e#0#39#0" expanded="true" />
</folding> </folding>
@@ -70,10 +92,40 @@
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/util/widget_factory.dart">
<entry file="file://$PROJECT_DIR$/lib/util/router_util.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="427">
<caret line="48" column="51" selection-start-line="48" selection-start-column="51" selection-end-line="48" selection-end-column="51" />
<state relative-caret-position="79">
<caret line="5" column="16" selection-start-line="5" selection-start-column="6" selection-end-line="5" selection-end-column="16" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/models/user/user_info_model.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="39">
<caret line="4" column="19" selection-start-line="4" selection-start-column="6" selection-end-line="4" selection-end-column="19" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/models/user/user_info_model_notifier.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="276">
<caret line="27" column="15" selection-start-line="27" selection-start-column="2" selection-end-line="27" selection-end-column="15" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/util/native_util.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="190">
<caret line="46" column="11" selection-start-line="46" selection-start-column="11" selection-end-line="46" selection-end-column="11" />
<folding> <folding>
<element signature="e#0#39#0" expanded="true" /> <element signature="e#0#39#0" expanded="true" />
</folding> </folding>
@@ -84,7 +136,7 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/../../flutter-sdk/packages/flutter/lib/src/widgets/basic.dart"> <entry file="file://$PROJECT_DIR$/../../flutter-sdk/packages/flutter/lib/src/widgets/basic.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="172">
<state relative-caret-position="59661">
<caret line="2903" column="8" selection-start-line="2903" selection-start-column="8" selection-end-line="2903" selection-end-column="8" /> <caret line="2903" column="8" selection-start-line="2903" selection-start-column="8" selection-end-line="2903" selection-end-column="8" />
</state> </state>
</provider> </provider>
@@ -92,11 +144,39 @@
</file> </file>
</leaf> </leaf>
</component> </component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Dart File" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>RouterUtil</find>
<find>UserInfoModel</find>
<find>getUserInfoModel</find>
<find>UserInfoNotifier</find>
<find>naviga</find>
</findStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/lib/pages/login_page.dart" />
<option value="$PROJECT_DIR$/lib/util/router_util.dart" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6"> <component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="922" />
<option name="x" value="13" />
<option name="y" value="23" /> <option name="y" value="23" />
<option name="width" value="998" />
<option name="height" value="978" />
<option name="width" value="1907" />
<option name="height" value="1015" />
</component> </component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" /> <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView"> <component name="ProjectView">
@@ -104,6 +184,7 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="PackagesPane" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<expand> <expand>
@@ -116,6 +197,19 @@
<item name="zhiying_comm" type="462c0819:PsiDirectoryNode" /> <item name="zhiying_comm" type="462c0819:PsiDirectoryNode" />
<item name="lib" type="462c0819:PsiDirectoryNode" /> <item name="lib" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path>
<item name="zhiying_comm" type="b2602c69:ProjectViewProjectNode" />
<item name="zhiying_comm" type="462c0819:PsiDirectoryNode" />
<item name="lib" type="462c0819:PsiDirectoryNode" />
<item name="models" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="zhiying_comm" type="b2602c69:ProjectViewProjectNode" />
<item name="zhiying_comm" type="462c0819:PsiDirectoryNode" />
<item name="lib" type="462c0819:PsiDirectoryNode" />
<item name="models" type="462c0819:PsiDirectoryNode" />
<item name="user" type="462c0819:PsiDirectoryNode" />
</path>
<path> <path>
<item name="zhiying_comm" type="b2602c69:ProjectViewProjectNode" /> <item name="zhiying_comm" type="b2602c69:ProjectViewProjectNode" />
<item name="zhiying_comm" type="462c0819:PsiDirectoryNode" /> <item name="zhiying_comm" type="462c0819:PsiDirectoryNode" />
@@ -132,12 +226,12 @@
<select /> <select />
</subPane> </subPane>
</pane> </pane>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="AndroidView" /> <pane id="AndroidView" />
<pane id="Scope" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="dart.analysis.tool.window.force.activate" value="false" /> <property name="dart.analysis.tool.window.force.activate" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="show.migrate.to.gradle.popup" value="false" /> <property name="show.migrate.to.gradle.popup" value="false" />
@@ -185,7 +279,9 @@
<window_info id="Resources Explorer" order="6" /> <window_info id="Resources Explorer" order="6" />
<window_info id="Capture Tool" order="7" /> <window_info id="Capture Tool" order="7" />
<window_info id="Favorites" order="8" side_tool="true" /> <window_info id="Favorites" order="8" side_tool="true" />
<window_info anchor="bottom" id="Dart Analysis" order="0" visible="true" weight="0.37375966" />
<window_info anchor="bottom" id="Find" />
<window_info anchor="bottom" id="Messages" visible="true" weight="0.3296582" />
<window_info anchor="bottom" id="Dart Analysis" order="0" weight="0.37375966" />
<window_info anchor="bottom" id="Run" order="1" /> <window_info anchor="bottom" id="Run" order="1" />
<window_info anchor="bottom" id="TODO" order="2" /> <window_info anchor="bottom" id="TODO" order="2" />
<window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" /> <window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" />
@@ -204,6 +300,8 @@
</layout> </layout>
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/ios/Classes/HairuyiFlutterCommPlugin.h" />
<entry file="file://$PROJECT_DIR$/ios/Classes/HairuyiFlutterCommPlugin.m" />
<entry file="file://$PROJECT_DIR$/lib/zhiying_comm.dart"> <entry file="file://$PROJECT_DIR$/lib/zhiying_comm.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="294"> <state relative-caret-position="294">
@@ -211,16 +309,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="101">
<caret line="16" column="22" selection-start-line="16" selection-start-column="22" selection-end-line="16" selection-end-column="22" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/android/src/main/AndroidManifest.xml"> <entry file="file://$PROJECT_DIR$/android/src/main/AndroidManifest.xml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="63"> <state relative-caret-position="63">
@@ -235,8 +323,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/ios/Classes/HairuyiFlutterCommPlugin.h" />
<entry file="file://$PROJECT_DIR$/ios/Classes/HairuyiFlutterCommPlugin.m" />
<entry file="file://$PROJECT_DIR$/ios/Classes/ZhiyingCommPlugin.m"> <entry file="file://$PROJECT_DIR$/ios/Classes/ZhiyingCommPlugin.m">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210"> <state relative-caret-position="210">
@@ -244,5 +330,90 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="336">
<caret line="16" column="22" selection-start-line="16" selection-start-column="22" selection-end-line="16" selection-end-column="22" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../../flutter-sdk/packages/flutter/lib/src/widgets/basic.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="59661">
<caret line="2903" column="8" selection-start-line="2903" selection-start-column="8" selection-end-line="2903" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/util/widget_factory.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="398">
<caret line="52" column="33" selection-start-line="52" selection-start-column="33" selection-end-line="52" selection-end-column="33" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/models/user/user_info_model.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="39">
<caret line="4" column="19" selection-start-line="4" selection-start-column="6" selection-end-line="4" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
<caret line="26" column="29" selection-start-line="26" selection-start-column="29" selection-end-line="26" selection-end-column="29" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/models/user/user_info_model_notifier.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="276">
<caret line="27" column="15" selection-start-line="27" selection-start-column="2" selection-end-line="27" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/pages/empty_page.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="273">
<caret line="13" lean-forward="true" selection-start-line="13" selection-end-line="13" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/util/native_util.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="190">
<caret line="46" column="11" selection-start-line="46" selection-start-column="11" selection-end-line="46" selection-end-column="11" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/pages/login_page.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="273">
<caret line="13" lean-forward="true" selection-start-line="13" selection-end-line="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/util/router_util.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="79">
<caret line="5" column="16" selection-start-line="5" selection-start-column="6" selection-end-line="5" selection-end-column="16" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component> </component>
</project> </project>

+ 15
- 1
example/pubspec.lock View File

@@ -267,7 +267,7 @@ packages:
name: fluttertoast name: fluttertoast
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "7.0.4"
version: "4.0.1"
glob: glob:
dependency: transitive dependency: transitive
description: description:
@@ -380,6 +380,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.9.7" version: "0.9.7"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.4"
node_interop: node_interop:
dependency: transitive dependency: transitive
description: description:
@@ -485,6 +492,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.0.13" version: "3.0.13"
provider:
dependency: transitive
description:
name: provider
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.5+1"
pub_semver: pub_semver:
dependency: transitive dependency: transitive
description: description:


+ 13
- 0
lib/pages/login_page.dart View File

@@ -0,0 +1,13 @@
import 'package:flutter/material.dart';

class LoginPage extends StatefulWidget {
@override
_LoginPageState createState() => _LoginPageState();
}

class _LoginPageState extends State<LoginPage> {
@override
Widget build(BuildContext context) {
return Material(child: Center(child: Text('登录页'),),);
}
}

+ 30
- 15
lib/util/router_util.dart View File

@@ -1,22 +1,37 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:zhiying_comm/pages/login_page.dart';
import 'package:zhiying_comm/zhiying_comm.dart'; import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:provider/provider.dart';


class RouterUtil { class RouterUtil {
/**
* @description: 公共方法页面跳转,如果flutter端已经注册,直接跳转,否则转交原生处理
* @param {BasePageModel} 页面数据
* @param {BuildContext} context
* @return:
*/
static void route(Map<String, dynamic> model, BuildContext context) {
String name = model.containsKey('name') ? model['name'] : '';
if (PageFactory.hasRegisted(name)) {
Widget page = PageFactory.create(name, model);
Navigator.push(context, MaterialPageRoute(builder: (context) {
return page;
}));
} else {
NativeUtil.openPage(context, model);

static Future route(Map<String, dynamic> model, BuildContext context) {
// 唯一跳转标识
String skipIdentifier = model['skip_identifier'].toString();
// 需要登录
String requiredLogin = model['required_login'].toString();
// 需要淘宝授权
String requiredTaobaoAuth = model['required_taobao_auth'].toString();


if (requiredLogin == '1') {
UserInfoModel user = Provider.of<UserInfoNotifier>(context, listen: false).getUserInfoModel();
print(user.toString());
if (user?.token == null || user.token == '') {
print('need login...');
return Navigator.of(context)
.push(MaterialPageRoute(builder: (BuildContext context) {
return LoginPage();
}));
}
} }

return Navigator.of(context)
.push(MaterialPageRoute(builder: (BuildContext context) {
if (PageFactory.hasRegisted(skipIdentifier)) {
return PageFactory.create(skipIdentifier, model);
}
return EmptyPage();
}));
} }
} }

+ 15
- 1
pubspec.lock View File

@@ -260,7 +260,7 @@ packages:
name: fluttertoast name: fluttertoast
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "7.0.4"
version: "4.0.1"
glob: glob:
dependency: transitive dependency: transitive
description: description:
@@ -373,6 +373,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.9.7" version: "0.9.7"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.4"
node_interop: node_interop:
dependency: transitive dependency: transitive
description: description:
@@ -478,6 +485,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.0.13" version: "3.0.13"
provider:
dependency: "direct main"
description:
name: provider
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.5+1"
pub_semver: pub_semver:
dependency: transitive dependency: transitive
description: description:


+ 7
- 0
zhiying_comm.iml View File

@@ -11,6 +11,13 @@
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" /> <excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" /> <excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" /> <excludeFolder url="file://$MODULE_DIR$/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/zhiying_comm/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/zhiying_comm/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/zhiying_comm/build" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/zhiying_comm/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/zhiying_comm/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/zhiying_comm/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/App.framework/flutter_assets/packages" />
</content> </content>
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" /> <orderEntry type="library" name="Dart SDK" level="project" />


Loading…
Cancel
Save