Skip to content

Getter Not Found "PI" #4

@jasonflaherty

Description

@jasonflaherty

Hello, testing this in a flutter app, and getting this error:

Compiler message:
../../.pub-cache/hosted/pub.dartlang.org/units-0.0.7/lib/src/angle.dart:10:42: Error: Getter not found: 'PI'.
    static const double _degree_to_rad = PI / 180.0;
                                         ^^
../../.pub-cache/hosted/pub.dartlang.org/units-0.0.7/lib/src/angle.dart:13:50: Error: Getter not found: 'PI'.
    static const double _rad_to_degree = 180.0 / PI;

Using your example:

var speed = new Speed.fromKilometerPerHour(value: 360.0);
        print('360 km/h are ${speed.inMeterPerSecond} m/s');
        print('360 km/h are ${speed.inMeterPerSecond} mi/h');

Originally, I was testing with Temperature:
var tempC = Temperature.fromFahrenheit(value: 20.00);

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions