listen tab initial layout

This commit is contained in:
2024-09-05 20:35:26 -04:00
parent 1fdac3b2cb
commit 2fd11f36fc
2 changed files with 42 additions and 2 deletions

View File

@@ -6,7 +6,44 @@ class Listen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return const Center( return const Center(
child: Text("Listen Page"), child: PlayControls(),
);
}
}
class PlayControls extends StatefulWidget {
const PlayControls({super.key});
@override
State<PlayControls> createState() => _PlayControlsState();
}
class _PlayControlsState extends State<PlayControls> {
bool isPlaying = false;
@override
Widget build(BuildContext context) {
return ClipOval(
child: Material(
color: Theme.of(context).colorScheme.primaryContainer,
child: InkWell(
splashColor: Theme.of(context).colorScheme.onPrimaryContainer,
onTap: () {
setState(() {
isPlaying = !isPlaying;
});
},
child: SizedBox(
width: 100,
height: 100,
child: Icon(
isPlaying ? Icons.stop : Icons.play_arrow,
color: Colors.white,
size: 50,
),
),
),
),
); );
} }
} }

View File

@@ -11,7 +11,10 @@ class YthingRadio extends StatelessWidget {
return MaterialApp( return MaterialApp(
title: 'Ything Radio', title: 'Ything Radio',
theme: ThemeData( theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange), colorScheme: ColorScheme.fromSeed(
seedColor: Colors.orange,
dynamicSchemeVariant: DynamicSchemeVariant.fidelity,
),
useMaterial3: true, useMaterial3: true,
), ),
home: const HomePage(title: 'Ything Radio'), home: const HomePage(title: 'Ything Radio'),