mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-11 17:30:00 +02:00
feat: Add IPTV player screen with live stream FFmpeg transcoding, playback position tracking, and new dashboard and digital clock widgets.
This commit is contained in:
1 parent
fb2412e03a
commit
9fd8fe62e5
4 files changed
+68
-2
No files matched your search
@@ -0,0 +1,50 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class DigitalClock extends StatefulWidget {
|
||||
const DigitalClock({super.key});
|
||||
|
||||
@override
|
||||
State<DigitalClock> createState() => _DigitalClockState();
|
||||
}
|
||||
|
||||
class _DigitalClockState extends State<DigitalClock> {
|
||||
late Stream<DateTime> _clockStream;
|
||||
late DateFormat _format;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_format = DateFormat('HH:mm');
|
||||
_clockStream = Stream.periodic(const Duration(seconds: 1), (_) => DateTime.now());
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return StreamBuilder<DateTime>(
|
||||
stream: _clockStream,
|
||||
initialData: DateTime.now(),
|
||||
builder: (context, snapshot) {
|
||||
final timeString = _format.format(snapshot.data ?? DateTime.now());
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border: Border.all(color: Colors.white.withOpacity(0.05)),
|
||||
),
|
||||
child: Text(
|
||||
timeString,
|
||||
style: GoogleFonts.inter(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 16,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user