From cbcdf7418e4b18b4670cf34990360706d434b844 Mon Sep 17 00:00:00 2001 From: doman Date: Sun, 30 Jul 2023 15:16:22 +0200 Subject: [PATCH] changed add meal button to icon --- lib/widgets/diary.dart | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/widgets/diary.dart b/lib/widgets/diary.dart index d2479d8..d6c2cb8 100644 --- a/lib/widgets/diary.dart +++ b/lib/widgets/diary.dart @@ -34,7 +34,7 @@ class DiaryWidget extends StatelessWidget { ), ] ), - expandedHeight: 250, + expandedHeight: 150, backgroundColor: Theme.of(context).colorScheme.secondary, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), @@ -49,7 +49,7 @@ class DiaryWidget extends StatelessWidget { color: Theme.of(context).colorScheme.onSecondary, fontWeight: FontWeight.bold, ), - child: TextButton( + child: IconButton( onPressed: () { Navigator.push( context, @@ -63,13 +63,11 @@ class DiaryWidget extends StatelessWidget { refreshParent(); }); }, - child: Text( - "Add meal", - style: Theme.of(context).textTheme.bodyMedium!.copyWith( - color: Theme.of(context).colorScheme.onSecondary, - fontWeight: FontWeight.bold, - ), - ), + icon: const Icon(Icons.add), + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all(Theme.of(context).colorScheme.secondary), + foregroundColor: MaterialStateProperty.all(Theme.of(context).colorScheme.onSecondary), + ), ), ), )