Want to use the PI constant in Dart? you should import ‘dart:math’ as math; instead of just import ‘dart:math’;
Because when you use the as keyword you provide the imported library a name so you can reference it anywhere in your file.
Here is an example:
import "dart:math" show pi;
print(pi / 12);
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.