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) {
|
Widget build(BuildContext context) {
|
||||||
final projectsBloc = BlocProvider.of<ProjectsBloc>(context);
|
final projectsBloc = BlocProvider.of<ProjectsBloc>(context);
|
||||||
final settingsBloc = BlocProvider.of<SettingsBloc>(context);
|
final settingsBloc = BlocProvider.of<SettingsBloc>(context);
|
||||||
|
final screenBorders = MediaQuery.of(context).padding;
|
||||||
|
|
||||||
return BlocProvider<DashboardBloc>(
|
return BlocProvider<DashboardBloc>(
|
||||||
create: (_) => DashboardBloc(projectsBloc, settingsBloc),
|
create: (_) => DashboardBloc(projectsBloc, settingsBloc),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: const TopBar(),
|
appBar: const TopBar(),
|
||||||
body:
|
body: Column(
|
||||||
Scrollable(
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
viewportBuilder: (BuildContext context, position) =>
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
Column(
|
mainAxisSize: MainAxisSize.max,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
children: <Widget>[
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
const Expanded(
|
||||||
mainAxisSize: MainAxisSize.max,
|
flex: 1,
|
||||||
children: <Widget>[
|
child: StoppedTimers(),
|
||||||
const Expanded(
|
),
|
||||||
flex: 1,
|
const RunningTimers(),
|
||||||
child: StoppedTimers(),
|
Material(
|
||||||
),
|
elevation: 8.0,
|
||||||
const RunningTimers(),
|
color: Theme.of(context).bottomSheetTheme.backgroundColor,
|
||||||
Material(
|
child: Padding(
|
||||||
elevation: 8.0,
|
padding: EdgeInsets.fromLTRB(8 + screenBorders.left, 8,
|
||||||
color: Theme.of(context).bottomSheetTheme.backgroundColor,
|
8 + screenBorders.right, 8 + screenBorders.bottom),
|
||||||
child: Padding(
|
child: const Row(
|
||||||
padding: const EdgeInsets.all(8.0),
|
mainAxisSize: MainAxisSize.max,
|
||||||
child: Row(
|
children: <Widget>[
|
||||||
mainAxisSize: MainAxisSize.max,
|
ProjectSelectField(),
|
||||||
//crossAxisAlignment: CrossAxisAlignment.end,
|
Expanded(
|
||||||
children: const <Widget>[
|
flex: 1,
|
||||||
ProjectSelectField(),
|
child: Padding(
|
||||||
Expanded(
|
padding: EdgeInsets.fromLTRB(4.0, 0, 4.0, 0),
|
||||||
flex: 1,
|
child: DescriptionField(),
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.fromLTRB(4.0, 0, 4.0, 0),
|
|
||||||
child: DescriptionField(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 72,
|
|
||||||
height: 72,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
SizedBox(
|
||||||
],
|
width: 72,
|
||||||
|
height: 72,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
floatingActionButton: const StartTimerButton(),
|
floatingActionButton: const StartTimerButton(),
|
||||||
));
|
));
|
||||||
|
Reference in New Issue
Block a user