Skip to content

Commit

Permalink
Added Avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
muradmur committed Nov 20, 2022
1 parent a54f253 commit 7e10998
Showing 1 changed file with 33 additions and 13 deletions.
46 changes: 33 additions & 13 deletions lib/presentation/main_screen/main_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class _MainScreenState extends State<MainScreen> {
String title = 'Шаблоны';
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();


@override
Widget build(BuildContext context) {
return Scaffold(
Expand All @@ -36,17 +35,40 @@ class _MainScreenState extends State<MainScreen> {
child: ListView(
padding: EdgeInsets.zero,
children: <Widget>[
const DrawerHeader(
DrawerHeader(
decoration: BoxDecoration(
color: Colors.blue,
),
child: Text(
'FastReport Cloud',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
'FastReport Cloud',
style: TextStyle(
color: Colors.white,
fontSize: 24,
),
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
CircleAvatar(
child: Icon(Icons.person),
),
SizedBox(
width: 10,
),
Text(
'Escanor',
style: TextStyle(
color: Colors.white,
fontSize: 20,
),
),
],
)
]),
),
const Padding(
padding: EdgeInsets.only(left: 12),
Expand All @@ -71,7 +93,6 @@ class _MainScreenState extends State<MainScreen> {
});
_scaffoldKey.currentState?.openEndDrawer();
context.read<MainFilesBloc>().add(TemplatesEvent());

},
),
ListTileW(
Expand All @@ -83,7 +104,6 @@ class _MainScreenState extends State<MainScreen> {
});
_scaffoldKey.currentState?.openEndDrawer();
context.read<MainFilesBloc>().add(ReportsEvent());

},
),
ListTileW(
Expand All @@ -95,7 +115,6 @@ class _MainScreenState extends State<MainScreen> {
});
_scaffoldKey.currentState?.openEndDrawer();
context.read<MainFilesBloc>().add(ExportsEvent());

},
),
],
Expand Down Expand Up @@ -161,7 +180,8 @@ class _MainScreenState extends State<MainScreen> {
);
},
),
body: BlocBuilder<MainFilesBloc, MainFilesState>(builder: (context, state) {
body:
BlocBuilder<MainFilesBloc, MainFilesState>(builder: (context, state) {
if (state is TemplatesState) {
return TemplatesScreen();
} else if (state is ReportsState) {
Expand Down

0 comments on commit 7e10998

Please sign in to comment.