geo_match_flutter library

geo_match_flutter — A realtime location matching engine for Flutter.

Finds and assigns the nearest available user (agent) to a target, suitable for ride-hailing, delivery, or emergency dispatch apps.

Quick Start

import 'package:geo_match_flutter/geo_match_flutter.dart';

final matcher = GeoMatcher(debugMode: true);
final target = GeoUser(id: 'req_1', latitude: 40.7128, longitude: -74.0060);
final agents = [
  GeoUser(id: 'agent_1', latitude: 40.7138, longitude: -74.0050),
  GeoUser(id: 'agent_2', latitude: 40.7200, longitude: -74.0100),
];

final nearest = matcher.findNearest(target, agents);
print(nearest); // GeoUser(id: agent_1, ...)

Classes

GeoAssigner
Manages assignment of agents to requests.
GeoMatcher
Handles all matching logic for finding nearby available agents.
GeoUser
Represents a user or agent with a geographic location.
GeoUtils
Utility class for geographic calculations.

Exceptions / Errors

GeoException
Base exception for all geo_match_flutter errors.
InvalidCoordinateException
Thrown when an invalid coordinate is provided.
NoAgentsAvailableException
Thrown when no available agents are found.