Commit de780466 authored by 杜欣's avatar 杜欣

add new message

parent 8725a994
sdk.dir=/Users/apple/Library/Android/sdk sdk.dir=/Users/gengmei/Library/Android/sdk
flutter.sdk=/Users/apple/Downloads/flutter flutter.sdk=/Users/gengmei/flutter
flutter.buildMode=debug flutter.buildMode=debug
flutter.versionName=1.0.0 flutter.versionName=1.0.0
flutter.versionCode=1 flutter.versionCode=1
\ No newline at end of file
/Users/apple/Downloads/flutter/bin/cache/artifacts/engine /Users/gengmei/flutter/bin/cache/artifacts/engine
\ No newline at end of file \ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_boost-0.0.420 /Users/gengmei/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_boost-0.0.420
\ No newline at end of file \ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/git/flutter_plugin-4e7c15a7f1e1b7c17655e87ab3ad3434bbe5cdae /Users/gengmei/flutter/.pub-cache/git/flutter_plugin-4e7c15a7f1e1b7c17655e87ab3ad3434bbe5cdae
\ No newline at end of file \ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.3.0 /Users/gengmei/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.3.0
\ No newline at end of file \ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.1.6+5 /Users/gengmei/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.1.6+5
\ No newline at end of file \ No newline at end of file
/Users/apple/Downloads/flutter/.pub-cache/hosted/pub.flutter-io.cn/xservice_kit-0.0.29 /Users/gengmei/flutter/.pub-cache/hosted/pub.flutter-io.cn/xservice_kit-0.0.29
\ No newline at end of file \ No newline at end of file
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
// This is a generated file; do not edit or check into version control. // This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/apple/Downloads/flutter FLUTTER_ROOT=/Users/gengmei/flutter
FLUTTER_APPLICATION_PATH=/Users/apple/lsy/gmalpha_flutter FLUTTER_APPLICATION_PATH=/Users/gengmei/Documents/workspace/gmalpha_flutter
FLUTTER_TARGET=/Users/apple/lsy/gmalpha_flutter/lib/main.dart FLUTTER_TARGET=/Users/gengmei/Documents/workspace/gmalpha_flutter/lib/main.dart
FLUTTER_BUILD_DIR=build FLUTTER_BUILD_DIR=build
SYMROOT=${SOURCE_ROOT}/../build/ios SYMROOT=${SOURCE_ROOT}/../build/ios
FLUTTER_FRAMEWORK_DIR=/Users/apple/Downloads/flutter/bin/cache/artifacts/engine/ios FLUTTER_FRAMEWORK_DIR=/Users/gengmei/flutter/bin/cache/artifacts/engine/ios
FLUTTER_BUILD_NAME=1.0.0 FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1 FLUTTER_BUILD_NUMBER=1
TRACK_WIDGET_CREATION=true
...@@ -44,13 +44,13 @@ EXTERNAL SOURCES: ...@@ -44,13 +44,13 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS: SPEC CHECKSUMS:
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
flutter_boost: dd4635cb5672549d64a0a9e47accd1e9ee1c4de8 flutter_boost: 0e85ea37c74ed39ee7b91a35612afa1605557484
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
gengmei_flutter_plugin: 9461e8644c06c4a0e38292ddcca1cc55e6ac6156 gengmei_flutter_plugin: 9461e8644c06c4a0e38292ddcca1cc55e6ac6156
path_provider: d6b45f2abd6d46082316e15beadf67eeb95adb2a path_provider: f96fff6166a8867510d2c25fdcc346327cc4b259
sqflite: 5ba50d7e98116c306c2d9c67067d2c963bdb4c9e sqflite: ff1d9da63c06588cc8d1faf7256d741f16989d5a
xservice_kit: 076aa63eef6fad67a8fd1542f7b1cabb5a8b23fc xservice_kit: a2f1b35addc126fce8687aeb183ab0c1ada5b7f3
PODFILE CHECKSUM: 35a37ac9f50a31e3627f8c9992b49120478cca1a PODFILE CHECKSUM: 35a37ac9f50a31e3627f8c9992b49120478cca1a
COCOAPODS: 1.7.4 COCOAPODS: 1.7.5
...@@ -32,6 +32,6 @@ ...@@ -32,6 +32,6 @@
}, },
"libraries": "c++", "libraries": "c++",
"platforms": { "platforms": {
"ios": "9.0" "ios": "8.0"
} }
} }
...@@ -21,6 +21,6 @@ ...@@ -21,6 +21,6 @@
] ]
}, },
"platforms": { "platforms": {
"ios": "9.0" "ios": "8.0"
} }
} }
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
] ]
}, },
"platforms": { "platforms": {
"ios": "9.0" "ios": "8.0"
} }
} }
...@@ -21,6 +21,6 @@ ...@@ -21,6 +21,6 @@
] ]
}, },
"platforms": { "platforms": {
"ios": "9.0" "ios": "8.0"
} }
} }
PODS:
- Flutter (1.0.0)
- flutter_boost (0.0.1):
- Flutter
- xservice_kit
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- gengmei_flutter_plugin (0.0.1):
- Flutter
- path_provider (0.0.1):
- Flutter
- sqflite (0.0.1):
- Flutter
- FMDB (~> 2.7.2)
- xservice_kit (0.0.1):
- Flutter
DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios`)
- flutter_boost (from `.symlinks/plugins/flutter_boost/ios`)
- gengmei_flutter_plugin (from `.symlinks/plugins/gengmei_flutter_plugin/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- xservice_kit (from `.symlinks/plugins/xservice_kit/ios`)
SPEC REPOS:
https://github.com/cocoapods/specs.git:
- FMDB
EXTERNAL SOURCES:
Flutter:
:path: ".symlinks/flutter/ios"
flutter_boost:
:path: ".symlinks/plugins/flutter_boost/ios"
gengmei_flutter_plugin:
:path: ".symlinks/plugins/gengmei_flutter_plugin/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
xservice_kit:
:path: ".symlinks/plugins/xservice_kit/ios"
SPEC CHECKSUMS:
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
flutter_boost: 0e85ea37c74ed39ee7b91a35612afa1605557484
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
gengmei_flutter_plugin: 9461e8644c06c4a0e38292ddcca1cc55e6ac6156
path_provider: f96fff6166a8867510d2c25fdcc346327cc4b259
sqflite: ff1d9da63c06588cc8d1faf7256d741f16989d5a
xservice_kit: a2f1b35addc126fce8687aeb183ab0c1ada5b7f3
PODFILE CHECKSUM: 35a37ac9f50a31e3627f8c9992b49120478cca1a
COCOAPODS: 1.7.5
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -4,8 +4,12 @@ ...@@ -4,8 +4,12 @@
// RouterCenterGenerator // RouterCenterGenerator
// ************************************************************************** // **************************************************************************
import "package:gmalpha_flutter/NewMessageModel/NewMessageRouterImpl.dart";
import "package:gmalpha_flutter/NewMessageModel/NewMessageRouter.dart";
import "package:gmalpha_flutter/PrestigeModel/PrestigeImpl.dart"; import "package:gmalpha_flutter/PrestigeModel/PrestigeImpl.dart";
import "package:gmalpha_flutter/PrestigeModel/PrestigeRouter.dart"; import "package:gmalpha_flutter/PrestigeModel/PrestigeRouter.dart";
import "package:gmalpha_flutter/BuriedLib/BuriedImpl.dart";
import "package:gmalpha_flutter/BuriedLib/BuriedRouter.dart";
import "package:gmalpha_flutter/AlbumModel/AlbumRouterImpl.dart"; import "package:gmalpha_flutter/AlbumModel/AlbumRouterImpl.dart";
import "package:gmalpha_flutter/AlbumModel/AlbumRouter.dart"; import "package:gmalpha_flutter/AlbumModel/AlbumRouter.dart";
import "package:gmalpha_flutter/ActivityReportModel/ActivityReportRouterImpl.dart"; import "package:gmalpha_flutter/ActivityReportModel/ActivityReportRouterImpl.dart";
...@@ -42,7 +46,9 @@ class RouterCenterImpl { ...@@ -42,7 +46,9 @@ class RouterCenterImpl {
} }
void init() { void init() {
map.putIfAbsent("NewMessageModel", () => NewMessageRouterImpl());
map.putIfAbsent("prestigeModel", () => PrestigeImpl()); map.putIfAbsent("prestigeModel", () => PrestigeImpl());
map.putIfAbsent("buried_router", () => BuriedImpl());
map.putIfAbsent("albumModel", () => AlbumRouterImpl()); map.putIfAbsent("albumModel", () => AlbumRouterImpl());
map.putIfAbsent("ActivityReportModel", () => ActivityReportRouterImpl()); map.putIfAbsent("ActivityReportModel", () => ActivityReportRouterImpl());
map.putIfAbsent("messageModel", () => MessageRouterImpl()); map.putIfAbsent("messageModel", () => MessageRouterImpl());
...@@ -53,6 +59,13 @@ class RouterCenterImpl { ...@@ -53,6 +59,13 @@ class RouterCenterImpl {
return map[modelName]; return map[modelName];
} }
NewMessageRouter findNewMessageRouter() {
if (map["NewMessageModel"] == null) {
return null;
}
return map["NewMessageModel"] as NewMessageRouter;
}
PrestigeRouter findPrestigeRouter() { PrestigeRouter findPrestigeRouter() {
if (map["prestigeModel"] == null) { if (map["prestigeModel"] == null) {
return null; return null;
...@@ -60,6 +73,13 @@ class RouterCenterImpl { ...@@ -60,6 +73,13 @@ class RouterCenterImpl {
return map["prestigeModel"] as PrestigeRouter; return map["prestigeModel"] as PrestigeRouter;
} }
BuriedRouter findBuriedRouter() {
if (map["buried_router"] == null) {
return null;
}
return map["buried_router"] as BuriedRouter;
}
AlbumRouter findAlbumRouter() { AlbumRouter findAlbumRouter() {
if (map["albumModel"] == null) { if (map["albumModel"] == null) {
return null; return null;
......
import 'package:flutter/material.dart';
import 'package:gmalpha_flutter/Annotations/RouterBaser.dart';
import 'package:gmalpha_flutter/Annotations/anno/Router.dart';
import 'package:gmalpha_flutter/NewMessageModel/NewMessageRouterImpl.dart';
@Router("NewMessageModel", NewMessageRouterImpl)
abstract class NewMessageRouter implements RouterBaser {
Widget getMessagePage();
}
\ No newline at end of file
import 'package:flutter/widgets.dart';
import 'package:gmalpha_flutter/NewMessageModel/NewMessageRouter.dart';
import 'package:gmalpha_flutter/newMessageModel/page/MessagePage.dart';
class NewMessageRouterImpl implements NewMessageRouter {
@override
Widget getMessagePage() {
return MessagePage();
}
}
\ No newline at end of file
import 'package:flutter/material.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/MessageRepository.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/LatestMessageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/UnreadMessageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/MyMessageEntity.dart';
import 'package:gmalpha_flutter/commonModel/live/BaseModel.dart';
import 'package:gmalpha_flutter/commonModel/live/LiveData.dart';
import 'package:gmalpha_flutter/commonModel/toast/toast.dart';
class MessageModel extends BaseModel {
final int page;
final int count;
LiveData<MyMessageEntity> myMessageLive = new LiveData();
LiveData<UnreadMessageEntity> likeUnreadMessageLive = new LiveData();
LiveData<UnreadMessageEntity> followUnreadMessageLive = new LiveData();
LiveData<LatestMessageEntity> latestMessageLive = new LiveData();
MessageModel(this.page, this.count);
init(BuildContext context) {
MessageRepository.getInstance()
.getMyMessage(page, count)
.listen((value) {
if (value != null) {
myMessageLive.notifyView(value);
}
}).onError((error) {
Toast.show(context, "${error.toString()}");
print(error);
});
MessageRepository.getInstance()
.getUnreadMessage(0)
.listen((value) {
if (value != null) {
likeUnreadMessageLive.notifyView(value);
}
}).onError((error) {
Toast.show(context, "${error.toString()}");
print(error);
});
MessageRepository.getInstance()
.getUnreadMessage(1)
.listen((value) {
if (value != null) {
followUnreadMessageLive.notifyView(value);
}
}).onError((error) {
Toast.show(context, "${error.toString()}");
print(error);
});
MessageRepository.getInstance()
.getLatestMessage()
.listen((value) {
if (value != null) {
latestMessageLive.notifyView(value);
}
}).onError((error) {
Toast.show(context, "${error.toString()}");
print(error);
});
}
@override
void dispose() {
myMessageLive.dispost();
likeUnreadMessageLive.dispost();
followUnreadMessageLive.dispost();
latestMessageLive.dispost();
}
}
import 'package:flutter/material.dart';
import 'package:gmalpha_flutter/NewMessageModel/page/MessageModel.dart';
class MessagePage extends StatefulWidget {
MessageModel _messageModel;
MessagePage() {
_messageModel = new MessageModel(1, 10);
}
@override
_MessagePageState createState() => _MessagePageState(_messageModel);
}
class _MessagePageState extends State<MessagePage> {
MessageModel _messageModel;
_MessagePageState(this._messageModel);
@override
void initState() {
super.initState();
_messageModel.init(context);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('')
),
body: Column(),
);
}
}
\ No newline at end of file
import 'package:gmalpha_flutter/NewMessageModel/service/local/MessageLocal.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/MessageRemote.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/LatestMessageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/MyMessageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/UnreadMessageEntity.dart';
import 'package:rxdart/rxdart.dart';
class MessageRepository {
MessageRemote _remote;
MessageLocal _local;
static MessageRepository _userRepository;
MessageRepository._() {
_remote = MessageRemote.getInstance();
_local = MessageLocal.getInstance();
}
static MessageRepository getInstance() {
if (_userRepository == null) {
_userRepository = MessageRepository._();
}
return _userRepository;
}
Observable<MyMessageEntity> getMyMessage(int page, int count) {
return _remote.getMyMessage(page, count).map((value) {
if (value != null) {
}
return value;
});
}
Observable<UnreadMessageEntity> getUnreadMessage(int type) {
return _remote.getUnreadMessage(type).map((value) {
if (value != null) {
}
return value;
});
}
Observable<LatestMessageEntity> getLatestMessage() {
return _remote.getLatestMessage().map((value) {
if (value != null) {
}
return value;
});
}
}
\ No newline at end of file
class MessageLocal {
static MessageLocal _userRemote;
MessageLocal._() {}
static MessageLocal getInstance() {
if (_userRemote == null) {
_userRemote = new MessageLocal._();
}
return _userRemote;
}
}
import 'package:gmalpha_flutter/NewMessageModel/service/remote/api/MessageApi.serv.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/LatestMessageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/MyMessageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/UnreadMessageEntity.dart';
import 'package:rxdart/rxdart.dart';
class MessageRemote {
static MessageRemote _userRemote;
MessageRemote._() {}
static MessageRemote getInstance() {
if (_userRemote == null) {
_userRemote = new MessageRemote._();
}
return _userRemote;
}
Observable<MyMessageEntity> getMyMessage(int page, int count) {
return MessageApiImpl().getMyMessage(page, count);
}
Observable<UnreadMessageEntity> getUnreadMessage(int type) {
return MessageApiImpl().getUnreadMessage(type);
}
Observable<LatestMessageEntity> getLatestMessage() {
return MessageApiImpl().getLatestMessage();
}
}
import 'package:gmalpha_flutter/Annotations/anno/Get.dart';
import 'package:gmalpha_flutter/Annotations/anno/Query.dart';
import 'package:gmalpha_flutter/Annotations/anno/ServiceCenter.dart';
import 'package:gmalpha_flutter/newMessageModel/service/remote/entity/LatestMessageEntity.dart';
import 'package:gmalpha_flutter/newMessageModel/service/remote/entity/MyMessageEntity.dart';
import 'package:gmalpha_flutter/newMessageModel/service/remote/entity/UnreadMessageEntity.dart';
@ServiceCenter()
abstract class MessageApi{
@Get("api/v1/message/my")
MyMessageEntity getMyMessage(@Query('page') int page, @Query('count') int count);
@Get("api/v1/message/unread")
UnreadMessageEntity getUnreadMessage(@Query('type') int type);
@Get('api/v1/push/newest/info')
LatestMessageEntity getLatestMessage();
}
\ No newline at end of file
// GENERATED CODE - DO NOT MODIFY BY HAND
// **************************************************************************
// ServiceGenerator
// **************************************************************************
import 'dart:convert';
import 'dart:io';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/LatestMessageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/MyMessageEntity.dart';
import 'package:gmalpha_flutter/NewMessageModel/service/remote/entity/UnreadMessageEntity.dart';
import 'package:rxdart/rxdart.dart';
import 'package:gmalpha_flutter/commonModel/net/DioUtil.dart';
class MessageApiImpl {
factory MessageApiImpl() => _sharedInstance();
static MessageApiImpl _instance;
MessageApiImpl._() {}
static MessageApiImpl _sharedInstance() {
if (_instance == null) {
_instance = MessageApiImpl._();
}
return _instance;
}
Observable<MyMessageEntity> getMyMessage(int page, int count) {
return Observable.fromFuture(DioUtil().get('api/v1/message/my',
data: {'page': page, 'count': count})).map((value) {
if (value != null && value.statusCode == 200) {
Map map = json.decode(value.toString());
return MyMessageEntity.fromJson(map);
}
});
}
Observable<UnreadMessageEntity> getUnreadMessage(int type) {
return Observable.fromFuture(
DioUtil().get('api/v1/message/unread', data: {'type': type}))
.map((value) {
if (value != null && value.statusCode == 200) {
Map map = json.decode(value.toString());
return UnreadMessageEntity.fromJson(map);
}
});
}
Observable<LatestMessageEntity> getLatestMessage() {
return Observable.fromFuture(DioUtil().get('api/v1/push/newest/info'))
.map((value) {
if (value != null && value.statusCode == 200) {
Map map = json.decode(value.toString());
return LatestMessageEntity.fromJson(map);
}
});
}
}
class LatestMessageEntity {
int error;
String message;
Null extra;
Data data;
LatestMessageEntity({this.error, this.message, this.extra, this.data});
LatestMessageEntity.fromJson(Map<String, dynamic> json) {
error = json['error'];
message = json['message'];
extra = json['extra'];
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['error'] = this.error;
data['message'] = this.message;
data['extra'] = this.extra;
if (this.data != null) {
data['data'] = this.data.toJson();
}
return data;
}
}
class Data {
int id;
String title;
String content;
String icon;
int pushTime;
String url;
String pushTimeStr;
User user;
Data(
{this.id,
this.title,
this.content,
this.icon,
this.pushTime,
this.url,
this.pushTimeStr,
this.user});
Data.fromJson(Map<String, dynamic> json) {
id = json['id'];
title = json['title'];
content = json['content'];
icon = json['icon'];
pushTime = json['push_time'];
url = json['url'];
pushTimeStr = json['push_time_str'];
user = json['user'] != null ? new User.fromJson(json['user']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['title'] = this.title;
data['content'] = this.content;
data['icon'] = this.icon;
data['push_time'] = this.pushTime;
data['url'] = this.url;
data['push_time_str'] = this.pushTimeStr;
if (this.user != null) {
data['user'] = this.user.toJson();
}
return data;
}
}
class User {
int id;
String name;
User({this.id, this.name});
User.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
return data;
}
}
\ No newline at end of file
class MyMessageEntity {
int error;
String message;
Null extra;
List<Data> data;
MyMessageEntity({this.error, this.message, this.extra, this.data});
MyMessageEntity.fromJson(Map<String, dynamic> json) {
error = json['error'];
message = json['message'];
extra = json['extra'];
if (json['data'] != null) {
data = new List<Data>();
json['data'].forEach((v) {
data.add(new Data.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['error'] = this.error;
data['message'] = this.message;
data['extra'] = this.extra;
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
}
return data;
}
}
class Data {
int userId;
String name;
String icon;
int id;
bool isLike;
double time;
String content;
RepliedContent repliedContent;
Data(
{this.userId,
this.name,
this.icon,
this.id,
this.isLike,
this.time,
this.content,
this.repliedContent});
Data.fromJson(Map<String, dynamic> json) {
userId = json['user_id'];
name = json['name'];
icon = json['icon'];
id = json['id'];
isLike = json['is_like'];
time = json['time'];
content = json['content'];
repliedContent = json['replied_content'] != null
? new RepliedContent.fromJson(json['replied_content'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['user_id'] = this.userId;
data['name'] = this.name;
data['icon'] = this.icon;
data['id'] = this.id;
data['is_like'] = this.isLike;
data['time'] = this.time;
data['content'] = this.content;
if (this.repliedContent != null) {
data['replied_content'] = this.repliedContent.toJson();
}
return data;
}
}
class RepliedContent {
int id;
int type;
int topicId;
int contentType;
String content;
RepliedContent(
{this.id, this.type, this.topicId, this.contentType, this.content});
RepliedContent.fromJson(Map<String, dynamic> json) {
id = json['id'];
type = json['type'];
topicId = json['topic_id'];
contentType = json['content_type'];
content = json['content'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['type'] = this.type;
data['topic_id'] = this.topicId;
data['content_type'] = this.contentType;
data['content'] = this.content;
return data;
}
}
\ No newline at end of file
class UnreadMessageEntity {
int error;
String message;
Null extra;
Data data;
UnreadMessageEntity({this.error, this.message, this.extra, this.data});
UnreadMessageEntity.fromJson(Map<String, dynamic> json) {
error = json['error'];
message = json['message'];
extra = json['extra'];
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['error'] = this.error;
data['message'] = this.message;
data['extra'] = this.extra;
if (this.data != null) {
data['data'] = this.data.toJson();
}
return data;
}
}
class Data {
int count;
int voteCount;
int urgeCount;
Data({this.count, this.voteCount, this.urgeCount});
Data.fromJson(Map<String, dynamic> json) {
count = json['count'];
voteCount = json['vote_count'];
urgeCount = json['urge_count'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['count'] = this.count;
data['vote_count'] = this.voteCount;
data['urge_count'] = this.urgeCount;
return data;
}
}
\ No newline at end of file
...@@ -90,17 +90,18 @@ class _MyAppState extends State<MyApp> { ...@@ -90,17 +90,18 @@ class _MyAppState extends State<MyApp> {
routes: { routes: {
// '/': (context) => CommentSuggest({"Cookie":" _gm_token=7e48641558699683; sessionid=nb3ze4ur7ucosln8sd8pzwojddenv9ym; _gtid=a1bc0a387e1911e996b9525400fa516d4094"}), // '/': (context) => CommentSuggest({"Cookie":" _gm_token=7e48641558699683; sessionid=nb3ze4ur7ucosln8sd8pzwojddenv9ym; _gtid=a1bc0a387e1911e996b9525400fa516d4094"}),
'/': (context) { '/': (context) {
// Api.getInstance().initBuildConfig({ Api.getInstance().initBuildConfig({
// 'Cookie': 'Cookie':
// '_gm_token=72ee1c1569466411; _gtid=58d3cc14df8711e99736525400e82fab81; sessionid=vhksn66854pejzjwi8ljhrmcew3domh2', '_gm_token=72ee1c1569466411; _gtid=58d3cc14df8711e99736525400e82fab81; sessionid=vhksn66854pejzjwi8ljhrmcew3domh2',
// "buildConfig": "debug" "buildConfig": "debug"
// }); });
// return RouterCenterImpl() // return RouterCenterImpl()
// .findActivityReportRouter() // .findActivityReportRouter()
// ?.getActivityReportPage(279, 1, ''); // ?.getActivityReportPage(279, 1, '');
return RouterCenterImpl() // return RouterCenterImpl()
.findAlbumRouter() // .findAlbumRouter()
.getAlbumPage("com.example.gengmei_flutter_plugin_example",true, 2, null); // .getAlbumPage("com.example.gengmei_flutter_plugin_example",true, 2, null);
return RouterCenterImpl().findNewMessageRouter().getMessagePage();
}, },
}, },
......
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