Last active
November 5, 2020 11:52
-
-
Save felangel/edacafae439fabcda8bbf6637a377e42 to your computer and use it in GitHub Desktop.
[flutter_login] Home Page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
import 'package:flutter_login/authentication/authentication.dart'; | |
class HomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
final AuthenticationBloc authenticationBloc = | |
BlocProvider.of<AuthenticationBloc>(context); | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('Home'), | |
), | |
body: Container( | |
child: Center( | |
child: RaisedButton( | |
child: Text('logout'), | |
onPressed: () { | |
authenticationBloc.dispatch(LoggedOut()); | |
}, | |
)), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment