Disable splash screen after logout

This commit is contained in:
Moe Poi ~ 2022-05-22 22:04:21 +07:00
parent 02beb207d6
commit 159acd3ef8

View file

@ -1,6 +1,8 @@
import 'package:universal_html/html.dart' as html;
import 'package:flutter/material.dart';
import 'package:nekoya_flutter/api/api.dart';
import 'package:nekoya_flutter/components/menu.dart';
import 'package:nekoya_flutter/components/session_box.dart';
import 'package:nekoya_flutter/data/auth.dart';
@ -52,7 +54,10 @@ class _SessionsState extends State<Sessions> {
child: const Text('Close', style: TextStyle(color: Colors.white),),
onPressed: () {
Navigator.of(context).pop();
Navigator.pushReplacementNamed(context, '');
html.window.history.pushState(null, '', '');
Navigator.of(context).pushReplacement(MaterialPageRoute(
builder: (context) => const Menu(initialScreen: 2))
);
},
),
],