Skip to content

Getter not found: 'PI' #1

@indrawow

Description

@indrawow

Get error message when debug :

Compiler message:
file:///C:/Users/Indra%20Wijaya/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/great_circle_distance-1.0.1/lib/src/great_circle_distance_base.dart:61:68: Error: Getter not found: 'PI'.
    double _radiansFromDegrees(final double degrees) => degrees * (PI / 180.0);
                                                                   ^^
file:///C:/Users/Indra%20Wijaya/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/great_circle_distance-1.0.1/lib/src/great_circle_distance_base.dart:61:68: Error: The getter 'PI' isn't defined for the class 'GreatCircleDistance'.
 - 'GreatCircleDistance' is from 'package:great_circle_distance/src/great_circle_distance_base.dart' ('file:///C:/Users/Indra%20Wijaya/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/great_circle_distance-1.0.1/lib/src/great_circle_distance_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'PI'.
    double _radiansFromDegrees(final double degrees) => degrees * (PI / 180.0);
                                                                   ^^
file:///C:/Users/Indra%20Wijaya/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/great_circle_distance-1.0.1/lib/src/formula/spherical_lawofcosines.dart:10:49: Error: Getter not found: 'PI'.
        if (distance < 0) distance = distance + PI;
                                                ^^
Compiler failed on C:\flutter_project\project_maps\view_clacla\lib\main.dart

FAILURE: Build failed with an exception.

* Where:
Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 782

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebugArm64'.
> Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 9s
Gradle task assembleDebug failed with exit code 1

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