Skip to content

Commit

Permalink
wip: localization
Browse files Browse the repository at this point in the history
  • Loading branch information
Arenukvern committed Oct 25, 2021
1 parent 9c3ef72 commit 011407a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/screens/home/small_home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,14 @@ class _SmallHomeScreenState extends State<SmallHomeScreen> {
],
),
);
const _welcome = 'Good evening';
final _now = DateTime.now();
final _welcome = () {
if (_now.hour < 7) return 'Good night';
if (_now.hour < 12 && _now.hour >= 7) return 'Good morning';
if (_now.hour > 18) return 'Good evening';
return 'Good day';
}();

final appBar = AppBar(
title: Text(
_welcome,
Expand Down

0 comments on commit 011407a

Please sign in to comment.