Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return Material(
- child: Scaffold(
- resizeToAvoidBottomInset: false,
- appBar: AppBar(
- leading: const Icon(
- Icons.arrow_back,
- color: Colors.white,
- ),
- elevation: 5,
- title: const Text(
- "GPS",
- ),
- ),
- body: Container(
- width: 130,
- margin: const EdgeInsets.all(10),
- child: SingleChildScrollView(
- child: Column(
- children: [
- SizedBox(
- height: 10,
- child: TextFormField(
- controller: latT,
- decoration: InputDecoration(
- labelText: "Latitude",
- border: OutlineInputBorder(
- borderRadius: BorderRadius.circular(10),
- ),
- ),
- ),
- ),
- Flexible(
- child: TextFormField(
- controller: longT,
- decoration: InputDecoration(
- labelText: "Longitude",
- border: OutlineInputBorder(
- borderRadius: BorderRadius.circular(10),
- ),
- ),
- ),
- ),
- Flexible(
- child: TextFormField(
- controller: ketT,
- decoration: InputDecoration(
- labelText: "Keterangan",
- border: OutlineInputBorder(
- borderRadius: BorderRadius.circular(10),
- ),
- ),
- ),
- ),
- Flexible(
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: [
- ElevatedButton(
- style: ButtonStyle(
- backgroundColor:
- MaterialStateProperty.all(Colors.greenAccent),
- ),
- onPressed: () async {
- saveData();
- },
- child: const Text("Simpan Data"),
- ),
- ElevatedButton(
- onPressed: () {
- checkGps();
- },
- child: const Text("Get GPS"),
- ),
- ],
- ),
- ),
- /*ListView.builder(
- scrollDirection: Axis.vertical,
- shrinkWrap: true,
- itemCount: _journals.length,
- itemBuilder: (context, index) => Card(
- color: Colors.orange[200],
- margin: const EdgeInsets.all(15),
- child: ListTile(
- title: Text(
- _journals[index]['id'],
- ),
- subtitle: Text(
- _journals[index]['lat'],
- ),
- trailing: SizedBox(
- width: 100,
- child: Row(
- children: [
- IconButton(
- icon: const Icon(Icons.edit),
- onPressed: () {},
- ),
- IconButton(
- icon: const Icon(Icons.delete),
- onPressed: () =>
- _deleteItem(_journals[index]['id']),
- ),
- ],
- ),
- ),
- ),
- ),
- ),*/
- ],
- ),
- /*Text(servicestatus ? "GPS is Enabled" : "GPS is disabled."),
- Text(haspermission ? "GPS is Enabled" : "GPS is disabled."),*/
- ),
- ),
- ),
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement