mapbox_autocomplete_search_widget 0.0.1 copy "mapbox_autocomplete_search_widget: ^0.0.1" to clipboard
mapbox_autocomplete_search_widget: ^0.0.1 copied to clipboard

outdated

MapboxAutocompleteSearchWidget is a flutter package that allows you to search for place name in a autocomplete fashion.

mapbox_autocomplete_search_widget #

Language: English

MapboxAutocompleteSearchWidget is a flutter package that allows you to search for place name in a autocomplete fashion.

Technical Notes: The search is carried out only when search text length is greater than 2 and also a delay of 1 second is added before placing a server call. (Since user types continuously, unnessarry calls will be made to server. So we make the call with 1 second delay after user has stopped typing.)

The package uses Riverpod for state management. So Please ensure you import flutter_riverpod and wrap the app with ProviderScope.

import 'package:flutter_riverpod/flutter_riverpod.dart';

  runApp(
    ProviderScope(
      child: MyApp(),
    ),
  );

To use this Package, Please get the Access-Token from here https://docs.mapbox.com/help/glossary/access-token/

The Package has necessarry attributions to Mapbox and can doesnot violate mapbox Terms and Conditions.

How to use it. #

the usage is very simple, just use the following

  runApp(
    ProviderScope(
      child: MyApp(),
    ),
  );
  MapboxAutocompleteSearchWidget(
      onPlaceSelected: (BuildContext context, Place place) {
        
      },
      mapboxApiKey: 'mapboxApiKey',
    ),

parameters #

parameter description default

| mapboxApiKey | Mapbox auth-token has to be passed here | This is a required parameter | | onPlaceSelected | Function that returns a context and selected Place value from picker | This is a required parameter |

more detail

5
likes
0
pub points
0%
popularity

Publisher

verified publishercodeokplease.com

MapboxAutocompleteSearchWidget is a flutter package that allows you to search for place name in a autocomplete fashion.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter, flutter_riverpod, url_launcher

More

Packages that depend on mapbox_autocomplete_search_widget