Skip to content

Commit a33b78c

Browse files
committed
修改live constant
1 parent ac2ed00 commit a33b78c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const String keyApplicationName = 'MyApp';
1+
const String keyApplicationName = 'Where';
22
const String keyParseApplicationId = 'myAppId';
33
const String keyParseMasterKey = '123456';
4-
const String keyParseServerUrl = 'http://118.24.162.252:2018/parse';
5-
const String keyParseLiveServerUrl = 'ws://118.24.162.252:2018/parse';
4+
const String keyParseServerUrl = 'http://118.24.162.252/api';
5+
const String keyParseLiveServerUrl = 'http://118.24.162.252:1337/api/';
66
// const String keyParseServerUrl = 'http://192.168.3.5:4000/parse';
77
// const String keyParseLiveServerUrl = 'ws://192.168.3.5:4000/parse';

example/lib/main.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class _MyAppState extends State<MyApp> with AutomaticKeepAliveClientMixin {
144144

145145
Future<void> _listen() async {
146146
QueryBuilder<ParseObject> query = QueryBuilder<ParseObject>(DietPlan())
147-
..whereEqualTo('objectId', 'Y06whIh1sS');
147+
..whereEqualTo('objectId', 'jSH0CHYwjL');
148148
// LiveQuery liveQuery = LiveQuery();
149149
// print("=====query: $query");
150150
await liveQuery.subscribe(query);
@@ -166,7 +166,7 @@ class _MyAppState extends State<MyApp> with AutomaticKeepAliveClientMixin {
166166
}
167167

168168
Future<void> updateSingleItem(BuildContext context) async {
169-
final ParseResponse apiResponse = await DietPlan().getObject('Y06whIh1sS');
169+
final ParseResponse apiResponse = await DietPlan().getObject('jSH0CHYwjL');
170170

171171
if (apiResponse.success && apiResponse.count > 0) {
172172
final DietPlan dietPlan = apiResponse.result;
@@ -193,7 +193,7 @@ class _MyAppState extends State<MyApp> with AutomaticKeepAliveClientMixin {
193193
// Initialize parse
194194
Parse().initialize(keyParseApplicationId, keyParseServerUrl,
195195
masterKey: keyParseMasterKey,
196-
liveQueryUrl: keyParseServerUrl,
196+
liveQueryUrl: keyParseLiveServerUrl,
197197
// clientKey: "XXXi3GejX3SIxpDgSbKHHV8uHUUP3QGiPPTlxxxx",
198198
sessionId: "1212121",
199199
autoSendSessionId: true,
@@ -214,7 +214,7 @@ class _MyAppState extends State<MyApp> with AutomaticKeepAliveClientMixin {
214214
if (response.success) {
215215
// await _listen();
216216
QueryBuilder<ParseObject> query = QueryBuilder<ParseObject>(DietPlan())
217-
..whereEqualTo('objectId', 'Y06whIh1sS');
217+
..whereEqualTo('objectId', 'jSH0CHYwjL');
218218
// LiveQuery liveQuery = LiveQuery();
219219
// print("=====query: $query");
220220
await liveQuery.subscribe(query);

0 commit comments

Comments
 (0)