change app name, add route calculator
This commit is contained in:
@@ -21,52 +21,53 @@ class TopTractionPanel extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: List.generate(data.homepageStats?.topLocos.length ?? 0, (
|
||||
index,
|
||||
) {
|
||||
final loco = data.homepageStats!.topLocos[index];
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 0, vertical: 8),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(8),
|
||||
children: List.generate(
|
||||
data.homepageStats?.topLocos.length ?? 0,
|
||||
(index) {
|
||||
final loco = data.homepageStats!.topLocos[index];
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 0, vertical: 8),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(8),
|
||||
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '${index + 1}. ',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text.rich(
|
||||
TextSpan(
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '${index + 1}. ',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text:
|
||||
'${loco.locoClass} ${loco.locoNumber}',
|
||||
),
|
||||
],
|
||||
TextSpan(
|
||||
text:
|
||||
'${loco.locoClass} ${loco.number}',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${loco.locoName}',
|
||||
style: TextStyle(fontStyle: FontStyle.italic),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text('${loco.locoMileage?.toStringAsFixed(1)} mi'),
|
||||
],
|
||||
Text(
|
||||
'${loco.name}',
|
||||
style: TextStyle(fontStyle: FontStyle.italic),
|
||||
),
|
||||
],
|
||||
),
|
||||
Text('${loco.mileage?.toStringAsFixed(1)} mi'),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user