listen tab initial layout
This commit is contained in:
@@ -6,7 +6,44 @@ class Listen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,10 @@ class YthingRadio extends StatelessWidget {
|
||||
return MaterialApp(
|
||||
title: 'Ything Radio',
|
||||
theme: ThemeData(
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepOrange),
|
||||
colorScheme: ColorScheme.fromSeed(
|
||||
seedColor: Colors.orange,
|
||||
dynamicSchemeVariant: DynamicSchemeVariant.fidelity,
|
||||
),
|
||||
useMaterial3: true,
|
||||
),
|
||||
home: const HomePage(title: 'Ything Radio'),
|
||||
|
||||
Reference in New Issue
Block a user