add home page and navigation

This commit is contained in:
2025-11-03 13:45:43 +01:00
parent 212f5726db
commit 3aa7610867
9 changed files with 268 additions and 105 deletions

View File

@@ -0,0 +1,49 @@
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,
),
),
),
),
),
),
);
}
}