Improve entries page and latest changes panel, units on events and timeline
All checks were successful
All checks were successful
This commit is contained in:
@@ -36,16 +36,20 @@ class RouteDetailsView extends StatelessWidget {
|
||||
final List<String> route;
|
||||
final List<double> costs;
|
||||
final VoidCallback onBack;
|
||||
final Set<String> routingPoints;
|
||||
|
||||
const RouteDetailsView({
|
||||
super.key,
|
||||
required this.route,
|
||||
required this.costs,
|
||||
required this.onBack,
|
||||
this.routingPoints = const {},
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final highlightColor = Theme.of(context).colorScheme.primary;
|
||||
final mutedColor = Theme.of(context).colorScheme.outlineVariant;
|
||||
return Column(
|
||||
children: [
|
||||
Align(
|
||||
@@ -60,8 +64,20 @@ class RouteDetailsView extends StatelessWidget {
|
||||
child: ListView.builder(
|
||||
itemCount: route.length,
|
||||
itemBuilder: (context, index) {
|
||||
final label = route[index];
|
||||
final isRoutingPoint = routingPoints.contains(label);
|
||||
return ListTile(
|
||||
title: Text(route[index]),
|
||||
leading: Icon(
|
||||
Icons.circle,
|
||||
size: 12,
|
||||
color: isRoutingPoint ? highlightColor : mutedColor,
|
||||
),
|
||||
title: Text(
|
||||
label,
|
||||
style: isRoutingPoint
|
||||
? TextStyle(color: highlightColor, fontWeight: FontWeight.w600)
|
||||
: null,
|
||||
),
|
||||
trailing: Text("${costs[index].toStringAsFixed(2)} mi"),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user