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

GitHub 代码仓ahm3tcelik/city_picker_from_map

城市选择器(来自地图)

一个用于从 SVG 地图中选择城市的 Flutter 包。

城市选择器(来自地图) 项目封面
星标
53
复刻
24
最近推送(UTC)
2021年3月23日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

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

Ahmet ÇELİK GitHub avatar
GitHub 作者

Ahmet ÇELİK ↗

Full Stack Developer

Roofstacks - RoofMoneyTurkey
语言DartCMakeSwiftC++Kotlin

分类

此仓库发布的插件

使用的依赖

依赖清单 3 项

  • flutter{"sdk":"flutter"}
  • svg_path_parser^1.0.0
  • flutter_test开发依赖{"sdk":"flutter"}

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗