utils library Null safety

Functions

formatNumber({required String numberToFormat, String customPattern = '##,###,###.##'}) String
formatNumber method this method will format the number in default pattern or custom pattern
@Deprecated('You can use .formatNumber extension method.')
getAppVersion() Future<String>
getAppVersion method this method will return the current version of the app
getCharFromString({required String stringToExtract}) String
getCharFromString method this method will return characters from string passed
getDeviceId() Future<String>
getDeviceId method this method will get device info like model name and device id
getDeviceName() Future<String?>
getDeviceName method this method will get device or model name of the device
getNumbersFromString({String? stringToExtract}) String?
getNumbersFromString method this method will return all the digits from string passed
getRandomMobileNumber() String
getRandomMobileNumber method this method will return randomly generated mobile number
getRandomNumber({required int min, required int max}) String
getRandomNumber method this method will return a random number between min and max number passed
getSingleDigitRandomNumber() String
getSingleDigitRandomNumber method this method will return a single digit random number
isNumeric(String s) bool
isNumeric method this method will check if passed string is numeric or not
@Deprecated('You can use .isNumeric extension.')
replaceNullWithDouble(String? data) double
replaceNullWithDouble method this method will check and replace null with an double value
@Deprecated('You can use .replaceNullWithDouble extension.')
replaceNullWithEmpty(String? data) String
replaceNullWithEmpty method this method will check and replace null with an empty string
@Deprecated('You can use .replaceNullWithEmpty extension.')
replaceNullWithZero(String? data) int
replaceNullWithZero method this method will check and replace null with an integer value
@Deprecated('You can use .replaceNullWithZero extension.')
replaceTrueOrFalse(dynamic data) int
replaceTrueOrFalse method this method will check and replace true/false value with integer value
@Deprecated('You can use .replaceTrueOrFalse extension.')