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
e7c84792
Commit
e7c84792
authored
Jun 29, 2020
by
朱翠翠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of
http://git.wanmeizhensuo.com/linshengyu/gm_flutter
into zcc/flutter
parents
e2b41f5d
bb8430c3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
227 additions
and
41 deletions
+227
-41
LevelOnePage.dart
lib/ClueModel/page/levelOne/LevelOnePage.dart
+17
-0
LevelPreview.dart
lib/ClueModel/server/entity/LevelPreview.dart
+162
-0
DemoPage.dart
lib/DemoPage.dart
+8
-0
MainRouter.dart
lib/MainRouter/MainRouter.dart
+1
-0
MainRouterImpl.dart
lib/MainRouter/MainRouterImpl.dart
+5
-1
MainManager.dart
lib/MainRouter/manager/MainManager.dart
+13
-14
BaseUtil.dart
lib/commonModel/base/BaseUtil.dart
+1
-11
main.dart
lib/main.dart
+17
-15
update.sh
update.sh
+3
-0
No files found.
lib/ClueModel/page/levelOne/LevelOnePage.dart
0 → 100644
View file @
e7c84792
/*
* @author lsy
* @date 2020/6/29
**/
import
'package:flutter/cupertino.dart'
;
import
'package:gm_flutter/commonModel/base/BaseState.dart'
;
class
LevelOnePage
extends
StatefulWidget
{
@override
State
<
StatefulWidget
>
createState
()
=>
LevelOneState
();
}
class
LevelOneState
extends
BaseState
<
LevelOnePage
>
{
@override
Widget
buildItem
(
BuildContext
context
)
{
}
}
lib/ClueModel/server/entity/LevelPreview.dart
0 → 100644
View file @
e7c84792
/*
* @author lsy
* @date 2020/6/29
**/
class
LevelPreview
{
Banner
banner
;
String
name
;
String
positiveRate
;
String
salesCount
;
String
planDescription
;
List
<
OverviewAttrs
>
overviewAttrs
;
List
<
ExplanationAttrs
>
explanationAttrs
;
List
<
Tabs
>
tabs
;
LevelPreview
(
{
this
.
banner
,
this
.
name
,
this
.
positiveRate
,
this
.
salesCount
,
this
.
planDescription
,
this
.
overviewAttrs
,
this
.
explanationAttrs
,
this
.
tabs
});
LevelPreview
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
banner
=
json
[
'banner'
]
!=
null
?
new
Banner
.
fromJson
(
json
[
'banner'
])
:
null
;
name
=
json
[
'name'
];
positiveRate
=
json
[
'positive_rate'
];
salesCount
=
json
[
'sales_count'
];
planDescription
=
json
[
'plan_description'
];
if
(
json
[
'overview_attrs'
]
!=
null
)
{
overviewAttrs
=
new
List
<
OverviewAttrs
>();
json
[
'overview_attrs'
].
forEach
((
v
)
{
overviewAttrs
.
add
(
new
OverviewAttrs
.
fromJson
(
v
));
});
}
if
(
json
[
'explanation_attrs'
]
!=
null
)
{
explanationAttrs
=
new
List
<
ExplanationAttrs
>();
json
[
'explanation_attrs'
].
forEach
((
v
)
{
explanationAttrs
.
add
(
new
ExplanationAttrs
.
fromJson
(
v
));
});
}
if
(
json
[
'tabs'
]
!=
null
)
{
tabs
=
new
List
<
Tabs
>();
json
[
'tabs'
].
forEach
((
v
)
{
tabs
.
add
(
new
Tabs
.
fromJson
(
v
));
});
}
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
if
(
this
.
banner
!=
null
)
{
data
[
'banner'
]
=
this
.
banner
.
toJson
();
}
data
[
'name'
]
=
this
.
name
;
data
[
'positive_rate'
]
=
this
.
positiveRate
;
data
[
'sales_count'
]
=
this
.
salesCount
;
data
[
'plan_description'
]
=
this
.
planDescription
;
if
(
this
.
overviewAttrs
!=
null
)
{
data
[
'overview_attrs'
]
=
this
.
overviewAttrs
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
if
(
this
.
explanationAttrs
!=
null
)
{
data
[
'explanation_attrs'
]
=
this
.
explanationAttrs
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
if
(
this
.
tabs
!=
null
)
{
data
[
'tabs'
]
=
this
.
tabs
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
return
data
;
}
}
class
Banner
{
String
type
;
String
url
;
Banner
({
this
.
type
,
this
.
url
});
Banner
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
type
=
json
[
'type'
];
url
=
json
[
'url'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'type'
]
=
this
.
type
;
data
[
'url'
]
=
this
.
url
;
return
data
;
}
}
class
OverviewAttrs
{
int
attrId
;
String
attrName
;
String
attrValue
;
OverviewAttrs
({
this
.
attrId
,
this
.
attrName
,
this
.
attrValue
});
OverviewAttrs
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
attrId
=
json
[
'attr_id'
];
attrName
=
json
[
'attr_name'
];
attrValue
=
json
[
'attr_value'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'attr_id'
]
=
this
.
attrId
;
data
[
'attr_name'
]
=
this
.
attrName
;
data
[
'attr_value'
]
=
this
.
attrValue
;
return
data
;
}
}
class
Tabs
{
String
tabType
;
String
name
;
Tabs
({
this
.
tabType
,
this
.
name
});
Tabs
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
tabType
=
json
[
'tab_type'
];
name
=
json
[
'name'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'tab_type'
]
=
this
.
tabType
;
data
[
'name'
]
=
this
.
name
;
return
data
;
}
}
class
ExplanationAttrs
{
int
attrId
;
String
attrName
;
String
attrValue
;
ExplanationAttrs
({
this
.
attrId
,
this
.
attrName
,
this
.
attrValue
});
ExplanationAttrs
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
attrId
=
json
[
'attr_id'
];
attrName
=
json
[
'attr_name'
];
attrValue
=
json
[
'attr_value'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'attr_id'
]
=
this
.
attrId
;
data
[
'attr_name'
]
=
this
.
attrName
;
data
[
'attr_value'
]
=
this
.
attrValue
;
return
data
;
}
}
lib/DemoPage.dart
View file @
e7c84792
...
@@ -6,6 +6,8 @@ import 'package:flutter/cupertino.dart';
...
@@ -6,6 +6,8 @@ import 'package:flutter/cupertino.dart';
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'commonModel/base/BaseUtil.dart'
;
class
DemoPage
extends
StatefulWidget
{
class
DemoPage
extends
StatefulWidget
{
@override
@override
State
<
StatefulWidget
>
createState
()
{
State
<
StatefulWidget
>
createState
()
{
...
@@ -14,6 +16,12 @@ class DemoPage extends StatefulWidget {
...
@@ -14,6 +16,12 @@ class DemoPage extends StatefulWidget {
}
}
class
DemoState
extends
State
<
DemoPage
>
{
class
DemoState
extends
State
<
DemoPage
>
{
@override
void
initState
()
{
super
.
initState
();
flutterChannel
.
invokeMethod
(
"method!!!"
,
"wwww"
);
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
...
...
lib/MainRouter/MainRouter.dart
View file @
e7c84792
...
@@ -9,4 +9,5 @@ import 'MainRouterImpl.dart';
...
@@ -9,4 +9,5 @@ import 'MainRouterImpl.dart';
@Router
(
"MainRouter"
,
MainRouterImpl
,
true
)
@Router
(
"MainRouter"
,
MainRouterImpl
,
true
)
abstract
class
MainRouter
extends
RouterBaser
{
abstract
class
MainRouter
extends
RouterBaser
{
void
init
();
}
}
lib/MainRouter/MainRouterImpl.dart
View file @
e7c84792
...
@@ -3,9 +3,13 @@
...
@@ -3,9 +3,13 @@
* @date 2019-12-31
* @date 2019-12-31
**/
**/
import
'package:flutter/src/widgets/framework.dart'
;
import
'package:flutter/src/widgets/framework.dart'
;
import
'package:gm_flutter/MainRouter/manager/MainManager.dart'
;
import
'MainRouter.dart'
;
import
'MainRouter.dart'
;
class
MainRouterImpl
implements
MainRouter
{
class
MainRouterImpl
implements
MainRouter
{
@override
void
init
()
{
MainManager
.
getInstance
().
startInit
();
}
}
}
lib/MainRouter/manager/MainManager.dart
View file @
e7c84792
...
@@ -5,23 +5,23 @@
...
@@ -5,23 +5,23 @@
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
class
MainManager
{
class
MainManager
{
static
const
EventChannel
_channel
=
EventChannel
(
"flutter_plugin_event"
);
MainManager
.
_
(){
MainManager
.
_
()
{}
FlutterBoost
.
singleton
.
channel
.
addMethodHandler
((
call
){
});
}
static
MainManager
_mainManager
;
static
MainManager
_mainManager
;
static
MainManager
getInstance
(){
if
(
_mainManager
==
null
){
static
MainManager
getInstance
()
{
_mainManager
=
MainManager
.
_
();
if
(
_mainManager
==
null
)
{
_mainManager
=
MainManager
.
_
();
}
}
return
_mainManager
;
return
_mainManager
;
}
}
startInit
()
{
_channel
.
receiveBroadcastStream
().
listen
((
data
)
{
print
(
"LSY FLUTTER EVENT
${data}
"
);
}
});
\ No newline at end of file
}
}
lib/commonModel/base/BaseUtil.dart
View file @
e7c84792
...
@@ -8,15 +8,5 @@ import 'dart:ui';
...
@@ -8,15 +8,5 @@ import 'dart:ui';
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
const
_miniChannle
=
const
MethodChannel
(
'gengmei_mini
'
);
const
flutterChannel
=
const
MethodChannel
(
'gm_method_channel
'
);
const
bool
isDebug
=
!
const
bool
.
fromEnvironment
(
"dart.vm.product"
);
const
bool
isDebug
=
!
const
bool
.
fromEnvironment
(
"dart.vm.product"
);
Future
backApp
(
)
async
{
return
await
_miniChannle
.
invokeMethod
(
"backApp"
);
}
void
jumpToPage
(
Widget
page
,
BuildContext
context
)
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
((
context
)
{
return
page
;
})));
}
lib/main.dart
View file @
e7c84792
...
@@ -5,6 +5,7 @@ import 'package:flutter_boost/flutter_boost.dart';
...
@@ -5,6 +5,7 @@ import 'package:flutter_boost/flutter_boost.dart';
import
'package:flutter_common/Annotations/anno/RouterCenter.dart'
;
import
'package:flutter_common/Annotations/anno/RouterCenter.dart'
;
import
'package:flutter_common/commonModel/util/WindowUtil.dart'
;
import
'package:flutter_common/commonModel/util/WindowUtil.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/commonModel/base/BaseComponent.dart'
;
import
'package:gm_flutter/main.mark.dart'
;
import
'DemoPage.dart'
;
import
'DemoPage.dart'
;
import
'DemoPage1.dart'
;
import
'DemoPage1.dart'
;
...
@@ -27,10 +28,10 @@ void main() {
...
@@ -27,10 +28,10 @@ void main() {
};
};
runZonedGuarded
(()
{
runZonedGuarded
(()
{
WidgetsFlutterBinding
.
ensureInitialized
();
WidgetsFlutterBinding
.
ensureInitialized
();
runApp
(
runApp
(
MyAppWidget
(),
MyAppWidget
(),
);
);
RouterCenterImpl
().
findMainRouter
().
init
();
},
(
Object
error
,
StackTrace
stack
)
{
},
(
Object
error
,
StackTrace
stack
)
{
//TODO
//TODO
print
(
"lsy EEEEEE
${error.toString()}
${stack.toString()}
"
);
print
(
"lsy EEEEEE
${error.toString()}
${stack.toString()}
"
);
...
@@ -57,8 +58,9 @@ class MyApp extends State<MyAppWidget> {
...
@@ -57,8 +58,9 @@ class MyApp extends State<MyAppWidget> {
return
DemoPage1
();
return
DemoPage1
();
},
},
});
});
// FlutterBoost.singleton.addBoostContainerLifeCycleObserver((state, settings) {
FlutterBoost
.
singleton
.
addBoostContainerLifeCycleObserver
((
state
,
settings
)
{
// });
print
(
"LSY
${state}
"
);
});
// FlutterBoost.singleton.addBoostNavigatorObserver(TestBoostNavigatorObserver());
// FlutterBoost.singleton.addBoostNavigatorObserver(TestBoostNavigatorObserver());
}
}
...
@@ -66,18 +68,18 @@ class MyApp extends State<MyAppWidget> {
...
@@ -66,18 +68,18 @@ class MyApp extends State<MyAppWidget> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
WindowUtil
.
setBarStatus
(
true
);
WindowUtil
.
setBarStatus
(
true
);
return
MaterialApp
(
return
MaterialApp
(
theme:
ThemeData
(),
theme:
ThemeData
(),
builder:
FlutterBoost
.
init
(
postPush:
_onRoutePushed
),
builder:
FlutterBoost
.
init
(
postPush:
_onRoutePushed
),
//
home: isDebug
home:
isDebug
//
? Container(
?
Container
(
//
color: Colors.red,
color:
Colors
.
red
,
//
)
)
//
: Container(
:
Container
(
//
color: Colors.white,
color:
Colors
.
white
,
//
child: Center(
child:
Center
(
//
child: loadingItem(),
child:
loadingItem
(),
//
),
),
//
)
)
);
);
}
}
...
...
update.sh
View file @
e7c84792
...
@@ -35,8 +35,11 @@ cp -r /Users/apple/lsy/gm_flutter/build/host/outputs/apk/release/app-release.apk
...
@@ -35,8 +35,11 @@ cp -r /Users/apple/lsy/gm_flutter/build/host/outputs/apk/release/app-release.apk
unzip
${
projectDir
}
/build/host/outputs/apk/release/app-release.zip
-d
${
projectDir
}
/build/host/outputs/apk/release
unzip
${
projectDir
}
/build/host/outputs/apk/release/app-release.zip
-d
${
projectDir
}
/build/host/outputs/apk/release
#cp -r /Users/apple/lsy/gm_flutter/build/host/outputs/apk/release/app-release/lib/armeabi-v7a/* /Users/apple/lsy/update/androd${message}${dif}/
#cp -r /Users/apple/lsy/gm_flutter/build/host/outputs/apk/release/app-release/lib/armeabi-v7a/* /Users/apple/lsy/update/androd${message}${dif}/
rm
-rf
/Users/apple/Downloads/PLLL/app/libs/armeabi-v7a/
*
rm
-rf
/Users/apple/Downloads/PLLL/app/libs/armeabi-v7a/
*
rm
-rf
/Users/apple/lsy/gengmei_android/gm-flutter/libs/armeabi-v7a/
*
cp
-r
/Users/apple/lsy/gm_flutter/build/host/outputs/apk/release/lib/armeabi-v7a/
*
/Users/apple/Downloads/PLLL/app/libs/armeabi-v7a/
cp
-r
/Users/apple/lsy/gm_flutter/build/host/outputs/apk/release/lib/armeabi-v7a/
*
/Users/apple/Downloads/PLLL/app/libs/armeabi-v7a/
cp
-r
/Users/apple/lsy/gm_flutter/build/host/outputs/apk/release/lib/armeabi-v7a/
*
/Users/apple/lsy/gengmei_android/gm-flutter/libs/armeabi-v7a/
...
...
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