antes de aider y un widget nuevo

This commit is contained in:
Álvaro González 2025-10-13 09:29:58 +02:00
parent 5a8f9de2a1
commit 2c0fcc8b4e
2 changed files with 2 additions and 1 deletions

View file

@ -226,7 +226,7 @@ class _FormulaScreenState extends State<FormulaScreen> {
controller: _inputControllers[variable.name],
keyboardType: TextInputType.number,
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[0-9\.\-]')),
//FilteringTextInputFormatter.allow(RegExp(r'[0-9\.\-]')),
],
decoration: const InputDecoration(
border: UnderlineInputBorder(),

View file

@ -69,6 +69,7 @@ class FormulaEvaluator {
{
return $code;
}""";
print("evaluateExpression:\n$d4rtCode");
final result = interpreter.execute(source: d4rtCode);
return result.toDouble();
}