markerInfo method

dynamic markerInfo(
  1. UFULocationPickerController controller
)

Implementation

markerInfo(UFULocationPickerController controller) => Container(
  constraints: const BoxConstraints(maxWidth: 300),
  padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  decoration: BoxDecoration(
    color: Colors.white,
    borderRadius: BorderRadius.circular(8),
  ),
  child: Row(
    crossAxisAlignment: CrossAxisAlignment.center,
    mainAxisSize: MainAxisSize.min,
    children: [
      Image.asset(
        "assets/images/ic_location_pin.png",
        height: 24,
        width: 24,
        color: AppTheme.themeColors.primary,
      ),
      const SizedBox(width: 12),
      Expanded(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisSize: MainAxisSize.min,
          children: [
            if(controller.selectedAddress.value?.addressComponents.firstOrNull?.longName?.isNotEmpty ?? false) ...[
              UFUText(
                text: controller.selectedAddress.value?.addressComponents.firstOrNull?.longName ?? "",
                textAlign: TextAlign.start,
              ),
              const SizedBox(height: 4),
            ],

            UFUText(
              text: controller.selectedAddress.value?.formattedAddress ?? "",
              textColor: AppTheme.themeColors.secondaryText,
              maxLine: 4,
              textAlign: TextAlign.start,
            ),
          ],
        ),
      ),
    ],
  ),
);