Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# back4appgraphqldemo

Flutter-Back4app Connection Template
A new Flutter application.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion ios/Flutter/Generated.xcconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=C:\flutter
FLUTTER_APPLICATION_PATH=D:\AndroidStudioProjects\back4app_graphql_demo
FLUTTER_APPLICATION_PATH=D:\AndroidStudioProjects\back4app_graphql_demo - Copy
FLUTTER_TARGET=lib\main.dart
FLUTTER_BUILD_DIR=build
SYMROOT=${SOURCE_ROOT}/../build\ios
Expand Down
2 changes: 1 addition & 1 deletion ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\flutter"
export "FLUTTER_APPLICATION_PATH=D:\AndroidStudioProjects\back4app_graphql_demo"
export "FLUTTER_APPLICATION_PATH=D:\AndroidStudioProjects\back4app_graphql_demo - Copy"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
Expand Down
106 changes: 106 additions & 0 deletions lib/add_date-time.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import 'package:back4appgraphqldemo/database_utils.dart';
import 'package:flutter/material.dart';

class AddDateTime extends StatefulWidget {

@override
_AddDateTimeState createState() => _AddDateTimeState();
}

class _AddDateTimeState extends State<AddDateTime> {
TextEditingController dateTime = TextEditingController();
DatabaseUtils utils = DatabaseUtils();
TextEditingController objectIdController =TextEditingController();

@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppBar(
title: Text('Complex Muatation'),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 14.0, vertical: 8.0),
child: TextField(
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.yellow,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
hintText: 'ObjectId of row',
),
controller: objectIdController,
// onChanged: (text){},
),
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 14.0, vertical: 8.0),
child: TextField(
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.yellow,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
hintText: 'Enter Date Time',
),
// onChanged: (text){},
controller: dateTime,
),
),
SizedBox(
height: 20.0,
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 15.0, vertical: 7.0),
child: FlatButton(
color: Colors.green,
onPressed: (){
utils = DatabaseUtils();
utils.addDateTime(objectIdController.text.trim(),
dateTime.text.trim()
);
},
child: Center(
child: Text(
'Done',
style: TextStyle(
color: Colors.white,
),
),
),
),
),

],
),
),
);
}
}
138 changes: 138 additions & 0 deletions lib/add_geopointer.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
import 'package:back4appgraphqldemo/database_utils.dart';
import 'package:flutter/material.dart';

class AddGeoPointer extends StatefulWidget {
@override
_AddGeoPointerState createState() => _AddGeoPointerState();
}

class _AddGeoPointerState extends State<AddGeoPointer> {
DatabaseUtils utils;

TextEditingController latitudeController = TextEditingController();

TextEditingController longitudeController = TextEditingController();

TextEditingController objectIdController = TextEditingController();

@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppBar(
title: Text('Complex Muatation'),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 14.0, vertical: 8.0),
child: TextField(
controller: objectIdController,
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.yellow,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
hintText: 'ObjectId of row',
),
onChanged: (text) {},
),
),
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 14.0, vertical: 8.0),
child: TextField(
controller: latitudeController,
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.yellow,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
hintText: 'Enter Latitude',
),
onChanged: (text) {},
),
),
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 14.0, vertical: 8.0),
child: TextField(
controller: longitudeController,
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.yellow,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
hintText: 'Enter Longitude',
),
onChanged: (text) {},
),
),
SizedBox(
height: 20.0,
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 15.0, vertical: 7.0),
child: FlatButton(
color: Colors.green,
onPressed: () {
utils = DatabaseUtils();
utils.addGeoPointers(
objectIdController.text.trim(),
latitudeController.text.trim(),
longitudeController.text.trim());
},
child: Center(
child: Text(
'Done',
style: TextStyle(
color: Colors.white,
),
),
),
),
),
],
),
),
);
}
}
128 changes: 128 additions & 0 deletions lib/add_pointer.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import 'package:back4appgraphqldemo/database_utils.dart';
import 'package:flutter/material.dart';

class AddPointer extends StatefulWidget {
@override
_AddPointerState createState() => _AddPointerState();
}

class _AddPointerState extends State<AddPointer> {
TextEditingController pointerController = TextEditingController();

TextEditingController objectIdController = TextEditingController();

DatabaseUtils utils;

@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
appBar: AppBar(
title: Text('Complex Muatation'),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 14.0, vertical: 8.0),
child: TextField(
controller: objectIdController,
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.yellow,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
hintText: 'ObjectId of row',
),
onChanged: (text) {},
),
),
Padding(
padding:
const EdgeInsets.symmetric(horizontal: 14.0, vertical: 8.0),
child: TextField(
controller: pointerController,
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.yellow,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
color: Colors.blue,
width: 2,
),
borderRadius: BorderRadius.circular(15.0),
),
hintText: 'ObjectId of pointer',
),
onChanged: (text) {},
),
),
SizedBox(
height: 20.0,
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 15.0, vertical: 7.0),
child: FlatButton(
color: Colors.green,
onPressed: () {
utils = DatabaseUtils();
utils.addPointers(objectIdController.text.trim(),
pointerController.text.trim());
},
child: Center(
child: Text(
'Done',
style: TextStyle(
color: Colors.white,
),
),
),
),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 15.0, vertical: 7.0),
child: FlatButton(
color: Colors.green,
onPressed: () {
utils = DatabaseUtils();
utils.deletePointers(
objectIdController.text.trim(),
pointerController.text.trim()
);
},
child: Center(
child: Text(
'Delete',
style: TextStyle(
color: Colors.white,
),
),
),
),
),
],
),
),
);
}
}
Loading