buildVerifyProfile method
Implementation
Widget buildVerifyProfile(AppDrawerController drawerController, BuildContext context) {
List<Widget> widgets = [];
if(drawerController.appProfile.value != null && drawerController.appProfile.value?.verificationLevel != VerificationLevel.none) {
widgets.add(customText(CoreUtilities.getProfileMainFeature(drawerController.appProfile.value!).tr.capitalize,
style: AppTheme.primarySubtitleText.copyWith(
color: Colors.white70, fontSize: 15),
context: context));
widgets.add(AppTheme.widthSpace5);
widgets.add(AppFlavour.getVerificationIcon(drawerController.appProfile.value!.verificationLevel));
} else if(drawerController.user?.subscriptionId.isEmpty ?? true) {
if(drawerController.appProfile.value?.type == ProfileType.general) {
widgets.add(TextButton(
onPressed: () => AppAlerts.getSubscriptionAlert(drawerController.subscriptionServiceImpl, context, AppRouteConstants.home),
style: TextButton.styleFrom(
padding: EdgeInsets.zero, // Remove padding here
textStyle: const TextStyle(decoration: TextDecoration.underline), // Keep your underline style
),
child: Text(CommonTranslationConstants.acquireSubscription.tr,),
));
} else if(drawerController.appProfile.value != null) {
widgets.add(customText(CoreUtilities.getProfileMainFeature(drawerController.appProfile.value!).tr.capitalize,
style: AppTheme.primarySubtitleText.copyWith(
color: Colors.white70, fontSize: 15),
context: context));
widgets.add(AppTheme.widthSpace5);
widgets.add(const Icon(Icons.verified_outlined, color: Colors.white70));
widgets.add(TextButton(
onPressed: () => AppAlerts.getSubscriptionAlert(drawerController.subscriptionServiceImpl!, context, AppRouteConstants.home),
child: Text(CommonTranslationConstants.verifyProfile.tr,
style: const TextStyle(decoration: TextDecoration.underline),
)
));
}
} else {
if(drawerController.user?.subscriptionId == SubscriptionLevel.basic.name) {
widgets.add(Text(CommonTranslationConstants.enjoyTheApp.tr,));
} else {
widgets.add(Text(CommonTranslationConstants.activeSubscription.tr,));
}
}
return Row(children: widgets);
}