Skip to content

Commit

Permalink
add frequency info in controll panel
Browse files Browse the repository at this point in the history
  • Loading branch information
2shrestha22 committed Jul 23, 2024
1 parent e0c40cb commit 184dde5
Showing 1 changed file with 28 additions and 20 deletions.
48 changes: 28 additions & 20 deletions lib/widgets/radio_control_panel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ class RadioControlPanel extends ConsumerWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Column(
children: [
StationLogo(radioState.station!.imageUrl),
const GutterTiny(),
DefaultTextStyle(
style: Theme.of(context).textTheme.bodySmall!,
child: Builder(
DefaultTextStyle(
style: Theme.of(context).textTheme.bodySmall!,
child: Column(
children: [
StationLogo(radioState.station!.imageUrl),
const GutterTiny(),
Builder(
builder: (context) {
if (radioState.bitRate != null) {
return Text(formatBitrate(radioState.bitRate!));
}
return const Text('-- Kbps');
},
),
),
],
],
),
),
const Gutter(),
Expanded(
Expand All @@ -60,17 +60,25 @@ class RadioControlPanel extends ConsumerWidget {
),
DefaultTextStyle(
style: Theme.of(context).textTheme.bodySmall!,
child: Builder(
builder: (context) {
if (radioState.title != null) {
return Text(
radioState.title!,
maxLines: 1,
overflow: TextOverflow.ellipsis,
);
}
return const Text('');
},
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(radioState.station!.getFreqString()),
Flexible(
child: Builder(
builder: (context) {
if (radioState.title != null) {
return Text(
' | ${radioState.title!}',
maxLines: 1,
overflow: TextOverflow.ellipsis,
);
}
return const Text('');
},
),
),
],
),
),
ButtonBar(
Expand Down

0 comments on commit 184dde5

Please sign in to comment.