So i want to show a special button. The button should only work (or be seen) when the user is logged in with the right permissions.
I saw that i can somehow do this with flutter firestore. How can i implement this to my code? If you need more code or infos (screens) from my firestore database just ask in the comments. :)
//serverstatuspage
final serverstatuspage = Material(
elevation: 5,
borderRadius: BorderRadius.circular(30),
color: Colors.green,
child: MaterialButton(
padding: EdgeInsets.fromLTRB(20, 15, 20, 15),
minWidth: MediaQuery.of(context).size.width,
onPressed: () {
serverstatusbutton(context);
},
child: Text(
"Admin Dashboard",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20,
color: Colors.white,
fontWeight: FontWeight.bold),
)));