-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from krolmic/feat/optimize-for-tablet
Feat/optimize for tablet
- Loading branch information
Showing
15 changed files
with
203 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
part of '../home_screen.dart'; | ||
|
||
class _HomeMoods extends StatelessWidget { | ||
const _HomeMoods({required this.moods}); | ||
|
||
final List<Mood> moods; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
children: [ | ||
for (final mood in moods) | ||
TrackedMood( | ||
mood: mood, | ||
onTap: () => context.pushNamed( | ||
RoutesNames.updateMoodFromHome, | ||
extra: UpdateMoodRouteParameters(mood: mood), | ||
), | ||
).animate().fadeIn( | ||
duration: animationDuration, | ||
), | ||
const VerticalSpacing.medium(), | ||
], | ||
); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
tracking_flutter/lib/home/view/widgets/home_moods_header.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
part of '../home_screen.dart'; | ||
|
||
class _HomeMoodsHeader extends StatelessWidget { | ||
const _HomeMoodsHeader(); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final translations = AppLocalizations.of(context)!; | ||
|
||
return Row( | ||
mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
children: [ | ||
Text( | ||
translations.recentlyTracked, | ||
style: Theme.of(context).textTheme.headlineSmall, | ||
), | ||
TextButton( | ||
onPressed: () { | ||
context.goNamed(RoutesNames.moods); | ||
}, | ||
child: Text( | ||
translations.seeAll, | ||
style: Theme.of(context).textTheme.bodySmall!.copyWith( | ||
color: AppColors.blue, | ||
), | ||
), | ||
), | ||
], | ||
); | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.