flutter evaluate if var is integer or string

Posted by Jennifer | Updated on

Flutter evaluate if var is integer or string. You can use the keyword is or switch over runtimeType:

Consider using is instead of directly using runtimeType. As is works with subclasses. While using runtimeType is a strict comparison.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers