antes de aider y un widget nuevo
This commit is contained in:
parent
5a8f9de2a1
commit
2c0fcc8b4e
2 changed files with 2 additions and 1 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ class FormulaEvaluator {
|
|||
{
|
||||
return $code;
|
||||
}""";
|
||||
print("evaluateExpression:\n$d4rtCode");
|
||||
final result = interpreter.execute(source: d4rtCode);
|
||||
return result.toDouble();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue