buildMarkerColorsSection function

Widget buildMarkerColorsSection({
  1. required BuildContext context,
  2. required Color userPlacesColor,
  3. required Color localPlacesColor,
  4. required void onUserColorChanged(
    1. Color
    ),
  5. required void onLocalColorChanged(
    1. Color
    ),
})

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,
        ),
      ),
    ],
  );
}