polygon_checker 1.0.0
polygon_checker: ^1.0.0 copied to clipboard
A lightweight Dart utility to check whether a point lies inside polygon locations.
example/main.dart
import 'package:polygon_checker/polygon_checker.dart';
void main() {
final offices = [
PolygonLocation(
locationId: '1',
locationName: 'Office A',
points: [
PolygonPoint(lat: 28.61, lng: 77.20),
PolygonPoint(lat: 28.62, lng: 77.20),
PolygonPoint(lat: 28.62, lng: 77.21),
PolygonPoint(lat: 28.61, lng: 77.21),
],
),
];
final isInside = PolygonChecker.isInsideAnyOfficePolygon(
28.615,
77.205,
offices,
);
print(isInside); // true / false
}