wip layout add button
parent
d674051c57
commit
40f03ec177
|
@ -15,7 +15,11 @@ class RoundAddButton extends StatelessWidget {
|
||||||
backgroundColor: Colors.green, // <-- Button color
|
backgroundColor: Colors.green, // <-- Button color
|
||||||
foregroundColor: Colors.blue, // <-- Splash color
|
foregroundColor: Colors.blue, // <-- Splash color
|
||||||
),
|
),
|
||||||
child: const Icon(Icons.add_outlined, color: Colors.white),
|
child: Icon(
|
||||||
|
Icons.add_outlined,
|
||||||
|
color: Colors.white,
|
||||||
|
size: MediaQuery.of(context).size.height * 0.5,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ class ViewFormPage extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final height = MediaQuery.of(context).size.height;
|
||||||
PageProvider pageProvider = context.watch<PageProvider>();
|
PageProvider pageProvider = context.watch<PageProvider>();
|
||||||
TasksProvider tasksProvider = context.watch<TasksProvider>();
|
TasksProvider tasksProvider = context.watch<TasksProvider>();
|
||||||
return Column(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
return Column(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
|
||||||
|
@ -27,10 +28,15 @@ class ViewFormPage extends StatelessWidget {
|
||||||
))
|
))
|
||||||
: Center(child: view),
|
: Center(child: view),
|
||||||
if (!pageProvider.showForm)
|
if (!pageProvider.showForm)
|
||||||
RoundAddButton(
|
Container(
|
||||||
onPressed: tasksProvider.tasks[page] == true
|
height: height / 8,
|
||||||
? () => pageProvider.swap()
|
width: height / 8,
|
||||||
: () => showTaskDonePopup(context, page),
|
margin: EdgeInsets.only(bottom: height / 10),
|
||||||
|
child: RoundAddButton(
|
||||||
|
onPressed: tasksProvider.tasks[page] == true
|
||||||
|
? () => pageProvider.swap()
|
||||||
|
: () => showTaskDonePopup(context, page),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue