Add admin management tabs and TV/mobile fixes

This commit is contained in:
kihong.kim
2026-01-24 21:44:13 +09:00
parent 807df3d678
commit 29881aa442
10 changed files with 522 additions and 105 deletions

View File

@@ -1,4 +1,5 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@@ -47,84 +48,102 @@ class _TvDashboardScreenState extends State<TvDashboardScreen> {
Widget build(BuildContext context) {
// 1920x1080 reference
return Scaffold(
body: SafeArea(
child: Padding(
padding: const EdgeInsets.all(32.0), // Outer margin safe zone
child: Column(
children: [
// Header: Time and Weather
SizedBox(
height: 100,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [const DigitalClockWidget(), const WeatherWidget()],
),
),
const SizedBox(height: 24),
// Main Content Grid
Expanded(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
body: Center(
child: AspectRatio(
aspectRatio: 16 / 9,
child: FittedBox(
fit: BoxFit.contain,
child: SizedBox(
width: 1920,
height: 1080,
child: Padding(
padding: const EdgeInsets.all(32.0), // Outer margin safe zone
child: Column(
children: [
// Left Column: Calendar, Schedule, Announcement
Expanded(
flex: 3,
child: Column(
// Header: Time and Weather
SizedBox(
height: 100,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Expanded(flex: 4, child: CalendarWidget()),
const SizedBox(height: 16),
const Expanded(flex: 4, child: ScheduleListWidget()),
const SizedBox(height: 16),
const Expanded(flex: 2, child: AnnouncementWidget()),
const DigitalClockWidget(),
const WeatherWidget()
],
),
),
const SizedBox(width: 24),
// Center Column: Photo Slideshow
const SizedBox(height: 24),
// Main Content Grid
Expanded(
flex: 4,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.5),
blurRadius: 20,
offset: const Offset(0, 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Left Column: Calendar, Schedule, Announcement
Expanded(
flex: 3,
child: Column(
children: [
const Expanded(
flex: 4, child: CalendarWidget()),
const SizedBox(height: 16),
const Expanded(
flex: 4, child: ScheduleListWidget()),
const SizedBox(height: 16),
const Expanded(
flex: 2, child: AnnouncementWidget()),
],
),
],
),
clipBehavior: Clip.antiAlias,
child: const PhotoSlideshowWidget(),
),
const SizedBox(width: 24),
// Center Column: Photo Slideshow
Expanded(
flex: 4,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.5),
blurRadius: 20,
offset: const Offset(0, 10),
),
],
),
clipBehavior: Clip.antiAlias,
child: const PhotoSlideshowWidget(),
),
),
const SizedBox(width: 24),
// Right Column: Todos, Bible Verse
Expanded(
flex: 3,
child: Column(
children: [
const Expanded(
flex: 6, child: TodoListWidget()),
const SizedBox(height: 16),
const Expanded(
flex: 3, child: BibleVerseWidget()),
],
),
),
],
),
),
const SizedBox(width: 24),
// Right Column: Todos, Bible Verse
Expanded(
flex: 3,
child: Column(
children: [
const Expanded(flex: 6, child: TodoListWidget()),
const SizedBox(height: 16),
const Expanded(flex: 3, child: BibleVerseWidget()),
],
// Hidden trigger for admin/mobile view (e.g. long press corner)
GestureDetector(
onLongPress: () {
Navigator.of(context).pushNamed('/admin');
},
child: Container(
width: 50,
height: 50,
color: Colors.transparent,
),
),
],
),
),
// Hidden trigger for admin/mobile view (e.g. long press corner)
GestureDetector(
onLongPress: () {
Navigator.of(context).pushNamed('/admin');
},
child: Container(
width: 50,
height: 50,
color: Colors.transparent,
),
),
],
),
),
),
),