搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。