Commit d58738cd authored by 杜欣's avatar 杜欣

Merge branch 'dev' into dx/message

# Conflicts:
#	lib/TestPage.dart
parents 7b7e13e4 23ce2864
...@@ -65,7 +65,7 @@ class MainActivity : FlutterActivity() { ...@@ -65,7 +65,7 @@ class MainActivity : FlutterActivity() {
val map = HashMap<String, String>() val map = HashMap<String, String>()
map.put("buildConfig", "debug") map.put("buildConfig", "debug")
//HERE //HERE
map.put("proxy", "172.30.9.84:6666"); // map.put("proxy", "172.30.9.84:6666");
result.success(map) result.success(map)
} else { } else {
result.notImplemented() result.notImplemented()
......
...@@ -9,6 +9,6 @@ import 'package:gmalpha_flutter/ActivityReportModel/page/ActivityReportPage.dart ...@@ -9,6 +9,6 @@ import 'package:gmalpha_flutter/ActivityReportModel/page/ActivityReportPage.dart
class ActivityReportRouterImpl implements ActivityReportRouter { class ActivityReportRouterImpl implements ActivityReportRouter {
@override @override
Widget getActivityReportPage(int id, int type,String fromPage) { Widget getActivityReportPage(int id, int type,String fromPage) {
return ActivityReportPage(id, type,fromPage); return new ActivityReportPage(id, type,fromPage);
} }
} }
...@@ -13,7 +13,6 @@ import 'package:gmalpha_flutter/commonModel/toast/toast.dart'; ...@@ -13,7 +13,6 @@ import 'package:gmalpha_flutter/commonModel/toast/toast.dart';
class ReputationsModel extends BaseModel { class ReputationsModel extends BaseModel {
LiveData<PrestigeEntity> prestigeLive; LiveData<PrestigeEntity> prestigeLive;
LiveData<String> titleLive; LiveData<String> titleLive;
final int userId; final int userId;
...@@ -23,6 +22,8 @@ class ReputationsModel extends BaseModel { ...@@ -23,6 +22,8 @@ class ReputationsModel extends BaseModel {
ReputationsModel(this.userId, this.userName, this.fromPage) { ReputationsModel(this.userId, this.userName, this.fromPage) {
prestigeLive = new LiveData(); prestigeLive = new LiveData();
titleLive = new LiveData(); titleLive = new LiveData();
print("lsy -->INIT!!!");
} }
init(BuildContext context) { init(BuildContext context) {
...@@ -41,5 +42,6 @@ class ReputationsModel extends BaseModel { ...@@ -41,5 +42,6 @@ class ReputationsModel extends BaseModel {
void dispose() { void dispose() {
prestigeLive.dispost(); prestigeLive.dispost();
titleLive.dispost(); titleLive.dispost();
print("lsy -->DISPOST!!!");
} }
} }
...@@ -16,6 +16,7 @@ class ReputationsPage extends StatefulWidget { ...@@ -16,6 +16,7 @@ class ReputationsPage extends StatefulWidget {
ReputationsModel _model; ReputationsModel _model;
ReputationsPage(int userId, String userName, String fromPage) { ReputationsPage(int userId, String userName, String fromPage) {
print("lsy --> ONEN PAGE");
_model = new ReputationsModel(userId, userName, fromPage); _model = new ReputationsModel(userId, userName, fromPage);
} }
...@@ -60,7 +61,7 @@ class ReputationsState extends BasePage<ReputationsPage> { ...@@ -60,7 +61,7 @@ class ReputationsState extends BasePage<ReputationsPage> {
RouterCenterImpl() RouterCenterImpl()
.findBuriedRouter() .findBuriedRouter()
?.onClick(pageName(), "return"); ?.onClick(pageName(), "return");
Navigator.pop(context,""); Navigator.pop(context, "");
}, },
// child: Image.asset("images/nav_back.png"), // child: Image.asset("images/nav_back.png"),
child: Center( child: Center(
......
...@@ -34,15 +34,11 @@ class TestPage extends StatelessWidget { ...@@ -34,15 +34,11 @@ class TestPage extends StatelessWidget {
)); ));
} }
base(BuildContext context, Widget page, String itemName) { base(BuildContext context, VoidCallback callback, String itemName) {
return Container( return Container(
margin: EdgeInsets.fromLTRB(16, 16, 16, 0), margin: EdgeInsets.fromLTRB(16, 16, 16, 0),
child: OutlineButton( child: OutlineButton(
onPressed: () { onPressed: callback,
Navigator.push(
context,
new CustomRoute(page));
},
child: Text(itemName), child: Text(itemName),
), ),
); );
...@@ -58,37 +54,41 @@ class TestPage extends StatelessWidget { ...@@ -58,37 +54,41 @@ class TestPage extends StatelessWidget {
} }
testReportPage(BuildContext context) { testReportPage(BuildContext context) {
return base( return base(context, () {
context, Navigator.push(
RouterCenterImpl() context,
.findActivityReportRouter() new CustomRoute(RouterCenterImpl()
?.getActivityReportPage(2, 1, ''), .findActivityReportRouter()
"报告页面"); ?.getActivityReportPage(300, 1, '')));
}, "报告页面");
} }
presigePage(BuildContext context) { presigePage(BuildContext context) {
return base( return base(context, () {
context, Navigator.push(
RouterCenterImpl() context,
.findPrestigeRouter() new CustomRoute(RouterCenterImpl()
?.getReputationsPage(1, "ww", "ww"), .findPrestigeRouter()
"专家声望页面"); ?.getReputationsPage(1, "ww", "ww")));
}, "专家声望页面");
} }
albumPage(BuildContext context) { albumPage(BuildContext context) {
return base( return base(context, () {
context, Navigator.push(
RouterCenterImpl().findAlbumRouter()?.getAlbumPage( context,
"com.example.gengmei_flutter_plugin_example", true, 1, null), new CustomRoute(RouterCenterImpl().findAlbumRouter()?.getAlbumPage(
"相册页面"); "com.example.gengmei_flutter_plugin_example", true, 1, null)));
}, "相册页面");
} }
userSettingPage(BuildContext context) { userSettingPage(BuildContext context) {
return base( return base(context, () {
context, Navigator.push(
RouterCenterImpl() context,
.findUserRouter() new CustomRoute(RouterCenterImpl()
?.getUserSettingPage("241765462", "NULL"), .findUserRouter()
"设置页面"); ?.getUserSettingPage("241765462", "NULL")));
}, "设置页面");
} }
} }
...@@ -9,6 +9,7 @@ class LiveData<T> { ...@@ -9,6 +9,7 @@ class LiveData<T> {
T data; T data;
LiveData() { LiveData() {
print("!!!! ${_controller == null}");
this._controller = new StreamController<T>(); this._controller = new StreamController<T>();
} }
...@@ -22,6 +23,7 @@ class LiveData<T> { ...@@ -22,6 +23,7 @@ class LiveData<T> {
} }
void dispost() { void dispost() {
data = null;
_controller.close(); _controller.close();
} }
} }
...@@ -27,7 +27,6 @@ class _MyAppState extends State<MyApp> { ...@@ -27,7 +27,6 @@ class _MyAppState extends State<MyApp> {
void initState() { void initState() {
super.initState(); super.initState();
FlutterBoost.singleton.registerPageBuilders({ FlutterBoost.singleton.registerPageBuilders({
// 'comment_suggest': (pageName, params, _) => CommentSuggest(params),
'message_home': (pageName, params, _) => MessageHomePage(params), 'message_home': (pageName, params, _) => MessageHomePage(params),
'album': (pageName, params, _) { 'album': (pageName, params, _) {
if (params == null) { if (params == null) {
......
...@@ -21,8 +21,10 @@ class CommentModel extends BaseModel { ...@@ -21,8 +21,10 @@ class CommentModel extends BaseModel {
.findBuriedRouter() .findBuriedRouter()
?.onEvent('click_comment_suggest', {'comment_id': '10086'}); ?.onEvent('click_comment_suggest', {'comment_id': '10086'});
UserRepository.getInstance().commentSuggest(content, phone).listen((value) { UserRepository.getInstance().commentSuggest(content, phone).listen((value) {
Toast.show(context, "提交成功");
Navigator.pop(context); Navigator.pop(context);
}).onError((error){ }).onError((error) {
Toast.show(context, "提交失败");
Toast.debugShow(context, error.message); Toast.debugShow(context, error.message);
print(error.message); print(error.message);
}); });
......
...@@ -113,6 +113,13 @@ packages: ...@@ -113,6 +113,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.14.11" version: "1.14.11"
common_utils:
dependency: "direct main"
description:
name: common_utils
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.3"
convert: convert:
dependency: transitive dependency: transitive
description: description:
...@@ -155,6 +162,13 @@ packages: ...@@ -155,6 +162,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.2.7" version: "1.2.7"
decimal:
dependency: transitive
description:
name: decimal
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.5"
dio: dio:
dependency: "direct main" dependency: "direct main"
description: description:
...@@ -447,6 +461,13 @@ packages: ...@@ -447,6 +461,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.3" version: "2.0.3"
rational:
dependency: transitive
description:
name: rational
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.6"
rxdart: rxdart:
dependency: "direct main" dependency: "direct main"
description: description:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment