Removes dropdown selector for refresh cycle. Changes refresh to 20 seconds.
This commit is contained in:
@@ -68,61 +68,6 @@ class LiveInfoPanel extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 5,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(999),
|
||||
color: Colors.black.withValues(alpha: 0.12),
|
||||
),
|
||||
child: Text(
|
||||
snapshot?.sourceEnabled ?? 'Unknown Source',
|
||||
style: Theme.of(context).textTheme.labelSmall?.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
PopupMenuButton<int>(
|
||||
tooltip: 'Set refresh interval',
|
||||
initialValue: liveInfo.refreshIntervalSeconds,
|
||||
onSelected: liveInfo.setRefreshIntervalSeconds,
|
||||
itemBuilder: (BuildContext context) {
|
||||
return intervalOptions
|
||||
.map(
|
||||
(int seconds) => PopupMenuItem<int>(
|
||||
value: seconds,
|
||||
child: Text('$seconds seconds'),
|
||||
),
|
||||
)
|
||||
.toList(growable: false);
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 6,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Colors.black.withValues(alpha: 0.08),
|
||||
),
|
||||
child: Text(
|
||||
'${liveInfo.refreshIntervalSeconds}s',
|
||||
style: Theme.of(context).textTheme.labelMedium?.copyWith(
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
IconButton(
|
||||
tooltip: 'Refresh now',
|
||||
onPressed: liveInfo.isLoading
|
||||
? null
|
||||
: () => liveInfo.refresh(),
|
||||
icon: const Icon(Icons.refresh_rounded),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
|
||||
Reference in New Issue
Block a user