Advertisement
wildanfuady

Untitled

Nov 14th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. actions: <Widget>[
  2. IconButton(
  3. icon: Icon(Icons.lock_open, semanticLabel: "Logout",),
  4.  
  5. onPressed: () async {
  6. // hapus shared prefs login
  7. final prefs = await SharedPreferences.getInstance();
  8. prefs.remove('login');
  9. // redirect page/route ke login
  10. Navigator.push(
  11. context,
  12. MaterialPageRoute(builder: (context) => Login()),
  13. );
  14. },
  15. ),
  16. ],
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement