import 'package:flutter/material.dart'; import 'package:get/get.dart'; import '../../controllers/home_controller.dart'; class HomePage extends GetView { static const String namedRoute = '/home-page'; 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, title: Obx( () => Text( homeCtrl.szHeaderHome.value, style: TextStyle(color: Colors.grey.shade200), ), ), centerTitle: true, actions: [ IconButton( icon: Icon(Icons.logout, color: Colors.grey.shade200), onPressed: () { homeCtrl.goToLoginPage(); }, ), ], ), body: Container( decoration: BoxDecoration(color: Colors.grey.shade400), padding: EdgeInsets.all(20), child: Center( child: Text( 'You are on the Home Page...\nPress exit to logout.\nThis is a Template to use...', style: TextStyle( color: Colors.grey.shade800, fontSize: 24, fontWeight: FontWeight.bold, ), ), ), ), ), ), ); } }