mirror of
https://github.com/hamaluik/timecop.git
synced 2025-08-23 22:54:44 +08:00
Reflect reserved screen areas on dashboard
This commit is contained in:
@ -31,51 +31,48 @@ 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(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
const Expanded(
|
||||
flex: 1,
|
||||
child: StoppedTimers(),
|
||||
),
|
||||
const RunningTimers(),
|
||||
Material(
|
||||
elevation: 8.0,
|
||||
color: Theme.of(context).bottomSheetTheme.backgroundColor,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
//crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: const <Widget>[
|
||||
ProjectSelectField(),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(4.0, 0, 4.0, 0),
|
||||
child: DescriptionField(),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 72,
|
||||
height: 72,
|
||||
)
|
||||
],
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
const Expanded(
|
||||
flex: 1,
|
||||
child: StoppedTimers(),
|
||||
),
|
||||
const RunningTimers(),
|
||||
Material(
|
||||
elevation: 8.0,
|
||||
color: Theme.of(context).bottomSheetTheme.backgroundColor,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(8 + screenBorders.left, 8,
|
||||
8 + screenBorders.right, 8 + screenBorders.bottom),
|
||||
child: const Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
ProjectSelectField(),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.fromLTRB(4.0, 0, 4.0, 0),
|
||||
child: DescriptionField(),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
SizedBox(
|
||||
width: 72,
|
||||
height: 72,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
floatingActionButton: const StartTimerButton(),
|
||||
));
|
||||
|
Reference in New Issue
Block a user