void main() {
runApp(App());
}
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: BlocProvider(
create: (_) => UserBloc(),
child: SettingsScreen(),
),
);;
}
}
class SettingsScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: BlocBuilder< UserBloc, UserState>(
builder: (user, userState) {
return Text(
'new event and new state',
),
);
},
)
}