geo_fencing_platform_interface 1.0.1
geo_fencing_platform_interface: ^1.0.1 copied to clipboard
A platform interface for geo-fencing plugin.
geo_fencing_platform_interface #
A platform interface for the geo-fencing Flutter plugin. This package provides the abstract interface that platform-specific implementations must implement.
Overview #
This package defines the contract for geo-fencing functionality across different platforms (Android, iOS, etc.). It provides:
- Abstract base classes for geo-fencing operations
- Data models for geo-fence regions and events
- Platform interface verification and error handling
Features #
- Platform-agnostic geo-fencing interface
- Type-safe data models
- Proper error handling for unimplemented methods
- Support for multiple geo-fence regions
- Real-time event streaming
Usage #
This package is primarily used by platform-specific implementations and the main geo-fencing plugin. For end users, see the main flutter_geofence_manager package.
API Reference #
GeoFencingPlatform #
The main abstract class that defines the geo-fencing interface:
initialize()- Initialize the geo-fencing systemregisterGeoFences(List<GeoFenceRegion> regions)- Register geo-fence regionsremoveGeofence(String id)- Remove a specific geo-fenceonEvent()- Stream of geo-fence events
Data Models #
GeoFenceRegion- Represents a geo-fence region with coordinates and radiusGeoFenceEvent- Represents a geo-fence entry/exit eventTransitionType- Enum for enter/exit transitions
Platform Implementation #
To implement this interface for a new platform:
- Extend
GeoFencingPlatform - Implement all abstract methods
- Register your implementation with the platform interface
License #
This project is licensed under the MIT License - see the LICENSE file for details.