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

A Flutter package that provides an interactive map widget for creating and editing geofences, perfect for defining delivery zones, service areas, or any other geofenced regions.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'screens/default_example.dart';
import 'screens/custom_controls_example.dart';
import 'screens/controller_example.dart';
import 'config.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  
  // Initialize config
  final config = await Config.getInstance();
  
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Building Geofence Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Building Geofence Demo'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => const DefaultExample(),
                  ),
                );
              },
              child: const Text('Default Controls Example'),
            ),
            const SizedBox(height: 20),
            ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => const CustomControlsExample(),
                  ),
                );
              },
              child: const Text('Custom Controls Example'),
            ),
            const SizedBox(height: 20),
            ElevatedButton(
              onPressed: () {
                Navigator.push(
                  context,
                  MaterialPageRoute(
                    builder: (context) => const ControllerExample(),
                  ),
                );
              },
              child: const Text('Controller API Example'),
            ),
          ],
        ),
      ),
    );
  }
}
0
likes
130
points
33
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides an interactive map widget for creating and editing geofences, perfect for defining delivery zones, service areas, or any other geofenced regions.

Repository (GitHub)
View/report issues

Topics

#maps #geofence #location #google-maps

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

collection, flutter, google_maps_flutter, google_maps_flutter_web, vector_math

More

Packages that depend on google_geofence_helper