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
All 81 Turkish cities are supported.
Getting Started
In the pubspec.yaml
of your Flutter project, add the following dependency:
dependencies:
...
district_picker_turkey_map: ^0.1.0
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
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 district |
strokeColor | Color? |
Color of the district borders |
selectedColor | Color? |
Color of the selected district |
actAsToggle | boolean? |
District selecting act as like toggle button |
onChanged | Function(District? district) |
Returns new district value when it changed |
Contributors
Much thanks to Ahmet ÇELİK