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