listen tab initial layout
This commit is contained in:
@@ -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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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'),
|
||||||
|
|||||||
Reference in New Issue
Block a user