Skip to content

Instantly share code, notes, and snippets.

@OmarYehiaDev
Last active October 5, 2022 21:49
Show Gist options
  • Save OmarYehiaDev/bc3d6a06ece6cbd10ec26481612de112 to your computer and use it in GitHub Desktop.
Save OmarYehiaDev/bc3d6a06ece6cbd10ec26481612de112 to your computer and use it in GitHub Desktop.
Made a duplicate UI for Radio button
const double outerSize = 20;
const double innerSize = outerSize - 10;
Obx(
() => Stack(
children: [
Icon(
Icons.circle_outlined,
color: AppColors.primary,
size: outerSize,
),
if (controller.selected.value!.id == address.id)
Positioned.directional(
textDirection: Get.locale!.languageCode.toLowerCase() == "en"
? TextDirection.ltr
: TextDirection.rtl,
top: (outerSize - innerSize) / 2,
start: (outerSize - innerSize) / 2,
child: Icon(
Icons.circle,
color: AppColors.primary,
size: innerSize,
),
),
],
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment