cpd_2022_energy/lib/widgets/OutputFieldWidget.dart

33 lines
759 B
Dart

import 'package:flutter/material.dart';
class TabDisplayWidget extends StatelessWidget {
String _feedbackText = "";
double _amunt = 0.0;
String _unit = "";
TabDisplayWidget(String feedbackText, double amunt, String unit,
{super.key}) {
_feedbackText = feedbackText;
_amunt = amunt;
_unit = unit;
}
@override
Widget build(BuildContext context) {
return Expanded(
child: TextField(
enabled: false,
readOnly: true,
decoration: InputDecoration(
filled: true,
fillColor: const Color.fromARGB(255, 209, 255, 82),
border: const OutlineInputBorder(),
labelText: '$_feedbackText $_amunt $_unit',
),
),
);
}
}