Overview
TinyExpr is a lightweight Dart library designed to evaluate mathematical expressions dynamically. It supports variables, custom functions, and standard arithmetic operations, making it ideal for applications requiring runtime expression parsing. The library is efficient, easy to integrate, and suitable for use across multiple platforms including mobile, web, and desktop. It enables developers to build flexible calculators, data-driven formulas, or configuration systems without relying on external parsers.
Use cases
- Dynamic formula evaluation
- Calculator applications
- Configuration-based logic
- Real-time data processing
- Custom function scripting
- Mathematical modeling
Key features
- Variable support
- Custom function definitions
- Cross-platform compatibility
- Lightweight and fast
- Simple API
- Expression parsing
Suitable for
- Developers building calculators
- Applications with dynamic math rules
- Educational tools
- Data-driven UIs
- Backend logic with user-defined expressions
Considerations
- Not suitable for complex symbolic math
- Limited to basic arithmetic and function calls
- No built-in error recovery
- Requires careful input validation
- Best for simple to moderately complex expressions