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