Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
gm_flutter
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
林生雨
gm_flutter
Commits
8b03e02d
Commit
8b03e02d
authored
Jul 09, 2020
by
林生雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
73e3d6da
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
10 deletions
+14
-10
PlanPage.dart
lib/ClueModel/page/plan/PlanPage.dart
+2
-2
MainRouter.dart
lib/MainRouter/MainRouter.dart
+1
-1
MainRouterImpl.dart
lib/MainRouter/MainRouterImpl.dart
+3
-2
MainManager.dart
lib/MainRouter/manager/MainManager.dart
+8
-5
No files found.
lib/ClueModel/page/plan/PlanPage.dart
View file @
8b03e02d
...
@@ -65,9 +65,9 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
...
@@ -65,9 +65,9 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
// DioUtil.getInstance().setProxy("172.30.8.245");
// DioUtil.getInstance().setProxy("172.30.8.245");
super
.
initState
();
super
.
initState
();
if
(
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
COOKIE
)
==
null
)
{
if
(
CacheManager
.
getInstance
().
get
(
MEMORY_CACHE
).
get
(
COOKIE
)
==
null
)
{
RouterCenterImpl
().
findMainRouter
().
getInitParams
(
).
then
((
va
)
{
RouterCenterImpl
().
findMainRouter
().
getInitParams
(
((
)
{
_model
.
init
();
_model
.
init
();
});
})
)
;
}
else
{
}
else
{
_model
.
init
();
_model
.
init
();
}
}
...
...
lib/MainRouter/MainRouter.dart
View file @
8b03e02d
...
@@ -21,6 +21,6 @@ abstract class MainRouter extends RouterBaser {
...
@@ -21,6 +21,6 @@ abstract class MainRouter extends RouterBaser {
void
catchErrorToBugly
(
String
err
);
void
catchErrorToBugly
(
String
err
);
Future
getInitParams
(
);
void
getInitParams
(
VoidCallback
callback
);
}
}
lib/MainRouter/MainRouterImpl.dart
View file @
8b03e02d
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* @author lsy
* @author lsy
* @date 2019-12-31
* @date 2019-12-31
**/
**/
import
'package:dio/dio.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
import
'package:gm_flutter/MainRouter/manager/JumpManager.dart'
;
import
'package:gm_flutter/MainRouter/manager/JumpManager.dart'
;
import
'package:gm_flutter/MainRouter/manager/MainManager.dart'
;
import
'package:gm_flutter/MainRouter/manager/MainManager.dart'
;
...
@@ -43,7 +44,7 @@ class MainRouterImpl implements MainRouter {
...
@@ -43,7 +44,7 @@ class MainRouterImpl implements MainRouter {
}
}
@override
@override
Future
getInitParams
(
)
{
void
getInitParams
(
VoidCallback
callback
)
{
return
MainManager
.
getInstance
().
getInitParams
(
);
MainManager
.
getInstance
().
getInitParams
(
callback
);
}
}
}
}
lib/MainRouter/manager/MainManager.dart
View file @
8b03e02d
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
**/
**/
import
'dart:async'
;
import
'dart:async'
;
import
'package:dio/dio.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:gm_flutter/commonModel/GMBase.dart'
;
import
'package:gm_flutter/commonModel/GMBase.dart'
;
...
@@ -107,18 +108,20 @@ class MainManager {
...
@@ -107,18 +108,20 @@ class MainManager {
}
}
}
}
Future
getInitParams
()
async
{
void
getInitParams
(
VoidCallback
callback
)
{
// Completer completer = Completer();
if
(
isInit
)
{
if
(
isInit
)
{
if
(
flutterChannel
!=
null
)
{
if
(
flutterChannel
!=
null
)
{
var
data
=
await
flutterChannel
.
invokeMethod
(
"get_common_params"
);
flutterChannel
.
invokeMethod
(
"get_common_params"
).
then
((
data
)
{
if
(
data
is
Map
)
{
if
(
data
is
Map
)
{
var
map
=
Map
<
String
,
dynamic
>.
from
(
data
);
var
map
=
Map
<
String
,
dynamic
>.
from
(
data
);
initParams
(
map
);
initParams
(
map
);
}
}
}).
whenComplete
(()
{
callback
();
});
return
;
}
}
}
}
// completer.complete();
callback
();
return
Future
.
value
(
""
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment