mirror of
https://github.com/supleed2/ELEC60013-ES-CW1.git
synced 2024-12-23 14:05:48 +00:00
26 lines
969 B
Dart
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))
|
|
)
|
|
],
|
|
);
|
|
}
|
|
} |