changed add meal button to icon

This commit is contained in:
doman 2023-07-30 15:16:22 +02:00
parent d4f709ac7f
commit cbcdf7418e

View file

@ -34,7 +34,7 @@ class DiaryWidget extends StatelessWidget {
), ),
] ]
), ),
expandedHeight: 250, expandedHeight: 150,
backgroundColor: Theme.of(context).colorScheme.secondary, backgroundColor: Theme.of(context).colorScheme.secondary,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
@ -49,7 +49,7 @@ class DiaryWidget extends StatelessWidget {
color: Theme.of(context).colorScheme.onSecondary, color: Theme.of(context).colorScheme.onSecondary,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
child: TextButton( child: IconButton(
onPressed: () { onPressed: () {
Navigator.push( Navigator.push(
context, context,
@ -63,13 +63,11 @@ class DiaryWidget extends StatelessWidget {
refreshParent(); refreshParent();
}); });
}, },
child: Text( icon: const Icon(Icons.add),
"Add meal", style: ButtonStyle(
style: Theme.of(context).textTheme.bodyMedium!.copyWith( backgroundColor: MaterialStateProperty.all<Color>(Theme.of(context).colorScheme.secondary),
color: Theme.of(context).colorScheme.onSecondary, foregroundColor: MaterialStateProperty.all<Color>(Theme.of(context).colorScheme.onSecondary),
fontWeight: FontWeight.bold, ),
),
),
), ),
), ),
) )