Reflect reserved screen areas on dashboard

This commit is contained in:
Miroslav Mazel
2023-08-21 15:51:59 +02:00
parent 020d6eea07
commit 245e51b4e3

View File

@ -31,15 +31,13 @@ class DashboardScreen extends StatelessWidget {
Widget build(BuildContext context) {
final projectsBloc = BlocProvider.of<ProjectsBloc>(context);
final settingsBloc = BlocProvider.of<SettingsBloc>(context);
final screenBorders = MediaQuery.of(context).padding;
return BlocProvider<DashboardBloc>(
create: (_) => DashboardBloc(projectsBloc, settingsBloc),
child: Scaffold(
appBar: const TopBar(),
body:
Scrollable(
viewportBuilder: (BuildContext context, position) =>
Column(
body: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisSize: MainAxisSize.max,
@ -53,11 +51,11 @@ class DashboardScreen extends StatelessWidget {
elevation: 8.0,
color: Theme.of(context).bottomSheetTheme.backgroundColor,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
padding: EdgeInsets.fromLTRB(8 + screenBorders.left, 8,
8 + screenBorders.right, 8 + screenBorders.bottom),
child: const Row(
mainAxisSize: MainAxisSize.max,
//crossAxisAlignment: CrossAxisAlignment.end,
children: const <Widget>[
children: <Widget>[
ProjectSelectField(),
Expanded(
flex: 1,
@ -76,7 +74,6 @@ class DashboardScreen extends StatelessWidget {
)
],
),
),
floatingActionButton: const StartTimerButton(),
));
}