badge percentage support
This commit is contained in:
@@ -299,7 +299,6 @@ class _FieldInput extends StatelessWidget {
|
||||
final name = field.name.toLowerCase();
|
||||
if (name == 'max_speed') {
|
||||
final unit = entry.unit ?? 'kph';
|
||||
final isNumber = true;
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@@ -307,7 +306,7 @@ class _FieldInput extends StatelessWidget {
|
||||
initialValue: value?.toString(),
|
||||
onChanged: (val) {
|
||||
final parsed = double.tryParse(val);
|
||||
onChanged(isNumber ? parsed : val, unit: unit);
|
||||
onChanged(parsed, unit: unit);
|
||||
},
|
||||
decoration: const InputDecoration(
|
||||
border: OutlineInputBorder(),
|
||||
|
||||
Reference in New Issue
Block a user