wildanfuady

Untitled

Nov 14th, 2019
99
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ],
RAW Paste Data