I imported math.
import 'dart:math';
But how can I call "PI" constant?
This is not working.
math.pi / 12.0
First import 'dart:math'; then use pi/12.0 instead of math. PI/12.0 it should work fine.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With