62 lines
1.8 KiB
Dart
62 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import '../../controllers/input_controller.dart';
|
|
|
|
class InputPage extends GetView<InputController> {
|
|
const InputPage({super.key});
|
|
|
|
@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(
|
|
'DateNow: ${inputCtrl.safeDate}\nUserEmail: ${inputCtrl.currentUser!.email}\nName: ${inputCtrl.currentUser!.name}\nFormattedAddress: ${inputCtrl.safeLocation}',
|
|
)
|
|
: const Text('Keine Daten gefunden'),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|