LokotroPayUtils class
Enhanced utility functions for Lokotro Pay with modern design helpers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
debounce(
VoidCallback callback, {Duration delay = const Duration(milliseconds: 500)}) → void -
formatCardNumber(
String cardNumber) → String - Format card number for display
-
formatCurrency(
double amount, String currencyCode, {String? symbol}) → String - Format currency amount with proper symbol and decimal places
-
formatDuration(
Duration duration) → String - Format duration for display
-
formatPhoneNumber(
String phoneNumber) → String - Format phone number for display
-
generateSecureId(
{int length = 16}) → String - Generate secure random string
-
getCardType(
String cardNumber) → String - Get card type from card number
-
getChannelIcon(
LokotroPayChannel channel) → IconData - Get icon for payment channel
-
getResponsiveFontSize(
BuildContext context, double baseSize) → double - Get responsive font size
-
getResponsivePadding(
BuildContext context) → EdgeInsets - Get responsive padding based on screen size
-
getStatusColor(
LokotroPaymentStatus status) → Color - Get color for payment status
-
hapticFeedback(
{HapticFeedbackType type = HapticFeedbackType.light}) → void - Haptic feedback for user interactions
-
isDarkMode(
BuildContext context) → bool - Check if device is in dark mode
-
isValidCardNumber(
String cardNumber) → bool - Validate card number using Luhn algorithm
-
isValidEmail(
String email) → bool - Validate email address
-
isValidPhoneNumber(
String phoneNumber) → bool - Validate phone number
-
showSnackBar(
BuildContext context, String message, {LokotroPayResultScreen type = LokotroPayResultScreen.infoScreen, Duration duration = const Duration(seconds: 3)}) → void - Show snackbar with Lokotro styling