Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- actions: <Widget>[
- IconButton(
- icon: Icon(Icons.lock_open, semanticLabel: "Logout",),
- onPressed: () async {
- // hapus shared prefs login
- final prefs = await SharedPreferences.getInstance();
- prefs.remove('login');
- // redirect page/route ke login
- Navigator.push(
- context,
- MaterialPageRoute(builder: (context) => Login()),
- );
- },
- ),
- ],
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement