fix: no decimal on prices on ios
Some checks failed
/ test (release) Failing after 2m27s

This commit is contained in:
alzalia1 2025-08-20 12:13:33 +02:00
parent e5d383548d
commit ebeab2db94
6 changed files with 161 additions and 103 deletions

View file

@ -1,3 +1,5 @@
import 'dart:nativewrappers/_internal/vm/lib/ffi_patch.dart';
import 'package:flutter/material.dart';
import 'package:seshat/domain/models/book.dart';
import 'package:seshat/ui/add_page/view_model/add_view_model.dart';
@ -80,12 +82,16 @@ class _ConfirmationPopupState extends State<ConfirmationPopup> {
border: OutlineInputBorder(),
suffixText: "",
),
keyboardType: TextInputType.number,
keyboardType: TextInputType.numberWithOptions(
decimal: true,
),
validator: (value) {
if (value == null || value.isEmpty) {
return "Indiquez un prix";
} else if (num.tryParse(value) == null) {
return "Le prix doit être un nombre";
} else if (num.parse(value) < 0) {
return "Le prix doit être positif ou nul";
}
return null;
},