ajustes em diversos pontos do app para receber o username, e ajustar para exibir apenas as telas que realmente será utilizado no app.

This commit is contained in:
Reginaldo
2024-02-01 17:01:08 -03:00
parent cfdfb316f8
commit 2450a76f4b
31 changed files with 227 additions and 223 deletions

View File

@@ -23,7 +23,8 @@ import '../../widgets/title_containers.dart';
class HomeVisitScreen extends StatefulWidget {
String name;
HomeVisitScreen({required this.name});
String username;
HomeVisitScreen({required this.name, required this.username});
@override
State<HomeVisitScreen> createState() => _HomeVisitScreenState();
@@ -107,9 +108,9 @@ class _HomeVisitScreenState extends State<HomeVisitScreen> {
CD_USUARIO_SUS = list[0]['CD_USUARIO_SUS'];
});
final PrefService _prefService = PrefService();
_prefService.readCacheIdUsername('idUsuario').then((value){
_prefService.readCacheIDUser().then((value){
if(value != null){
idUsuario = value;
idUsuario = int.parse(value);
loadData();
}
});
@@ -392,9 +393,9 @@ class _HomeVisitScreenState extends State<HomeVisitScreen> {
double width = MediaQuery.of(context).size.width;
return WillPopScope(
onWillPop: ()async=> await OnBackButton().onBackButton(context),
onWillPop: ()async=> await OnBackButton().onBackButton(context, widget.username),
child: Scaffold(
appBar: AppBarDefault().appbar(context, 'RKM AB - Visita Domiciliar'),
appBar: AppBarDefault().appbar(context, 'RKM AB - Visita Domiciliar',widget.username),
body: Container(
height: double.infinity,
width: double.infinity,