Format shared Material primitive integration
This commit is contained in:
@@ -145,7 +145,7 @@ class RunTimelineRow extends StatelessWidget {
|
||||
divider: divider,
|
||||
onTap: onTap,
|
||||
leading: AppListAvatar(
|
||||
foreground: runStatusColor(state, Theme.of(context).colorScheme),
|
||||
foreground: runStatusColor(state, Theme.of(context).colorScheme),
|
||||
child: RunStatusIcon(
|
||||
state: state,
|
||||
label: visit.status.isEmpty ? 'Status unavailable' : visit.status,
|
||||
|
||||
@@ -126,7 +126,7 @@ class RunListRow extends StatelessWidget {
|
||||
onLongPress: selecting ? null : onLongPress,
|
||||
selectionControl: selecting ? _checkbox(context) : null,
|
||||
leading: AppListAvatar(
|
||||
foreground: runStatusColor(state, Theme.of(context).colorScheme),
|
||||
foreground: runStatusColor(state, Theme.of(context).colorScheme),
|
||||
child: RunStatusIcon(state: state, label: runStatusLabel(run)),
|
||||
),
|
||||
title: Text(title),
|
||||
|
||||
@@ -59,7 +59,7 @@ class RunPathMini extends StatelessWidget {
|
||||
width: 14,
|
||||
height: 10,
|
||||
decoration: BoxDecoration(
|
||||
color: runStatusColor(stage.state, Theme.of(context).colorScheme),
|
||||
color: runStatusColor(stage.state, Theme.of(context).colorScheme),
|
||||
borderRadius: BorderRadius.circular(3),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -14,9 +14,9 @@ import 'runs_controller.dart';
|
||||
/// Opens the runs' usage and charts on their own page.
|
||||
Future<void> openRunsStats(BuildContext context, RunsController controller) {
|
||||
final page = RunsStatsPage(controller: controller);
|
||||
return Navigator.of(context).push<void>(
|
||||
MaterialPageRoute<void>(builder: (_) => page),
|
||||
);
|
||||
return Navigator.of(
|
||||
context,
|
||||
).push<void>(MaterialPageRoute<void>(builder: (_) => page));
|
||||
}
|
||||
|
||||
/// Usage totals, runs by status (a pie) and runs per day for the last week.
|
||||
@@ -92,7 +92,10 @@ class RunsStatsPage extends StatelessWidget {
|
||||
painter: _PiePainter([
|
||||
for (final entry in byState.entries)
|
||||
(
|
||||
runStatusColor(entry.key, Theme.of(context).colorScheme),
|
||||
runStatusColor(
|
||||
entry.key,
|
||||
Theme.of(context).colorScheme,
|
||||
),
|
||||
entry.value,
|
||||
),
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user