From 86a2ed5dc7db5e1e01337638a28d0960a5a50e15 Mon Sep 17 00:00:00 2001 From: Youngbin Han Date: Thu, 25 Jul 2024 23:58:36 +0900 Subject: [PATCH] Main page larger widgets --- lib/clockwidgets.dart | 12 ++++++++---- lib/main.dart | 43 +++++++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/lib/clockwidgets.dart b/lib/clockwidgets.dart index 087e998..2f5b6ea 100644 --- a/lib/clockwidgets.dart +++ b/lib/clockwidgets.dart @@ -5,28 +5,32 @@ import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; class ClockTimeWidget extends StatelessWidget { - const ClockTimeWidget({super.key}); + final TextStyle? style; + const ClockTimeWidget({super.key, this.style}); @override Widget build(BuildContext context) { return StreamBuilder( stream: Stream.periodic(const Duration(seconds: 1)), builder: (context, snapshot) { - return Text(DateFormat('hh:mm:ss a').format(DateTime.now())); + return Text(DateFormat('hh:mm:ss a').format(DateTime.now()), + style: style); }, ); } } class ClockDateWidget extends StatelessWidget { - const ClockDateWidget({super.key}); + final TextStyle? style; + const ClockDateWidget({super.key, this.style}); @override Widget build(BuildContext context) { return StreamBuilder( stream: Stream.periodic(const Duration(seconds: 1)), builder: (context, snapshot) { - return Text(DateFormat('yyyy-MM-dd').format(DateTime.now())); + return Text(DateFormat('yyyy-MM-dd').format(DateTime.now()), + style: style); }, ); } diff --git a/lib/main.dart b/lib/main.dart index 3bf453d..889a82c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -128,16 +128,16 @@ class _KioskMainPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ ConstrainedBox( - constraints: BoxConstraints(maxWidth: 1000, maxHeight: 150), + constraints: BoxConstraints(maxWidth: 1300, maxHeight: 200), child: YaruBanner.tile( surfaceTintColor: YaruColors.orange, title: Text("환영합니다 | Welcome", - style: TextStyle(fontSize: 40)), + style: TextStyle(fontSize: 60)), subtitle: Text("체크인 방법을 선택하세요 | Choose Check-in method", - style: TextStyle(fontSize: 20)), + style: TextStyle(fontSize: 30)), icon: Icon( YaruIcons.ubuntu_logo_large, - size: 100, + size: 120, ))), ], ), @@ -145,14 +145,14 @@ class _KioskMainPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ ConstrainedBox( - constraints: BoxConstraints(maxWidth: 500, maxHeight: 200), + constraints: BoxConstraints(maxWidth: 650, maxHeight: 250), child: YaruBanner.tile( - title: Text("QR 코드로 체크인", style: TextStyle(fontSize: 35)), + title: Text("QR 코드로 체크인", style: TextStyle(fontSize: 50)), subtitle: Text("Check-in with QR Code", - style: TextStyle(fontSize: 20)), + style: TextStyle(fontSize: 25)), icon: Icon( Icons.qr_code, - size: 100, + size: 120, ), onTap: () { Navigator.push( @@ -164,15 +164,15 @@ class _KioskMainPageState extends State { }, )), ConstrainedBox( - constraints: BoxConstraints(maxWidth: 500, maxHeight: 200), + constraints: BoxConstraints(maxWidth: 650, maxHeight: 250), child: YaruBanner.tile( title: - Text("이메일 주소로 체크인", style: TextStyle(fontSize: 35)), + Text("이메일 주소로 체크인", style: TextStyle(fontSize: 50)), subtitle: Text("Check-in with E-Mail Address", - style: TextStyle(fontSize: 20)), + style: TextStyle(fontSize: 25)), icon: Icon( YaruIcons.mail_open, - size: 100, + size: 120, ), onTap: () { Navigator.push( @@ -189,24 +189,27 @@ class _KioskMainPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ ConstrainedBox( - constraints: BoxConstraints(maxWidth: 500, maxHeight: 100), + constraints: BoxConstraints(maxWidth: 650, maxHeight: 150), child: YaruBanner.tile( - title: ClockTimeWidget(), - subtitle: ClockDateWidget(), + title: ClockTimeWidget( + style: TextStyle(fontSize: 30), + ), + subtitle: ClockDateWidget(style: TextStyle(fontSize: 20)), icon: Icon( YaruIcons.clock, - size: 50, + size: 60, ), )), ConstrainedBox( - constraints: BoxConstraints(maxWidth: 500, maxHeight: 100), + constraints: BoxConstraints(maxWidth: 650, maxHeight: 150), child: YaruBanner.tile( surfaceTintColor: YaruColors.orange, - title: Text("관계자 호출"), - subtitle: Text("CALL STAFF"), + title: Text("관계자 호출", style: TextStyle(fontSize: 30)), + subtitle: + Text("CALL STAFF", style: TextStyle(fontSize: 20)), icon: Icon( YaruIcons.light_bulb_on, - size: 50, + size: 60, ), onTap: () async { await kioskClient.callStaff();