aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bottom_panel.dart10
-rw-r--r--lib/widget_clock.dart32
2 files changed, 16 insertions, 26 deletions
diff --git a/lib/bottom_panel.dart b/lib/bottom_panel.dart
index f61c59d..16d3a4e 100644
--- a/lib/bottom_panel.dart
+++ b/lib/bottom_panel.dart
@@ -36,6 +36,11 @@ class _BottomPanelWidgetState extends ConsumerState<BottomPanelWidget> {
Widget build(BuildContext context) {
final int index = ref.watch(StackIndexProvider);
+ void handleLogoTap() {
+ ref.read(StackIndexProvider.notifier).state = 1;
+ timer.reset();
+ }
+
return SizedBox(
height: widget.height,
child: IndexedStack(index: index, children: <Widget>[
@@ -47,10 +52,7 @@ class _BottomPanelWidgetState extends ConsumerState<BottomPanelWidget> {
child: ScalableImageWidget.fromSISource(
si: ScalableImageSource.fromSvg(
rootBundle, 'images/Utility_Logo_Grey-01.svg')))),
- onTap: () {
- ref.read(StackIndexProvider.notifier).state = 1;
- timer.reset();
- },
+ onTap: () => handleLogoTap(),
),
Container(
color: widget.color,
diff --git a/lib/widget_clock.dart b/lib/widget_clock.dart
index c7b53ec..5962717 100644
--- a/lib/widget_clock.dart
+++ b/lib/widget_clock.dart
@@ -40,34 +40,22 @@ class _ClockWidgetState extends State<ClockWidget> {
@override
Widget build(BuildContext context) {
- TextStyle? textStyle = Theme.of(context)
- .textTheme
- .labelLarge
- ?.copyWith(color: widget.textColor);
+ TextStyle? textStyle = TextStyle(fontSize: 32, color: widget.textColor);
+
return Container(
height: widget.size,
- //padding: EdgeInsets.all(16.0),
+ padding: EdgeInsets.all(16.0),
child: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
children: [
- SizedBox(height: 16),
- FittedBox(
- fit: BoxFit.contain,
- child: Text(
- DateFormat('EEEE').format(_now),
- style: textStyle,
- ),
- ),
- //const Divider(thickness: 1),
- FittedBox(
- fit: BoxFit.contain,
- child: Text(
- DateFormat.jm().format(_now),
- style: textStyle,
- ),
+ Text(
+ DateFormat('EEEE').format(_now),
+ style: textStyle,
),
- SizedBox(height: 16),
+ SizedBox(height: 8),
+ Text(DateFormat.jm().format(_now), style: textStyle),
],
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
),
alignment: Alignment.center,
);