Padding to ListView
parent
56acb1e84c
commit
5cce527518
|
@ -38,14 +38,15 @@ class HistoryList<T> extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: ListView(
|
child: ListView(
|
||||||
|
padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
|
||||||
children: history.map((T entry) {
|
children: history.map((T entry) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 5),
|
padding: const EdgeInsets.only(bottom: 5),
|
||||||
child: EntryDetail(
|
child: EntryDetail(
|
||||||
date: dateSelector(entry),
|
date: dateSelector(entry),
|
||||||
entryData: entryDataSelector(entry),
|
entryData: entryDataSelector(entry),
|
||||||
entryComment: _getComment(entry),
|
entryComment: _getComment(entry),
|
||||||
iconData: _getIcon(entry)));
|
iconData: _getIcon(entry)));
|
||||||
}).toList()));
|
}).toList()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ class RelapseForm extends StatelessWidget {
|
||||||
var settingsModel = context.watch<SettingsProvider>();
|
var settingsModel = context.watch<SettingsProvider>();
|
||||||
var tasksModel = context.watch<TasksProvider>();
|
var tasksModel = context.watch<TasksProvider>();
|
||||||
return ListView(
|
return ListView(
|
||||||
|
padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
|
||||||
children: [
|
children: [
|
||||||
ElevatedCard(
|
ElevatedCard(
|
||||||
title: 'Rückfallkategorie',
|
title: 'Rückfallkategorie',
|
||||||
|
|
|
@ -19,6 +19,7 @@ class SleepForm extends StatelessWidget {
|
||||||
TasksProvider tasksModel = context.watch<TasksProvider>();
|
TasksProvider tasksModel = context.watch<TasksProvider>();
|
||||||
|
|
||||||
return ListView(
|
return ListView(
|
||||||
|
padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
|
||||||
children: [
|
children: [
|
||||||
const ElevatedCard(
|
const ElevatedCard(
|
||||||
title: 'Einschlafzeit',
|
title: 'Einschlafzeit',
|
||||||
|
|
|
@ -21,22 +21,20 @@ class ViewFormPage extends StatelessWidget {
|
||||||
TasksProvider tasksProvider = context.watch<TasksProvider>();
|
TasksProvider tasksProvider = context.watch<TasksProvider>();
|
||||||
return Column(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
return Column(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Center(
|
||||||
padding: const EdgeInsets.fromLTRB(10, 10, 10, 10),
|
child: pageProvider.showForm
|
||||||
child: Center(
|
? ChangeNotifierProvider(
|
||||||
child: pageProvider.showForm
|
create: (context) => InputProvider(),
|
||||||
? ChangeNotifierProvider(
|
child: form,
|
||||||
create: (context) => InputProvider(),
|
)
|
||||||
child: form,
|
: view,
|
||||||
)
|
)),
|
||||||
: view,
|
|
||||||
))),
|
|
||||||
if (!pageProvider.showForm)
|
if (!pageProvider.showForm)
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.symmetric(vertical: height * 0.02),
|
margin: EdgeInsets.symmetric(vertical: height * 0.02),
|
||||||
child: RoundIconButton(
|
child: RoundIconButton(
|
||||||
iconData: Icons.add_outlined,
|
iconData: Icons.add_outlined,
|
||||||
onPressed: tasksProvider.tasks[page] ?? true
|
onPressed: true
|
||||||
? () => pageProvider.swap()
|
? () => pageProvider.swap()
|
||||||
: () => showTaskDonePopup(context, page),
|
: () => showTaskDonePopup(context, page),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue