A Flutter utility class collection library that includes some commonly used functions and encapsulated system API calls to improve development efficiency.
Language: English | 简体中文
Add dependencies in pubspec.yaml:
dependencies:flutter_util_code: ^latest_version- sdk: ">=2.18.0 <4.0.0"
- flutter: ">=3.3.0"
isOpenLog println logger - About SharedPreference -> SharedPresUtils -> Demo
putString putInt putBool putDouble putStringList getString getInt getDouble getBool getStringList - About Toast -> ToastUtils -> Demo
init showCenter show showToast getUuid getUuidV1 getUuidV4 getUuidV5 - About Device -> DeviceUtils -> Demo
getDeviceId getModel getSystemVersion getSystemName getBrand getAppName getPackageName getVersionName getVersionNumber getBuildSignature getInstallerStore getAppCachePath getAppSupportPath getAppDocPath getDownloadPath getAndroidStoragePath getAndroidExternalCachePaths getAppExternalStoragePaths getAndroidPicturePaths getAndroidMoviePaths getAndroidMusicPaths getAndroidDCIMPaths getAndroidDownloadPaths getAndroidDocumentPaths - About Encrypt -> EncryptUtils -> Test
md5Encrypt rc4Encrypt rc4Decrypt aesEncrypt aesDecrypt rsaEncrypt rsaDecrypt sha256withRSASign sha256withRSAVerify md5withRSASign md5withRSAVerify - About URL Launcher -> UrlLauncherUtils -> Demo
launchInBrowser launchInNonBrowser launchInApp onCloseInAppWebView onCall sendSMS sendEmail openFile onCanLaunchUrl - About Null Safe -> NullSafetyUtils -> Test
String
toNonNull isNullOrEmpty isNotNullOrEmpty toNonNullString int
toNonNull isNull isNotNull toNonNullInt double
toNonNull isNull isNotNull toNonNullDouble bool
toNonNull isNull isNotNull toNonNullBool List
toNonNull isNullOrEmpty isNotNullOrEmpty toNonNullList - About Share -> ShareUtils -> Demo
shareText shareImage shareImages shareFile shareFiles - About Network -> NetworkUtils -> Demo
getInstance checkConnectivity listen off dispose - About Permission -> PermissionUtils -> Demo
getPermissionStatus requestPermission requestPermissions - About Format -> FormatUtils -> Test
formatMoney
formatPoint
formatPointMax
formatInt
formatPercent
formatPermillage
- LogUtils : Logging utility class
- SharedPresUtils : SharedPreferences utility class
- ToastUtils : Toast utility class
- UuidUtils : UUID utility class
- DeviceUtils : Device utility class
- AppUtils : App utility class
- PathUtils : Path utility class
- EncryptUtils : Encryption utility class
- UrlLauncherUtils : URL jump utility class
- NullSafetyUtils : Null safety utility class
- ShareUtils : Share utility class
- ConnectivityUtils : Network monitoring utility class
- PermissionUtils : Permission utility class
- FormatUtils : Num format utility class
- DateUtils : Date format utility class
- LocationUtils:Location utility class