flutter_mathjs 0.0.5

  • Readme
  • Changelog
  • Example
  • Installing
  • 52

flutter_mathjs #

Flutter plugin to use mathjs using liquidcore. Curently work from android only

I create this plugin for my own app. so only some necesary function that I implemented, if you need more function from Mathjs, you can just open an issue and I will try to add it if I have time. Or you can simply make a pull request, add new function and fix my messy code.

Getting Started #

Depend on this plugin #

  flutter_mathjs: any

don't forget to run flutter pub get.

Import it. #

  import 'package:flutter_mathjs/flutter_mathjs.dart';

Use it. #

/// evaluate an expression
Mathjs.eval("simplify("2x + x")");  // 3 * x
Mathjs.eval("derivative("2x^2 + 3x + 4", "x")"); // 4 * x + 3
Mathjs.eval("5cm + 0.2 m in inch"); // 9.8425196850394 inch
Mathjs.eval("100 degC to fahrenheit"); // 211.99999999999994 fahrenheit

/// formatted result
Mathjs.format("100 degC to fahrenheit", ValueFormat(
    "precision": 14,
); // 212 fahrenheit

/// clear all saved variable and function

/// get a documentation of a function

/// it will return Documentation object
//  "name": "log",
//  "category": "Arithmetic",
//  "syntax": [
//    "log(x)",
//    "log(x, base)"
//  ],
//  "description": "Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",
//  "examples": [
//    "log(3.5)",
//    "a = log(2.4)",
//    "exp(a)",
//    "10 ^ 4",
//    "log(10000, 10)",
//    "log(10000) / log(10)",
//    "b = log(1024, 2)",
//    "2 ^ b"
//  ],
//  "seealso": [
//    "exp",
//    "log1p",
//    "log2",
//    "log10"
//  ],
//  "mathjs": "Help"

0.0.5 #

Migrated to AndroidX

0.0.4 #

add help function to retrieve a documentation

0.0.3 #

update license

0.0.2 #

add format function

0.0.1 #

initial release


flutter_mathjs_example #

Demonstrates how to use the flutter_mathjs plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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

  flutter_mathjs: ^0.0.5

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support 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:flutter_mathjs/flutter_mathjs.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 Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The package description is too short. (-7 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies