File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 13
13
- Marko Milosevic - < https://github.com/TaarnStar >
14
14
- Karthik Reddy (Axel) - < https://github.com/AxelBlaz3 >
15
15
- Ogundoyin Toluwani - < https://github.com/Tolu007 >
16
+ - Florian Schmitz - < https://github.com/floodoo >
16
17
17
18
## Translators
18
19
Original file line number Diff line number Diff line change @@ -156,6 +156,11 @@ class MeasurementEntryForm extends StatelessWidget {
156
156
157
157
@override
158
158
Widget build (BuildContext context) {
159
+ final measurementProvider = Provider .of <MeasurementProvider >(context, listen: false );
160
+ final measurementCategory = measurementProvider.categories.firstWhere (
161
+ (category) => category.id == _categoryId,
162
+ );
163
+
159
164
return Form (
160
165
key: _form,
161
166
child: Column (
@@ -199,7 +204,11 @@ class MeasurementEntryForm extends StatelessWidget {
199
204
),
200
205
// Value
201
206
TextFormField (
202
- decoration: InputDecoration (labelText: AppLocalizations .of (context).value),
207
+ decoration: InputDecoration (
208
+ labelText: AppLocalizations .of (context).value,
209
+ suffixIcon: Text (measurementCategory.unit),
210
+ suffixIconConstraints: const BoxConstraints (minWidth: 0 , minHeight: 0 ),
211
+ ),
203
212
controller: _valueController,
204
213
keyboardType: TextInputType .number,
205
214
validator: (value) {
You can’t perform that action at this time.
0 commit comments