buildMarkerColorsSection function
- required BuildContext context,
- required Color userPlacesColor,
- required Color localPlacesColor,
- required void onUserColorChanged(),
- required void onLocalColorChanged(),
Builds the marker colors section.
Implementation
Widget buildMarkerColorsSection({
required BuildContext context,
required Color userPlacesColor,
required Color localPlacesColor,
required void Function(Color) onUserColorChanged,
required void Function(Color) onLocalColorChanged,
}) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Marker Colors',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.grey,
),
),
const SizedBox(height: 12),
ColorPickerTile(
label: 'My Places',
subtitle: 'Your saved locations',
color: userPlacesColor,
onTap: () => showColorPickerDialog(
context: context,
title: 'My Places Color',
currentColor: userPlacesColor,
onColorChanged: onUserColorChanged,
),
),
const SizedBox(height: 12),
ColorPickerTile(
label: 'Example Places',
subtitle: 'Canned example locations',
color: localPlacesColor,
onTap: () => showColorPickerDialog(
context: context,
title: 'Example Places Color',
currentColor: localPlacesColor,
onColorChanged: onLocalColorChanged,
),
),
],
);
}