zeba_academy_offline_map 1.0.0 copy "zeba_academy_offline_map: ^1.0.0" to clipboard
zeba_academy_offline_map: ^1.0.0 copied to clipboard

Offline map, routing, and geofencing toolkit for Flutter

zeba_academy_offline_map #

šŸš€ Offline map, routing, and geofencing toolkit for Flutter

A lightweight, easy-to-use Flutter package for offline maps, custom markers, polylines, offline routing, and geofencing. Built for developers who want a fast, no-bloat solution for map-based apps.


✨ Features #

  • Offline Map Rendering – Display maps using OpenStreetMap tiles.
  • Custom Markers – Add personalized marker widgets anywhere on the map.
  • Polylines – Draw routes, paths, or any polyline on the map.
  • Offline Routing – Calculate distances and generate straight-line routes.
  • Geo-Fencing – Define areas and trigger actions on entry/exit events.
  • Zero Bloat – Minimal dependencies, fully production-ready.

šŸ›  Installation #

Add this to your pubspec.yaml:

dependencies:
  zeba_academy_offline_map:
    path: ../zeba_academy_offline_map # replace with your local path or git repo

Then run:

flutter pub get

⚔ Usage Example #

import 'package:flutter/material.dart';
import 'package:zeba_academy_offline_map/zeba_academy_offline_map.dart';

class MapScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: OfflineMap(
        initialPosition: LatLng(13.0827, 80.2707), // Chennai, India
        zoom: 13.0,
        markers: [
          MapMarker(
            position: LatLng(13.0827, 80.2707),
            icon: Icon(Icons.location_pin, color: Colors.red, size: 40),
          ),
        ],
        polylines: [
          MapPolyline(
            points: [LatLng(13.0827, 80.2707), LatLng(13.085, 80.275)],
            color: Colors.blue,
            strokeWidth: 3,
          ),
        ],
      ),
    );
  }
}

šŸ—ŗ Offline Routing & Distance #

final routing = OfflineRouting();
double distance = routing.calculateDistance(
  LatLng(13.0827, 80.2707),
  LatLng(13.085, 80.275),
);
List<LatLng> route = routing.generateRoute(
  LatLng(13.0827, 80.2707),
  LatLng(13.085, 80.275),
);

šŸ›” Geo-Fencing #

final fence = GeoFence(
  center: LatLng(13.0827, 80.2707),
  radius: 50, // in meters
  onEnter: () => print("Entered the zone"),
  onExit: () => print("Exited the zone"),
);

fence.check(LatLng(13.083, 80.271)); // returns true/false

šŸ“Œ About Me #

✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me and my work at sufyanism.com or connect with me on Linkedin

Your all-in-one no-bloat hub! #

šŸš€ Explore cutting-edge resources in coding, tech, and development at zeba.academy and code.zeba.academy. Empower yourself with practical skills through curated directives, real-world projects, and hands-on experience. Level up your tech game today! šŸ’»āœØ

Zeba Academy is a learning platform dedicated to coding, technology, and development.

āž” Visit our main site: zeba.academy
āž” Explore hands-on courses and resources at: code.zeba.academy
āž” Check out our YouTube for more tutorials: zeba.academy
āž” Follow us on Instagram: zeba.academy

Thank you for visiting!

0
likes
120
points
114
downloads

Documentation

API reference

Publisher

verified publisherzeba.academy

Weekly Downloads

Offline map, routing, and geofencing toolkit for Flutter

Homepage

License

GPL-3.0 (license)

Dependencies

flutter, flutter_cache_manager, flutter_map, latlong2

More

Packages that depend on zeba_academy_offline_map