搜索插件、代码仓与 APP 分类

mapbox_autocomplete_search_widget 封面
插件详情v0.0.6

mapbox_autocomplete_search_widget

MapboxAutocompleteSearchWidget 是一个 Flutter 包,可让您以自动补全的方式搜索地点名称。

近 30 天下载
15
喜欢数
5
Pub 分数
75

安装插件

flutter pub add mapbox_autocomplete_search_widget

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

MapboxAutocompleteSearchWidget 是一个 Flutter 包,可让用户通过实时自动补全建议搜索地点名称。该组件设计用于无缝集成,利用 Mapbox 的地理编码 API 提供准确且响应迅速的位置输入。适用于需要地址或地点选择的应用程序,它通过减少输入工作量和降低错误率来提升用户体验。该小部件轻量且可自定义,支持 iOS 和 Android 平台。无需复杂设置即可轻松添加位置感知功能。

适合场景

  • 基于位置的应用搜索
  • 表单中的地址输入
  • 旅行和配送应用
  • 地理位置过滤
  • 用户资料位置设置

主要特点

  • 实时自动补全
  • 基于 Mapbox 的地理编码
  • 可自定义的 UI
  • 跨平台支持
  • 与 Flutter 的简单集成

适合对象

  • 开发位置感知应用程序的开发者
  • 需要地址选择器的应用
  • 带有地图交互的移动应用
  • 原型定位功能
  • 使用 Mapbox 服务的项目

使用建议

  • 需要 Mapbox API 密钥
  • 仅限 Mapbox 后端
  • 可能需要样式调整
  • 依赖网络连接
  • 不适用于离线使用

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

mapbox_autocomplete_search_widget

Language: English

mapbox_autocomplete_search_widget

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 value
onPlaceSelected Completion Handler which returns a BuildContext and selected place from picker (BuildContext context, Place place) {}
mapboxApiKey Your Mapbox ApiKey (Auth-Token) ApiKey Value
appBarColor Color of App Bar widget This is a optional parameter
backButtonColor Color of back arrow button This is a optional parameter
infoButtonColor Color of mapbox info button This is a optional parameter
clearButtonColor Color of clear button in Search widget This is a optional parameter
cursorColor Color of cursor in Search widget This is a optional parameter
searchTextColor Color of Text in Search widget This is a optional parameter
searchBackgroundColor Color of Search area background This is a optional parameter

git repo here

Made with ❤ and dedicated with respect to the Saviour Sonu Sood

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目

暂无相关数据。