ELEC60013-ES-CW1/lib/view/metrics/metrics_min_max.dart
2022-02-10 11:06:37 +00:00

26 lines
969 B
Dart

import 'package:flutter/material.dart';
class MetricsMinMax extends StatelessWidget {
double lowest, highest;
String units;
MetricsMinMax(this.lowest, this.highest, this.units);
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.fromLTRB(0.0, 10.0, 5.0, 10.0),
child: Text("Minimum\n" + lowest.toString() + " " + units, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.bold))
),
Padding(
padding: EdgeInsets.fromLTRB(5.0, 10.0, 0.0, 10.0),
child: Text("Maximum\n" + highest.toString() + " " + units, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.bold))
)
],
);
}
}