v0.0.1city_picker_from_map
一个用于从 SVG 地图中选择城市的 Flutter 包。
43喜欢 46近 30 天下载120Pub 分数
AndroidiOSWebmacOSWindowsLinux
一个用于从 SVG 地图中选择城市的 Flutter 包。
{"sdk":"flutter"}^1.0.0{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
A flutter package for select a city from svg map.
https://github.com/ahm3tcelik/city_picker_from_map/blob/master/showcase/selecting_city.gif
Supported countries (+150) are here.
https://github.com/ahm3tcelik/city_picker_from_map/blob/master/showcase/responsive.gif
https://github.com/ahm3tcelik/city_picker_from_map/blob/master/showcase/ss3.jpg https://github.com/ahm3tcelik/city_picker_from_map/blob/master/showcase/ss4.png
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';
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 | 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 |