This is a basic calculator logic to show how to separeta logic from front-ent.
This could be used for cli, web or Flutter application.
To see the Flutter app, see the flutter_calc project.
Sanitizing project files:
Basic operations support: sum, subtract, product and division
Example for Number class: number.dart Example for Calc class: calc.dart
Add this to your package's pubspec.yaml file:
dependencies: calc_core: ^1.0.1
You can install packages from the command line:
$ pub get
$ flutter packages get
Alternatively, your editor might support
pub get or
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:calc_core/calc.dart'; import 'package:calc_core/number.dart';
|1.0.1||Nov 25, 2018|
|1.0.0||Nov 25, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter, web, other
No platform restriction found in libraries.
lib/number.dart. (-1.49 points)
lib/number.dart reported 3 hints:
line 48 col 25: Use isEmpty instead of length
line 49 col 24: Use isEmpty instead of length
line 50 col 22: Use isEmpty instead of length
|Dart SDK||>=2.0.0 <3.0.0|