mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
Replace the legacy Apple TV-style purple/cyan theme with the full Google Stitch Cyber-Cinematic Glass design system across the entire app (desktop + mobile). - New Material 3 dark ColorScheme: background #121317, primary #adc6ff, primaryContainer #4b8eff, surface containers, etc. - Typography: Space Grotesk (headlines) + Inter (body/labels) - 3-level glassmorphism via GlassContainer: base, glass, floating - Primary gradient: #007AFF → #00C6FF with blue glow effects - Removed old compatibility aliases (focusColor, border, textPrimary, textSecondary); all code now uses semantic Stitch tokens - Systematically replaced all Colors.white/black/red/grey and GoogleFonts.roboto/outfit with Stitch equivalents - All 36 lib/ files updated, zero compilation errors Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
57 lines
1.2 KiB
Dart
57 lines
1.2 KiB
Dart
import 'dart:async';
|
|
import 'package:flutter/material.dart';
|
|
import '../../../core/theme/app_colors.dart';
|
|
import 'package:intl/intl.dart';
|
|
|
|
class ClockWidget extends StatefulWidget {
|
|
final TextStyle? style;
|
|
|
|
const ClockWidget({super.key, this.style});
|
|
|
|
@override
|
|
State<ClockWidget> createState() => _ClockWidgetState();
|
|
}
|
|
|
|
class _ClockWidgetState extends State<ClockWidget> {
|
|
late DateTime _now;
|
|
Timer? _timer;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_now = DateTime.now();
|
|
_startTimer();
|
|
}
|
|
|
|
void _startTimer() {
|
|
_timer = Timer.periodic(const Duration(seconds: 1), (timer) {
|
|
if (mounted) {
|
|
setState(() {
|
|
_now = DateTime.now();
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
@override
|
|
void dispose() {
|
|
_timer?.cancel();
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// Format: HH:mm
|
|
final timeString = DateFormat('HH:mm').format(_now);
|
|
return Text(
|
|
timeString,
|
|
style: widget.style ?? const TextStyle(
|
|
color: AppColors.onSurface,
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.bold,
|
|
shadows: [Shadow(color: AppColors.background, blurRadius: 4)],
|
|
),
|
|
);
|
|
}
|
|
}
|