tabSwitch method
Implementation
Widget tabSwitch(String title, String img) {
return Expanded(
child: InkWell(
onTap: () {
controller.subscriptionType.value = title;
controller.clearLoginFields();
},
child: Container(
decoration: BoxDecoration(
color: controller.subscriptionType.value == title
? ColorHelper.neutralDark
: ColorHelper.grey00,
borderRadius: BorderRadius.circular(10),
),
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 12),
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
Image.asset('assets/auth/$img.png',
width: 15.dp,
color: controller.subscriptionType.value == title
? Colors.white
: ColorHelper.neutralLightText),
3.dp.SpaceY,
Flexible(
child: Text(
title,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: controller.subscriptionType.value == title
? Colors.white
: ColorHelper.neutralLightText),
),
),
]),
),
),
);
}