ui_components/src/helpers
library
Functions
-
alignLabelWithHint(int? maxLines)
→ bool
-
-
getCountry(Country country)
→ Map<String, String>?
-
Retrieves a mapping of country-specific information based on the provided Country enum value.
-
popValue(String name)
→ Country
-
Returns the corresponding Country enum value based on the provided country name.
If the provided name does not match any known country, the default Country value (United States) is returned.
-
selectCountryModalBottomSheet(BuildContext context)
→ dynamic
-
Displays a modal bottom sheet containing a list of supported countries for selection.
-
showResendBottomSheet({required BuildContext context, required String phoneNo, required Widget loader, required Function? resetTimer, required Function generateOtpFunc, required dynamic appWrapperContext, required dynamic client, required Function retrySendOtpEndpoint, Client? httpClient})
→ Future<String>
-
Displays a modal bottom sheet allowing users to resend an OTP code.
-
useEndpointResend({required BuildContext context, required dynamic appWrapperContext, required String phoneNumber, required int step, required Function retrySendOtpEndpoint, required Function toggleResend, required Function showErr, required Function resetTimer, required OnOTPReceivedNavigateCallback onOTPCallback, Client? httpClient})
→ Future<void>
-
useEndpointResend send a resend otp request via REST endpoint. This function should only be used in the context
of SILResendPhoneCode widget. It's extracted here for testability
-
useGraphResend({required BuildContext context, required dynamic appWrapperContext, required String phoneNumber, required int step, required Function toggleResend, required Function showErr, required Function resetTimer, required Function generateOtpFunc, required dynamic client, required OnOTPReceivedNavigateCallback onOTPCallback})
→ Future<void>
-
Resends an OTP code using a GraphQL API and handles relevant callbacks.