From 2a38b8ae2b003e7a126526e83182323ae5a488c7 Mon Sep 17 00:00:00 2001 From: bytedream <bytedream@protonmail.com> Date: Wed, 27 Mar 2024 20:07:17 +0100 Subject: [PATCH] don't show time warning when it's between 8PM and 7AM --- lib/view/home.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/view/home.dart b/lib/view/home.dart index 8fbd9f5..541c2ab 100644 --- a/lib/view/home.dart +++ b/lib/view/home.dart @@ -114,7 +114,9 @@ class _HomePageState extends State<HomeView> { body: Column( children: [ WatchState<TimeWarningState>((context, state) { - if(!state.show) return const SizedBox.shrink(); + if(!state.show || DateTime.now().hour >= 20 || DateTime.now().hour < 7) { + return const SizedBox.shrink(); + } return const SizedBox( height: 100,