首页 > 解决方案 > How do i get the answer of an equation in dart?

问题描述

I would like to get the answer of the equation in double which is in string like "2+3*9". How can I do this with Dart?

标签: dartflutter

解决方案


You can use Stack Data Structure to calculate your expression. There are several rules that will be used while calculation using stack. Please try to google as it can explain you even batter how to use Stack for mathematical expression evaluation.

Or you can use math_expressions library for the same


推荐阅读