mirror of
https://github.com/supleed2/ELEC60013-ES-CW1.git
synced 2024-11-14 03:35:48 +00:00
27 lines
782 B
Dart
27 lines
782 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
import 'package:leg_barkr_app/model/metrics_data.dart';
|
||
|
import 'metrics_min_max.dart';
|
||
|
|
||
|
class MetricsSummary extends StatelessWidget {
|
||
|
MetricsData data;
|
||
|
Color textColour;
|
||
|
|
||
|
MetricsSummary(this.data, this.textColour);
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Expanded(
|
||
|
child: Padding(
|
||
|
padding: EdgeInsets.all(15.0),
|
||
|
child: Center(
|
||
|
child: Column(
|
||
|
children: [
|
||
|
Text(data.metric, textAlign: TextAlign.center, style: TextStyle(color: textColour, fontSize: 24, fontWeight: FontWeight.bold)),
|
||
|
MetricsMinMax(data.lowestReading, data.highestReading, data.units)
|
||
|
],
|
||
|
)
|
||
|
)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
}
|