flutter_location_search 1.1.4 copy "flutter_location_search: ^1.1.4" to clipboard
flutter_location_search: ^1.1.4 copied to clipboard

Package that provides Place search with history of latest location searched using Open Street Map. It is easy to custom and can be displayed in fullscreen or overlay mode

example/lib/main.dart

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

void main() => runApp(const MyApp());

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _locationText = 'Tap here to search a place';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Location Picker',
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: Builder(builder: (context) {
            return TextButton(
              child: Text(_locationText),
              onPressed: () async {
                LocationData? locationData = await LocationSearch.show(
                    context: context, lightAdress: true, mode: Mode.fullscreen);

                setState(() {
                  _locationText = locationData!.address;
                });
              },
            );
          }),
        ),
      ),
    );
  }
}
8
likes
150
pub points
80%
popularity

Publisher

unverified uploader

Package that provides Place search with history of latest location searched using Open Street Map. It is easy to custom and can be displayed in fullscreen or overlay mode

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, geolocator, http, intl, json_annotation, logger, shared_preferences

More

Packages that depend on flutter_location_search