Right align calendar button as well

This commit is contained in:
Roland Geider
2021-02-18 23:16:32 +01:00
parent d101ec6bd3
commit 6ab9cef5d8
2 changed files with 32 additions and 0 deletions

View File

@@ -67,6 +67,14 @@ class AppLocalizations {
);
}
String get workoutSession {
return Intl.message(
'Workout session',
name: 'workoutSession',
desc: 'A logged workout session',
);
}
String get newDay {
return Intl.message(
'New day',
@@ -155,6 +163,14 @@ class AppLocalizations {
);
}
String get nutritionalDiary {
return Intl.message(
'Nutritional diary',
name: 'nutritionalDiary',
desc: 'The nutritional diary for a plan',
);
}
String get nutritionalPlans {
return Intl.message(
'Nutritional plans',

View File

@@ -354,6 +354,22 @@ class _DashboardCalendarWidgetState extends State<DashboardCalendarWidget>
}
Widget _buildButtons() {
return Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
TextButton(
child: Text('Go to today'),
onPressed: () async {
final today = DateTime.now();
_calendarController.setSelectedDay(
DateTime(today.year, today.month, today.day),
runCallback: true,
);
},
),
],
);
return Column(
children: <Widget>[
TextButton(