24 lines
751 B
Dart
24 lines
751 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:mileograph_flutter/objects/objects.dart';
|
|
import 'package:provider/provider.dart';
|
|
import 'package:mileograph_flutter/services/dataService.dart';
|
|
|
|
class TractionPage extends StatelessWidget {
|
|
Widget build(BuildContext context) {
|
|
final data = context.watch<DataService>();
|
|
return ListView.builder(
|
|
itemCount: data.traction.length,
|
|
itemBuilder: (context, index) {
|
|
final loco = data.traction[index];
|
|
return Card(
|
|
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
child: Padding(
|
|
padding: EdgeInsets.all(16),
|
|
child: Text('${loco.locoClass} ${loco.locoNumber}'),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
}
|
|
}
|