utils library

Properties

isInDebugMode bool
read-only

Functions

clearDirectory({Directory directory, bool isDeleteDirectory = false}) → void
清理文件夹
generateRSAKeyPair({int bitLength = 2048}) AsymmetricKeyPair<RSAPublicKey, RSAPrivateKey>
----------------------------------------------RSA公钥私钥----------------------------------------------------
getCacheDirectory({String path = '', Future<Directory> directoryPath}) Future<Directory>
获取缓存文件夹
getDoubleFromStr(dynamic str, {double defDouble = 0}) double
getImagePath(String name, {String format = 'png'}) → dynamic
getIntFromStr(dynamic str, {int defInt = 0}) int
getLength(Object value) int
get length.
getMD5(String input) String
getObject<T>(Object source, T f(Map v)) → T
Converts JSON string or JSON map source to object.
getObjectList<T>(Object source, T f(Map v)) List<T>
Converts JSON string or JSON map list source to object list.
isEmpty(Object object) bool
Returns true String or List or Map is empty.
isEmptyList(List list) bool
Returns true if the list is null or 0-length.
isEmptyMap(Map map) bool
Returns true if there is no key/value pair in the map.
isEmptyString(String str) bool
Returns true if the string is null or 0-length.
isNotEmpty(Object object) bool
Returns true String or List or Map is not empty.
isNumeric(String str) bool
randomStr({int length = 10}) String
rsaPrivateKeyFromPEM(String pemString) RSAPrivateKey
Create an RSAPrivateKey from the given PEM-String.
rsaPrivateKeyFromString(String privateKeyString) RSAPrivateKey
Create an RSAPrivateKey from the given String.
rsaPrivateKeyToFormattedPEM(RSAPrivateKey privateKey) String
Export a RSAPrivateKey as formatted PEM String which can be reversed using RSAPrivateKey.fromPEM.
rsaPrivateKeyToPEM(RSAPrivateKey privateKey) String
Export a RSAPrivateKey as PEM String which can be reversed using RSAPrivateKey.fromPEM.
rsaPrivateKeyToString(RSAPrivateKey privateKey) String
rsaPublicKeyFromPEM(String pemString) RSAPublicKey
rsaPublicKeyFromString(String publicKeyString) RSAPublicKey
Create an RSAPublicKey from the given String.
rsaPublicKeyToFormattedPEM(RSAPublicKey publicKey) String
Export a RSAPublicKey as formatted PEM String which can be reversed using RSAPublicKey.fromPEM.
rsaPublicKeyToPEM(RSAPublicKey publicKey) String
Export a RSAPublicKey as PEM String which can be reversed using RSAPublicKey.fromPEM.
rsaPublicKeyToString(RSAPublicKey _publicKey) String
showSnackBar(BuildContext context, dynamic text) → dynamic
snackBar
twoListIsEqual(List listA, List listB) bool
Returns true Two List Is Equal.