mod input and routes
This commit is contained in:
@@ -3,12 +3,58 @@ import 'package:get/get.dart';
|
||||
import '../../controllers/input_controller.dart';
|
||||
|
||||
class InputPage extends GetView<InputController> {
|
||||
const InputPage({super.key});
|
||||
const InputPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Container(),
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var inputCtrl = controller;
|
||||
return SafeArea(
|
||||
child: PopScope(
|
||||
canPop: false,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Tankstop Eingabe'),
|
||||
leading: IconButton(
|
||||
onPressed: () {},
|
||||
icon: const Icon(Icons.arrow_back),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.list),
|
||||
onPressed: () {
|
||||
inputCtrl.goToListPage();
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.refresh),
|
||||
onPressed: () {
|
||||
inputCtrl.onInit();
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.exit_to_app),
|
||||
onPressed: () {
|
||||
inputCtrl.logout();
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: Center(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Obx(
|
||||
() => inputCtrl.ptvModel != null && inputCtrl.currentUser != null
|
||||
? Text('UserEmail: ${inputCtrl.currentUser!.email}\nName: ${inputCtrl.currentUser!.name}\nFormattedAddress: ${inputCtrl.ptvModel!.locations!.first.formattedAddress}',
|
||||
)
|
||||
: const Text('Keine Daten gefunden'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user