1
1
import 'package:flutter/material.dart' ;
2
- import 'package:flutter/services.dart' ;
3
2
4
3
import 'package:flutter_parse/flutter_parse.dart' ;
5
4
6
5
void main () async {
7
- // await FlutterParse.initialize(
8
- // server: 'YOUR_PARSE_SERVER_URL',
9
- // applicationId: 'YOUR_PARSE_APPLICATION_ID',
10
- // clientKey: 'YOUR_PARSE_CLIENT_KEY');
11
- await FlutterParse .initialize (server: 'https://parseapi.back4app.com/' ,
12
- applicationId: 'YtoxICpUQVRdQT96DUAdkGuk85unFzfuOUomHALP' ,
13
- clientKey: '8OELUgIMBuEVNECy3jioGmDvf7QSyshVLshqNS6N' );
6
+ await FlutterParse .initialize (
7
+ server: 'YOUR_PARSE_SERVER_URL' ,
8
+ applicationId: 'YOUR_PARSE_APPLICATION_ID' ,
9
+ clientKey: 'YOUR_PARSE_CLIENT_KEY' );
14
10
runApp (MyApp ());
15
11
}
16
12
@@ -20,55 +16,6 @@ class MyApp extends StatefulWidget {
20
16
}
21
17
22
18
class _MyAppState extends State <MyApp > {
23
- @override
24
- void initState () {
25
- super .initState ();
26
-
27
- init ();
28
- }
29
-
30
- init () async {
31
- try {
32
- // var object = ParseObject('Beacon')
33
- // ..set('proximityUUID', 'CB10023F-A318-3394-4199-A8730C7C1AEC')
34
- // ..set('major', 1)
35
- // ..set('enabled', true)
36
- // ..set('Position', new ParseGeoPoint())
37
- // ..set('timestamp', DateTime.now());
38
- // object = await object.saveInBackground();
39
- // print(object);
40
-
41
- // var currentUser = await ParseUser.currentUser;
42
- // print(currentUser);
43
-
44
- // await ParseUser.logOut();
45
-
46
- // var user = ParseUser()
47
- // ..username = 'alfatih'
48
- // ..password = 'AlFatih2014';
49
- // user = await user.register();
50
- // print(user);
51
-
52
- // currentUser = await ParseUser.currentUser;
53
- // print(currentUser);
54
-
55
- // var user = await ParseUser.logIn(username: 'alfatih', password: 'AlFatih2014');
56
- // print(user);
57
-
58
- // currentUser = await ParseUser.currentUser;
59
- // print(currentUser);
60
-
61
- final query = ParseQuery ('Beacon' )
62
- ..whereEqualTo ('proximityUUID' , 'CB10023F-A318-3394-4199-A8730C7C1AEC' )
63
- ..whereLessThanOrEqualTo ('major' , 10 );
64
- // final listObjects = await query.findAsync();
65
- // print(listObjects);
66
- final count = await query.countAsync ();
67
- print (count);
68
- } catch (e) {
69
- print (e);
70
- }
71
- }
72
19
73
20
@override
74
21
Widget build (BuildContext context) {
@@ -83,4 +30,4 @@ class _MyAppState extends State<MyApp> {
83
30
),
84
31
);
85
32
}
86
- }
33
+ }
0 commit comments