flutter_util_code
A Flutter utility class collection library that includes some commonly used functions and encapsulated system API calls to improve development efficiency.
Language: English | 简体中文
NativeBridge dependency
Add dependencies in pubspec.yaml:
dependencies:
flutter_util_code: ^latest_version
Support Environment
- sdk: ">=2.18.0 <4.0.0"
- flutter: ">=3.3.0"
APIs
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
Utils(Continue to update later...)
x
LogUtils : Logging utility classx
SharedPresUtils : SharedPreferences utility classx
ToastUtils : Toast utility classx
UuidUtils : UUID utility classx
DeviceUtils : Device utility classx
AppUtils : App utility classx
PathUtils : Path utility classx
EncryptUtils : Encryption utility classx
UrlLauncherUtils : URL jump utility classx
NullSafetyUtils : Null safety utility classx
ShareUtils : Share utility classx
ConnectivityUtils : Network monitoring utility classx
PermissionUtils : Permission utility classx
FormatUtils : Num format utility classx
DateUtils : Date format utility class
Libraries
- app_utils
- connectivity_utils
- constants/sp_constants
- date_utils
- device_utils
- encrypt_utils
- format_utils
- log_utils
- null_safety_utils
- path_utils
- permission_utils
- toast_utils
- url_launcher_utils
- utils
- Name: Created by Fitem on 2023/5/31
- uuid_utils