搜尋套件、儲存庫與 APP 分類

city_picker_from_map 封面
套件詳情v0.0.1

city_picker_from_map

一個用於從 SVG 地圖中選擇城市的 Flutter 套件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
51
喜歡數
43
Pub 分數
120

安裝套件

flutter pub add city_picker_from_map

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,讓使用者能從 SVG 地圖中選擇城市,提供一種互動式且視覺化的地點選取方式。此套件專為需要地理輸入的應用程式(例如地址表單或旅遊應用)設計。支援 Android、iOS、Web、macOS、Windows 及 Linux 多個平台,確保廣泛的相容性。它利用 SVG 地圖實現可縮放的高品質渲染,並允許開發者自訂選擇體驗。非常適合以最少設定將直覺的位置選取功能整合至應用程式中。

適用情境

  • 旅行應用中的互動式城市選擇
  • 表單中的地理定位輸入
  • 基於地圖的地址選擇器
  • 用戶位置偏好設定
  • 可自定地圖介面

主要特色

  • SVG 地圖整合
  • 跨平台支援
  • 互動式城市選擇
  • 可縮放向量圖形
  • 可自訂的 UI
  • 透過 pub add 輕鬆整合

適合對象

  • 開發位置感知應用的開發者
  • 需要視覺地圖互動的應用
  • 需要城市級地理定位的專案
  • 希望使用互動式地圖的設計人員
  • 行動與Web應用程式

使用建議

  • 需要 SVG 地圖檔案
  • 限於預定義城市
  • 可能需要地圖資料更新
  • 依賴外部 SVG 資產
  • 大型地圖的效能
  • 不適用於即時GPS追蹤

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

City Picker From Map

A flutter package for select a city from svg map.

Supported countries (+150) are here.

Screenshots

Getting Started

In the pubspec.yaml of your Flutter project, add the following dependency:

dependencies:
  ...
  city_picker_from_map: any

In your library file add the following import:

import 'package:city_picker_from_map/city_picker_from_map.dart';

Usage

CityPickerMap(
	width: double.infinity,
	height: double.infinity,
	map: Maps.TURKEY,
	onChanged: (city) {
	  setState(() {
		selectedCity = city;
	  });
	},
	actAsToggle: true,
	dotColor: Colors.white,
	selectedColor: Colors.lightBlueAccent,
	strokeColor: Colors.white24,
)

Props

props types description
key Key?
map String Name of the map you want to show. Use as Maps.<MAP_NAME> All maps are in the maps.dart
width double? Map width. Default value is double.infinity
height double? Map height. Default value is double.infinity
dotColor Color? Color of the dot in the center of the city
strokeColor Color? Color of the city borders
selectedColor Color? Color of the selected city
actAsToggle boolean? City selecting act as like toggle button
onChanged Function(City? city) Returns new city value when it changed

Author

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。