city_picker_from_map 0.0.1 copy "city_picker_from_map: ^0.0.1" to clipboard
city_picker_from_map: ^0.0.1 copied to clipboard

A flutter package for select a city from svg map.

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
copied to clipboard

In your library file add the following import:

import 'package:city_picker_from_map/city_picker_from_map.dart';
copied to clipboard

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,
)
copied to clipboard

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 #

43
likes
120
points
59
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.09 - 2025.03.24

A flutter package for select a city from svg map.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, svg_path_parser

More

Packages that depend on city_picker_from_map