Итак, ниже приведен код для выхода
Код: Выделить всё
class profile extends StatelessWidget {
profile({super.key});
final _myBox = Hive.openBox("mybox");
final loggedModel log = loggedModel();
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Container(
height:100,
width: 100,
child: ElevatedButton(
onPressed: ()=> {
log.out = true,
Navigator.pop(context),
Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) => const Splash(),
),)
},
child: Text("LOGOUT")
),
),
),
);
}
}
это главная страница входа

и это профиль с кнопкой выхода из системы

и здесь вы можете видеть, что после выхода из системы вкладка все еще присутствует, и я не могу вытащите или удалите его

я пытался открыть главный экран или закрыть само приложение после выхода из системы, но они не работают
Подробнее здесь: https://stackoverflow.com/questions/784 ... in-flutter