@@ -35,10 +35,10 @@ class _MyAppState extends State<MyApp> {
3535
3636 initParse () async {
3737 // Initialize parse
38- Parse ().initialize (ApplicationConstants .keyParseApplicationId,
38+ Parse ().initialize (
39+ ApplicationConstants .keyParseApplicationId,
3940 ApplicationConstants .keyParseServerUrl,
4041 masterKey: ApplicationConstants .keyParseMasterKey,
41- appName: ApplicationConstants .keyAppName,
4242 debug: true );
4343
4444 // Check server is healthy and live - Debug is on in this instance so check logs for result
@@ -74,7 +74,7 @@ class _MyAppState extends State<MyApp> {
7474 }
7575
7676 void getAllItemsByName () async {
77- var apiResponse = await ParseObject ('ParseTableName ' ).getAll ();
77+ var apiResponse = await ParseObject ('TestObjectForApi ' ).getAll ();
7878
7979 if (apiResponse.success && apiResponse.result != null ) {
8080 for (var testObject in apiResponse.result) {
@@ -120,14 +120,14 @@ class _MyAppState extends State<MyApp> {
120120 }
121121
122122 void query () async {
123- var queryBuilder = QueryBuilder <DietPlan >( DietPlan ( ))
124- ..whereContains ( DietPlan .keyName, "iet" )
125- ..keysToReturn ([ DietPlan .keyName ]);
123+ var queryBuilder = QueryBuilder <ParseObject >( ParseObject ( 'TestObjectForApi' ))
124+ ..setLimit ( 10 )
125+ ..includeObject ([ 'Day' ]);
126126
127127 var apiResponse = await queryBuilder.query ();
128128
129129 if (apiResponse.success && apiResponse.result != null ) {
130- print ("Result: ${((apiResponse .result as List <dynamic >).first as DietPlan ).toString ()}" );
130+ print ("Result: ${((apiResponse .result as List <dynamic >).first as ParseObject ).toString ()}" );
131131 } else {
132132 print ("Result: ${apiResponse .error .message }" );
133133 }
0 commit comments