utils/export library

Classes

AdaptUtil
Bindings
Bindings should be extended or implemented. When using GetMaterialApp, all GetPages and navigation methods (like Get.to()) have a binding property that takes an instance of Bindings to manage the dependencies() (via Get.put()) for the Route you are opening.
BindingsBuilder<T>
Simplifies Bindings generation from a single callback. To avoid the creation of a custom Binding instance per route.
Config
CustomTransition
DeviceInfoUtil
DisposableInterface
EasyLogController
EasyLogPage
FastList<T>
FormData
FullLifeCycleController
GetBar
GetBuilder<T extends GetxController>
GetBuilderState<T extends GetxController>
GetConnect
GetConnectInterface
GetCupertinoApp
GetDelegate
GetHttpClient
GetInformationParser
GetInstance
GetInterface
GetInterface allows any auxiliary package to be merged into the "Get" class through extensions
GetLifeCycle
GetMaterialApp
GetMaterialController
GetMicrotask
GetMiddleware
The Page Middlewares. The Functions will be called in this order (( redirect -> onPageCalled -> onBindingsStart -> onPageBuildStart -> onPageBuilt -> onPageDispose ))
GetModalBottomSheetRoute<T>
GetNavConfig
This config enables us to navigate directly to a sub-url
GetNavigator
GetNotifier<T>
GetObserver
GetPage<T>
GetPageRoute<T>
GetPlatform
GetQueue
GetResponsiveView<T>
Extend this widget to build responsive view. this widget contains the screen property that have all information about the screen size and type. You have two options to build it. 1- with builder method you return the widget to build. 2- with methods desktop, tablet,phone, watch. the specific method will be built when the screen type matches the method when the screen is ScreenType.Tablet the tablet method will be exuded and so on. Note if you use this method please set the property alwaysUseBuilder to false With settings property you can set the width limit for the screen types.
GetResponsiveWidget<T extends GetLifeCycleBase?>
GetRouterOutlet
GetSnackBar
GetSnackBarState
GetSocket
GetStream<T>
GetStream is the lightest and most performative way of working with events at Dart. You sintaxe is like StreamController, but it works with simple callbacks. In this way, every event calls only one function. There is no buffering, to very low memory consumption. event add will add a object to stream. addError will add a error to stream. listen is a very light StreamSubscription interface. Is possible take the last value with value property.
GetStreamTransformation<T>
GetUtils
GetView<T>
GetView is a great way of quickly access your Controller without having to call Get.find
GetWidget<S extends GetLifeCycleBase?>
GetWidget is a great way of quickly access your individual Controller without having to call Get.find
GetX<T extends DisposableInterface>
GetxController
GetxService
Unlike GetxController, which serves to control events on each of its pages, GetxService is not automatically disposed (nor can be removed with Get.delete()). It is ideal for situations where, once started, that service will remain in memory, such as Auth control for example. Only way to remove it is Get.reset().
GetXState<T extends DisposableInterface>
GraphQLResponse<T>
HeaderValue
InstanceInfo
InternalFinalCallback<T>
Special callable class to keep the contract of a regular method, and avoid overrides if you extend the class that uses it, as Dart has no final methods. Used in DisposableInterface to avoid the danger of overriding onStart.
IntlUtil
LightSubscription<T>
LogFile
LogFileClearMode
LoggerLevel
MiddlewareRunner
MiniStream<T>
MiniSubscription<T>
MixinBuilder<T extends GetxController>
MultipartFile
NetworkUtil
Node<T>
Obx
The simplest reactive widget in GetX.
ObxState
ObxValue<T extends RxInterface>
Similar to Obx, but manages a local state. Pass the initial data in constructor. Useful for simple local states, like toggles, visibility, themes, button states, etc. Sample: ObxValue((data) => Switch( value: data.value, onChanged: (flag) => data.value = flag, ), false.obs, ),
ObxWidget
The ObxWidget is the base for all GetX reactive widgets
PackageInfoUtil
PageRedirect
PathDecoded
Response<T>
ResponsiveScreen
ResponsiveScreenSettings
Result
A Result.
RouterOutlet<TDelegate extends RouterDelegate<T>, T extends Object>
RouterOutletState<TDelegate extends RouterDelegate<T>, T extends Object>
Routing
Rx<T>
Foundation class used for custom Types outside the common native Dart types. For example, any custom "Model" class, like User().obs will use Rx as wrapper.
RxBool
RxController
RxDouble
RxInt
RxInterface<T>
This class is the foundation for all reactive (Rx) classes that makes Get so powerful. This interface is the contract that _RxImpl]
RxList<E>
Create a list similar to List<T>
RxMap<K, V>
Rxn<T>
RxnBool
RxnDouble
RxnInt
RxnNum
RxNotifier<T>
RxnString
Rx class for String Type.
RxNum
RxSet<E>
RxStatus
RxString
Rx class for String Type.
Session
SharedPreferencesUtil
SimpleBuilder
SimpleBuilderState
SnackbarController
StorageUtil
SuperController<T>
TimerUtil
Translations
TrustedCertificate
Value<T>
ValueBuilder<T>
Manages a local state like ObxValue, but uses a callback instead of a Rx value.
ValueBuilderState<T>
Worker
Workers

Enums

BaseURLType
URL环境
PopMode
Enables the user to customize the intended pop behavior
PreventDuplicateHandlingMode
Enables the user to customize the behavior when pushing multiple routes that shouldn't be duplicates
RowStyle
ScreenType
SmartManagement
GetX by default disposes unused controllers from memory, Through different behaviors. SmartManagement.full SmartManagement.full is the default one. Dispose classes that are not being used and were not set to be permanent. In the majority of the cases you will want to keep this config untouched. If you new to GetX then don't change this. SmartManagement.onlyBuilder only controllers started in init: or loaded into a Binding with Get.lazyPut() will be disposed. If you use Get.put() or Get.putAsync() or any other approach, SmartManagement will not have permissions to exclude this dependency. With the default behavior, even widgets instantiated with "Get.put" will be removed, unlike SmartManagement.onlyBuilders. SmartManagement.keepFactoryJust like SmartManagement.full, it will remove it's dependencies when it's not being used anymore. However, it will keep their factory, which means it will recreate the dependency if you need that instance again.
SnackbarStatus
Indicates Status of snackbar SnackbarStatus.OPEN Snack is fully open, SnackbarStatus.CLOSED Snackbar has closed, SnackbarStatus.OPENING Starts with the opening animation and ends with the full snackbar display, SnackbarStatus.CLOSING Starts with the closing animation and ends with the full snackbar dispose
SnackPosition
Indicates if snack is going to start at the TOP or at the BOTTOM
SnackStyle
Indicates if snack will be attached to the edge of the screen or not
Transition

Mixins

FullLifeCycleMixin
GetLifeCycleBase
The GetLifeCycle
GetResponsiveMixin
GetSingleTickerProviderStateMixin
Used like SingleTickerProviderMixin but only with Get Controllers. Simplifies AnimationController creation inside GetxController.
GetStateUpdaterMixin<T extends StatefulWidget>
Complies with GetStateUpdater
GetTickerProviderStateMixin
Used like TickerProviderMixin but only with Get Controllers. Simplifies multiple AnimationController creation inside GetxController.
GetxServiceMixin
Allow track difference between GetxServices and GetxControllers
NotifyManager<T>
PageRouteReportMixin<T>
RxObjectMixin<T>
global object that registers against GetX and Obx, and allows the reactivity of those Widgets and Rx values.
ScrollMixin
SingleGetTickerProviderMixin
Used like SingleTickerProviderMixin but only with Get Controllers. Simplifies AnimationController creation inside GetxController.
StateMixin<T>

Constants

appChannel → const String
flutter run --dart-define=app-channel=official 多渠道打包 Android Studio可以配置运行Flutter参数 --dart-define=app-channel=official
colorWithHex2 → const Color
colorWithHex3 → const Color
colorWithHex4 → const Color
colorWithHex5 → const Color
colorWithHex6 → const Color
colorWithHex7 → const Color
colorWithHex8 → const Color
colorWithHex9 → const Color
colorWithHexA → const Color
colorWithHexB → const Color
colorWithHexC → const Color
colorWithHexD → const Color
colorWithHexE → const Color
isProduction → const bool
kPathIcons → const String
kPathOthers → const String
rtlLanguages → const List<String>

Properties

appBuildNumber String
The app build number. CFBundleVersion on iOS, versionCode on Android.
final
appDeviceLocale Locale?
ui.window.locale
final
appLocale Locale?
The app Current locale
no setter
appName String
The app name. CFBundleDisplayName on iOS, application/label on Android.
final
appPackageName String
The app package name. bundleIdentifier on iOS, getPackageName on Android.
final
appVersion String
The app package version. CFBundleShortVersionString on iOS, versionName on Android.
final
baseDefaultDismissLoadingHandler VoidCallback?
getter/setter pair
baseDefaultShowLoadingHandler VoidCallback?
getter/setter pair
baseURLChangedCallback VoidCallback?
BaseURL变化回调
getter/setter pair
colorWithDarkSecondary Color
getter/setter pair
colorWithLightSecondary Color
getter/setter pair
currentLocalIsZH bool
no setter
deviceBrand String
iOS 设备型号 iPad Android 与产品/ 硬件相关联的消费者可见品牌 Mac Mac
getter/setter pair
deviceIsPhysicalDevice bool
如果应用程序在模拟器中运行, true 则为其他情况
getter/setter pair
deviceModel String
iOS 硬件类型 iPad13,17 Android 最终产品的最终用户可见名称 Mac MacBookPro16,1
getter/setter pair
deviceName String
iOS iPad Air (5th generation) Android sdk_gphone_x86 Mac MacBook Pro
getter/setter pair
deviceSystemVersion String
操作系统版本号
getter/setter pair
Get → _GetImpl
final
isAndroid bool
getter/setter pair
isAppDebugFlag bool
打开app调试模式
getter/setter pair
isDebug bool
final
isDesktop bool
getter/setter pair
isIOS bool
getter/setter pair
isIPad bool
no setter
isIPhoneX bool
no setter
isLinux bool
getter/setter pair
isMacOS bool
getter/setter pair
isPhone bool
getter/setter pair
isWeb bool
getter/setter pair
isWebInAndroid bool
no setter
isWebInIos bool
no setter
isWebInIPad bool
no setter
isWebInIPhone bool
no setter
isWebInMobile bool
no setter
isWebInWeChat bool
no setter
isWindows bool
getter/setter pair
kApiPath String
getter/setter pair
kBaseURLType BaseURLType
上线环境
no setter
kEmptyList String
列表无数据
getter/setter pair
kFirstPage int
分页时第一页的起始页值
getter/setter pair
kLimitPage int
分页时每页数量
getter/setter pair
kPageCountKey String
每页数量
getter/setter pair
kPageKey String
页码数
getter/setter pair
kPageSizeKey String
每页数量
getter/setter pair
kReleaseBaseURL String
生产环境
getter/setter pair
kTestBaseURL String
测试环境
getter/setter pair
logFile LogFile?
getter/setter pair
It replaces the Flutter Navigator, but needs no context. You can to use navigator.push(YourRoute()) rather Navigator.push(context, YourRoute());
no setter
operatingSystem String
no setter
operatingSystemVersion String
no setter
screenBottomBarHeightDp double
底部安全区距离 dp
no setter
screenDevicePixelRatio double
The number of device pixels for each logical pixe
getter/setter pair
screenHeightDp double
当前设备高度 dp
no setter
screenStatusBarHeightDp double
状态栏高度 dp 刘海屏会更高
no setter
screenToolbarHeightDp double
导航栏高度 dp
getter/setter pair
screenWidthDp double
当前设备宽度 dp
no setter
setAppBarCenterTitle bool?
getter/setter pair
setDarkAppBarBackgroundColor Color
getter/setter pair
setDarkAppBarForegroundColor Color
getter/setter pair
setDarkAppBarSystemOverlayStyle SystemUiOverlayStyle
getter/setter pair
setDarkAppBarTitleTextStyle TextStyle
getter/setter pair
setDarkBodyMediumStyle TextStyle
getter/setter pair
setDarkDividerColor Color
getter/setter pair
setDarkPlaceholderMessageTextStyle TextStyle
getter/setter pair
setDarkPlaceholderTextFieldStyle TextStyle
getter/setter pair
setDarkPlaceholderTitleTextStyle TextStyle
getter/setter pair
setDarkPrimaryColor Color
getter/setter pair
setDarkPrimarySwatchColor Color
getter/setter pair
setDarkScaffoldBackgroundColor Color
getter/setter pair
setDarkTextFieldStyle TextStyle
getter/setter pair
setLightAppBarBackgroundColor Color
getter/setter pair
setLightAppBarForegroundColor Color
getter/setter pair
setLightAppBarSystemOverlayStyle SystemUiOverlayStyle
getter/setter pair
setLightAppBarTitleTextStyle TextStyle
getter/setter pair
setLightBodyMediumStyle TextStyle
getter/setter pair
setLightDividerColor Color
getter/setter pair
setLightPlaceholderMessageTextStyle TextStyle
getter/setter pair
setLightPlaceholderTextFieldStyle TextStyle
getter/setter pair
setLightPlaceholderTitleTextStyle TextStyle
getter/setter pair
setLightPrimaryColor Color
getter/setter pair
setLightPrimarySwatchColor Color
getter/setter pair
setLightScaffoldBackgroundColor Color
getter/setter pair
setLightTextFieldStyle TextStyle
getter/setter pair
setTargetPlatform TargetPlatform?
getter/setter pair
setThemeDataFontFamily String?
getter/setter pair
shareAppStoreDownloadURL String
getter/setter pair
shareDirectoryName String
getter/setter pair
userAgent String
no setter
webOrigin String
no setter
webUserAgent String
https://www.jianshu.com/p/40430596e3ab
no setter

Functions

adaptDp(dynamic number) → dynamic
根据设计稿的比例适配dp保证不变形
adaptOnePx() → dynamic
根据设备适配1px像素大小
adaptPx(dynamic number) → dynamic
根据设计稿的比例适配像素保证不变形
ambiguate<T>(T? value) → T?
appDarkMode(BuildContext context) bool
appStoreUrl(String appId) String
appStoreUserReviewsUrl(String appId) String
appStoreWriteReview(String appId) String
appTheme(BuildContext context) ThemeData
appUpdateLocale(Locale l) → void
assetsImagesPath(String name, {String format = "png"}) String
获取图片路径
assetsImagesPathSvg(String name) String
获取图片路径后缀svg
assetsImagesPathWebP(String name) String
获取图片路径后缀wep
base64Decode(String encoded) Uint8List?
base64解密字符串
base64DecodeString(String data) String
base64解密字符串
base64Encode(List<int> input) String
base64加密二进制
base64EncodeString(String data) String
base64加密字符串
bodyBytesToString(Stream<List<int>> bodyBytes, Map<String, String> headers) Future<String>
calcTemporaryDirectoryCacheSize() Future<String>
canLaunch(String urlString) Future<bool>
checkConnectivity() Future<List<BaseConnectivityResult>>
checkVersion(String action, String baseUrl) → dynamic
clearShareDirectory() Future<void>
clearStorage() Future<bool>
clearTemporaryDirectoryCache() Future<bool>
colorWithRandom() Color
convertImageToJpg({required File inputFile, int quality = 100, JpegChroma chroma = JpegChroma.yuv444}) Future<Uint8List?>
to the JPEG format.
debounce<T>(RxInterface<T> listener, WorkerCallback<T> callback, {Duration? time, Function? onError, void onDone()?, bool? cancelOnError}) Worker
debounce is similar to interval, but sends the last value. Useful for Anti DDos, every time the user stops typing for 1 second, for instance. When listener emits the last "value", when time hits, it calls callback with the last "value" emitted.
decryptString(String string) String
defaultLogWriterCallback(String value, {bool isError = false}) → void
default logger from GetX
delete({String? baseUrl, String path = '', dynamic data, Map<String, dynamic>? queryParameters, Duration? connectTimeout, BaseCancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, bool validResult = true, bool autoLoading = false}) Future<Result>
发送DELETE请求并解析远程服务器返回的result对应的实体类型
dismissLoading() → void
downloadFile({required String url, String? savePath, bool loading = true}) Future<String?>
encryptString(String string) String
ever<T>(RxInterface<T> listener, WorkerCallback<T> callback, {dynamic condition = true, Function? onError, void onDone()?, bool? cancelOnError}) Worker
Called every time listener changes. As long as the condition returns true.
everAll(List<RxInterface> listeners, WorkerCallback callback, {dynamic condition = true, Function? onError, void onDone()?, bool? cancelOnError}) Worker
Similar to ever, but takes a list of listeners, the condition for the callback is common to all listeners, and the callback is executed to each one of them. The Worker is common to all, so worker.dispose() will cancel all streams.
formatDigitNum(Object num, {int digit = 3}) String
每隔n位 加逗号
formatDigitPattern(String text, {int digit = 4, String pattern = ' '}) String
每隔n位 加 pattern
formatDigitPatternEnd(String text, {int digit = 4, String pattern = ' '}) String
每隔n位 加 pattern, 从末尾开始
formatFractionDigitsAsFixed(double amount, {int fractionDigits = 2, bool autoClearZero = false}) String
保留n位小数
get({String? baseUrl, String path = '', Map<String, dynamic>? queryParameters, Duration? connectTimeout, BaseCancelToken? cancelToken, bool validResult = true, bool autoLoading = false}) Future<Result>
发送GET请求并解析远程服务器返回的result对应的实体类型
getAppDocumentsDirectory() Future<Directory>
放置数据的目录的路径
getAppExternalStorageDirectory() Future<Directory?>
应用程序可以访问顶级存储的目录的路径 Android
getAppLibraryDirectory() Future<Directory>
应用程序可以存储持久文件的目录的路径 iOS and macOS
getAppSupportDirectory() Future<Directory>
应用程序可以放置应用程序支持的目录的路径
getAppTemporaryDirectory() Future<Directory>
设备上临时目录的路径,该临时目录未备份且。适用于存储下载文件的缓存
getBasename(String path) String
Gets the part of path after the last separator.
getBasenameWithoutExtension(String path) String
Gets the part of path after the last separator, and without any trailing file extension.
getClipboard() Future<String?>
获取剪贴板内容
getDirname(String path) String
Gets the part of path before the last separator.
getExtension(String path, [int level = 1]) String
Gets the file extension of path: the portion of basename from the last . to the end (including the . itself).
getJoin(String part1, [String? part2, String? part3, String? part4, String? part5, String? part6, String? part7, String? part8, String? part9, String? part10, String? part11, String? part12, String? part13, String? part14, String? part15, String? part16]) String
Joins the given path parts into a single path using the current platform's separator. Example:
getShareDirectory() Future<Directory>
getShareDirectoryPath() Future<String>
getStorageBool(String key) Future<bool>
getStorageList(String key, {required String listKey, required dynamic onModels(Map<String, dynamic> json)}) Future<List>
var models = await getStorageList(_orderNoKey, listKey: _orderNoForUserKey, onModels: (json) { return BaseKeyValue.fromJson(json); });
getStorageMap(String key) Future<Map<String, dynamic>?>
getStorageString(String key) Future<String?>
getTheme({bool darkMode = false, required bool useMaterial3}) ThemeData
getUuidV1() → dynamic
基于时间戳实现
getUuidV4() → dynamic
基于随机算法实现
hapticFeedbackHeavyImpact() → void
较重碰撞振动
hapticFeedbackLightImpact() → void
较轻碰撞振动
hapticFeedbackMediumImpact() → void
中等碰撞振动
hapticFeedbackVibrate() → void
长振动
hideKeyboard(BuildContext context) → void
全局隐藏键盘
imageIsJpeg(File file) Future<bool>
initSelectedBaseURLType() Future<String?>
interval<T>(RxInterface<T> listener, WorkerCallback<T> callback, {Duration time = const Duration(seconds: 1), dynamic condition = true, Function? onError, void onDone()?, bool? cancelOnError}) Worker
Ignore all changes in listener during time (1 sec by default) or until condition is met (can be a bool expression or a bool Function()), It brings the 1st "value" since the period of time, so if you click a counter button 3 times in 1 sec, it will show you "1" (after 1 sec of the first press) click counter 3 times in 1 sec, it will show you "4" (after 1 sec) click counter 2 times in 1 sec, it will show you "7" (after 1 sec).
jsonDecode(String source, {Object? reviver(Object? key, Object? value)?}) → dynamic
Parses the string and returns the resulting Json object.
jsonEncode(Object? value, {Object? toEncodable(dynamic object)?}) String
Converts value to a JSON string.
logDebug(dynamic message) → void
logError(dynamic message) → void
logFatal(dynamic message) → void
logInfo(dynamic message) → void
logRequest(RequestOptions options) → void
logResponse(Result result) → void
logWarning(dynamic message) → void
lunarSolarConverter(DateTime date) Lunar
公历转农历
once<T>(RxInterface<T> listener, WorkerCallback<T> callback, {dynamic condition = true, Function? onError, void onDone()?, bool? cancelOnError}) Worker
once() will execute only 1 time when condition is met and cancel the subscription to the listener stream right after that. condition defines when callback is called, and can be a bool or a bool Function().
onConnectivityChanged() Stream<List<BaseConnectivityResult>>
onLaunch(String urlString, {BaseLaunchMode mode = BaseLaunchMode.platformDefault, WebViewConfiguration webViewConfiguration = const urlLauncher.WebViewConfiguration(), String? webOnlyWindowName}) Future<bool>
post({String? baseUrl, String path = '', dynamic data, Map<String, dynamic>? queryParameters, Duration? connectTimeout, BaseCancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, bool validResult = true, bool autoLoading = false}) Future<Result>
发送POST请求并解析远程服务器返回的result对应的实体类型
put({String? baseUrl, String path = '', dynamic data, Map<String, dynamic>? queryParameters, Duration? connectTimeout, BaseCancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, bool validResult = true, bool autoLoading = false}) Future<Result>
发送PUT请求并解析远程服务器返回的result对应的实体类型
randomInt(int max) int
随机数(0-max)小于max
removeStorage(String key) Future<bool>
request({String? baseUrl, String path = '', dynamic data, Map<String, dynamic>? queryParameters, BaseCancelToken? cancelToken, Options? options, Duration? connectTimeout, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, bool validResult = true, bool autoLoading = false}) Future<Result>
发送请求并解析远程服务器返回的result对应的实体类型
reverse(String text) String
反转字符串
saveBaseURLType(BaseURLType urlType) Future<bool>
保存选择的环境
setClipboard(String text) Future<void>
将文本内容复制到剪贴板
setStorageBool(String key, bool value) Future<bool>
setStorageList(String key, {required String listKey, required List list}) Future<bool>
var models = await getStorageList(_orderNoKey, listKey: _orderNoForUserKey, onModels: (json) { return BaseKeyValue.fromJson(json); }); models.add(BaseKeyValue(key: "key", value: "${randomInt(100)}")); await setStorageList(_orderNoKey, listKey: _orderNoForUserKey, list: models);
setStorageMap(String key, Map<String, dynamic> value) Future<bool>
setStorageString(String key, String value) Future<bool>
shareApp() Future<ShareResult>
shareFile({required String url, String? savePath}) Future<void>
shareText(String text, {String? subject}) Future<ShareResult>
shareURL(String url) Future<ShareResult>
showErrorToast(String status, {Duration? duration, EasyLoadingMaskType? maskType, bool? dismissOnTap}) → void
showInfoToast(String status, {Duration? duration, EasyLoadingMaskType? maskType, bool? dismissOnTap}) → void
showLoading({String? status, Widget? indicator, EasyLoadingMaskType? maskType, bool? dismissOnTap}) → void
showModalPopupDatePicker(BuildContext context, {double? height, CupertinoDatePickerMode mode = CupertinoDatePickerMode.dateAndTime, DateTime? initialDateTime, DateTime? minimumDate, DateTime? maximumDate, int? minimumYear, int? maximumYear}) Future<DateTime?>
showModalPopupTitlesPicker(BuildContext context, List<String> titles, {double? height}) Future<int?>
showProgress(double value, {String? status, EasyLoadingMaskType? maskType}) → void
showSelectBaseURLTypeAlert({BuildContext? context}) Future<bool?>
弹出切换环境菜单
showSuccessToast(String status, {Duration? duration, EasyLoadingMaskType? maskType, bool? dismissOnTap}) → void
showToast(String status, {Duration? duration, EasyLoadingToastPosition? toastPosition, EasyLoadingMaskType? maskType, bool? dismissOnTap}) → void
sortMap(Map map) Map
timestampBy(DateTime dateTime) int
获取指定时间戳
timestampNow() int
获取当前时间戳
timestampTo_HH_mm(int timestamp, {String unit = ':', bool isUtc = false}) String
时间戳转HH:mm
timestampToDateTime(int timestamp, {bool isUtc = false}) DateTime
时间戳转DateTime
timestampToNormal_yyyy_MM_dd(int timestamp, {bool isUtc = false}) String
时间戳转yyyy-MM-dd
timestampToNormal_yyyy_MM_dd_HH_mm_ss(int timestamp, {bool isUtc = false}) String
时间戳转yyyy-MM-dd HH:mm:ss
timestampToZh_yyyy_MM(int timestamp, {bool isUtc = false}) String
时间戳转yyyy年MM月
timestampToZh_yyyy_MM_dd(int timestamp, {bool isUtc = false}) String
时间戳转yyyy年MM月dd日
timestampToZh_yyyy_MM_dd_HH_mm(int timestamp, {bool isUtc = false}) String
时间戳转yyyy年MM月dd日 HH时mm分
timestampToZh_yyyy_MM_dd_HH_mm_ss(int timestamp, {bool isUtc = false}) String
时间戳转yyyy年MM月dd日 HH时mm分ss秒
twelveConstellationBy(DateTime dateTime) BaseKeyValue
标志 星座 拉丁名称 出生日期(公历) 别名 ♈ 白羊座 Aries 3月21日~4月19日 牡羊座 ♉ 金牛座 Taurus 4月20日~5月20日 金牛座 ♊ 双子座 Gemini 5月21日~6月21日 双子座 ♋ 巨蟹座 Cancer 6月22日~7月22日 巨蟹座 ♌ 狮子座 Leo 7月23日~8月22日 狮子座 ♍ 处女座 Virgo 8月23日~9月22日 室女座 ♎ 天秤座 Libra 9月23日~10月23日 天平座 ♏ 天蝎座 Scorpio 10月24日~11月22日 天蝎座 ♐ 射手座 Sagittarius 11月23日~12月21日 人马座 ♑ 摩羯座 Capricorn 12月22日~1月19日 山羊座 ♒ 水瓶座 Aquarius 1月20日~2月18日 宝瓶座 ♓ 双鱼座 Pisces 2月19日~3月20日 双鱼座 "${(constellation.extend as List
twelveConstellationNow() BaseKeyValue
twoDigits(int n) String
不足两位前面补0
uploadOSSFile({required String filepath, required String policy, required String accessKeyId, required String signature, required String key, required String host, String successActionStatus = "204", Duration connectTimeout = const Duration(seconds: 60), BaseCancelToken? cancelToken, ProgressCallback? onSendProgress}) Future<Result>
上传文件

Typedefs

AddSubscription<T> = FutureOr<void> Function(LightSubscription<T> subs)
AsyncInstanceBuilderCallback<S> = Future<S> Function()
BaseAlignedGridView = AlignedGridView
BaseCancelToken = CancelToken
BaseClassicFooter = ClassicFooter
BaseClassicHeader = ClassicHeader
BaseConnectivityResult = ConnectivityResult
BaseCustomFooter = CustomFooter
BaseDateFormat = DateFormat
BaseDotSwiperPaginationBuilder = DotSwiperPaginationBuilder
BaseEasyLoading = EasyLoading
BaseEasyLoadingAnimationStyle = EasyLoadingAnimationStyle
BaseEasyLoadingIndicatorType = EasyLoadingIndicatorType
BaseEasyLoadingMaskType = EasyLoadingMaskType
BaseEasyLoadingPosition = EasyLoadingToastPosition
BaseEasyLoadingStatus = EasyLoadingStatus
BaseEasyLoadingStyle = EasyLoadingStyle
BaseExtendedAssetImageProvider = ExtendedAssetImageProvider
BaseExtendedExactAssetImageProvider = ExtendedExactAssetImageProvider
BaseExtendedFileImageProvider = ExtendedFileImageProvider
BaseExtendedImage = ExtendedImage
BaseExtendedImageState = ExtendedImageState
BaseExtendedNetworkImageProvider = ExtendedNetworkImageProvider
BaseFractionPaginationBuilder = FractionPaginationBuilder
BaseIntl = Intl
BaseLaunchMode = LaunchMode
BaseLoadState = LoadState
BaseMasonryGridView = MasonryGridView
BaseOverlayVisibilityMode = OverlayVisibilityMode
BaseRatingBar = RatingBar
BaseRatingWidget = RatingWidget
BaseRectSwiperPaginationBuilder = RectSwiperPaginationBuilder
BaseRefreshConfiguration = RefreshConfiguration
BaseRefreshController = RefreshController
BaseRefreshLocalizations = RefreshLocalizations
BaseSliverAlignedGrid = SliverAlignedGrid
BaseSliverMasonryGrid = SliverMasonryGrid
BaseSliverSimpleGridDelegateWithFixedCrossAxisCount = SliverSimpleGridDelegateWithFixedCrossAxisCount
BaseSliverSimpleGridDelegateWithMaxCrossAxisExtent = SliverSimpleGridDelegateWithMaxCrossAxisExtent
BaseSmartRefresher = SmartRefresher
BaseStaggeredGridTile = StaggeredGridTile
BaseSwiper = Swiper
BaseSwiperLayout = SwiperLayout
BaseSwiperPagination = SwiperPagination
BaseSwiperPlugin = SwiperPlugin
BindingBuilderCallback = void Function()
Condition = bool Function()
Decoder<T> = T Function(dynamic data)
GetControllerBuilder<T extends DisposableInterface> = Widget Function(T controller)
GetPageBuilder = Widget Function()
GetXControllerBuilder<T extends DisposableInterface> = Widget Function(T controller)
InjectorBuilderCallback<S> = S Function(GetInstance)
InstanceBuilderCallback<S> = S Function()
LogWriterCallback = void Function(String text, {bool isError})
VoidCallback from logs
NotifierBuilder<T> = Widget Function(T state)
OnTap = void Function(GetSnackBar snack)
PrintFunctionCallback = void Function(String prefix, dynamic value, String info, {bool? isError})
Progress = dynamic Function(double percent)
RemoveSubscription<T> = FutureOr<bool?> Function(LightSubscription<T> subs)
SessionExceptionType = DioExceptionType
SessionInterceptorSendHandler = dynamic Function(RequestOptions options)
SessionInterceptorSuccessHandler = dynamic Function(Result result)
SnackbarStatusCallback = void Function(SnackbarStatus? status)
ValueBuilderBuilder<T> = Widget Function(T snapshot, ValueBuilderUpdateCallback<T> updater)
ValueBuilderUpdateCallback<T> = void Function(T snapshot)
ValueUpdater<T> = T Function()
WidgetCallback = Widget Function()
WorkerCallback<T> = dynamic Function(T callback)