district_picker_turkey_map

A flutter package for select a province of Turkish cities from svg map. similar to City Picker From Map created by Ahmet ÇELİK

Supported cities -Ankara -Istanbul -Konya

This is a first release. Other cities coming soon.

Getting Started

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

dependencies:
  ...
  district_picker_turkey_map: any

In your library file add the following import:

import 'package:district_picker_turkey_map/district_picker_turkey_map.dart';

Usage

DistrictPickerMap(
	width: double.infinity,
	height: double.infinity,
	map: Maps.ANKARA,
	onChanged: (district) {
	  setState(() {
		selectedDistrict = district;
	  });
	},
	actAsToggle: true,
	dotColor: Colors.white,
	selectedColor: Colors.lightBlueAccent,
	strokeColor: Colors.white24,
)

Props

propstypesdescription
keyKey?
mapStringName of the map you want to show. Use as Maps.<MAP_NAME> All maps are in the maps.dart
widthdouble?Map width. Default value is double.infinity
heightdouble?Map height. Default value is double.infinity
dotColorColor?Color of the dot in the center of the district
strokeColorColor?Color of the district borders
selectedColorColor?Color of the selected district
actAsToggleboolean?District selecting act as like toggle button
onChangedFunction(District? district)Returns new district value when it changed

Contributors

Much thanks to Ahmet ÇELİK

Author

Libraries

district_picker_turkey_map