50 lines
1.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../controllers/home_controller.dart';
class HomePage extends GetView<HomeController> {
static const String namedRoute = '/home';
const HomePage({super.key});
@override
Widget build(BuildContext context) {
var homeCtrl = controller;
return PopScope(
canPop: false,
child: SafeArea(
child: Scaffold(
appBar: AppBar(
backgroundColor: Colors.grey.shade500,
leading: IconButton(
icon: Icon(Icons.arrow_back, color: Colors.grey.shade200),
onPressed: () {
// Verhindert das Zurücknavigieren
homeCtrl.goToLoginPage();
},
),
title: Text(
homeCtrl.szHeaderHome.value,
style: TextStyle(color: Colors.grey.shade200),
),
centerTitle: true,
),
body: Container(
decoration: BoxDecoration(color: Colors.grey.shade400),
padding: EdgeInsets.all(20),
child: Center(
child: Text(
'You are on the Home Page...\nPress the back arrow to logout.\nThis is a Template to use...',
style: TextStyle(
color: Colors.grey.shade800,
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
);
}
}