mate 0.0.5 copy "mate: ^0.0.5" to clipboard
mate: ^0.0.5 copied to clipboard

A simple and lightweight math library, that can parse and calculate string expressions.

0.0.5 - (29/11/2021) #

  • Resolved: #13 Re-structure parsing algorithm
  • Resolved: #3 Parse & Calculate parentheses

Now, mate has 2x clean and fast parsing structure, It converts given expression to tokens list, and by using that list expression class can calculate the final result. However, it looks like an interpreter now.

And also mate can calculate highly-nested (with parentheses) expressions.

Example:

final String exp = "((4 + 5) * ((2 * 2) + 2)) / (1.5 * 2)"
final double? result = mate.calculate(exp); // --> 18

0.0.4 - (29/10/2021) #

  • Resolved: #10 Percentage Calculation Support

Now, mate can calculate [X]'s [Y] percent (from string)

Example:

final String exp = "10 % 2"; 
final double? result = expressionParser.calculate(exp); // --> 0,2

0.0.3 - (27/10/2021) #

  • Resolved: #8 Native Support

Now, mate is independet from flutter

0.0.2 - (26/10/2021) #

  • Resolved: #4 and #5

Now, parser can understand rational numbers and calculate it.

Example:

final String exp = "25,58 * 96 + 44,32";
final double? result = ExpressionParser.calculate(exp); // --> 2500

0.0.1 - (25/10/2021) #

Package Logo

The very first version of "Mate", that can calculate expressions written as string format.

Example:

final String exp = "-2 + 5 + 10 * 2";
final double? result = expressionParser.calculate(exp); // --> 23
3
likes
110
pub points
54%
popularity

Publisher

verified publishertheiskaa.com

A simple and lightweight math library, that can parse and calculate string expressions.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (LICENSE)

More

Packages that depend on mate