calc_core 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 56

Calculator core #

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.

1.0.1 #

Sanitizing project files:

  • example/

1.0.0 #

Basic operations support: sum, subtract, product and division


Examples #

Example for Number class: number.dart Example for Calc class: calc.dart

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  calc_core: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:calc_core/calc.dart';
import 'package:calc_core/number.dart';
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]
Learn more about scoring.

We analyzed this package on Mar 24, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/number.dart. (-2.48 points)

Analysis of lib/number.dart reported 5 hints:

line 1 col 1: Prefer using /// for doc comments.

line 15 col 28: Use ; instead of {} for empty constructor bodies.

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

Maintenance suggestions

Package is getting outdated. (-32.88 points)

The package was last published 69 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0