Flutter widget that provides simple calculator. You can easily integrate a calculator to your apps.
SimpleCalculator(
theme: const CalculatorThemeData(
displayColor: Colors.black,
displayStyle: const TextStyle(fontSize: 80, color: Colors.yellow),
/*...*/
),
)
SimpleCalculator(
numberFormat: NumberFormat.decimalPattern("fa_IR")
..maximumFractionDigits = 6,
)
To use this plugin, add flutter_simple_calculator
as a dependency in your pubspec.yaml file.
dependencies:
flutter_simple_calculator:
Import the library in your file.
import 'package:flutter_simple_calculator/flutter_simple_calculator.dart';
See the example
directory for a complete sample app using SimpleCalculator.
Or use the SimpleCalculator like below.
SimpleCalculator(
value: 123.45,
hideExpression: true,
onChanged: (key, value, expression) {
/*...*/
},
theme: const CalculatorThemeData(
displayColor: Colors.black,
displayStyle: const TextStyle(fontSize: 80, color: Colors.yellow),
),
)