app_base_kit library

Classes

AppEvent
The base class for all events
AppEventBus
EventBus 单例
BrowserConfiguration
Additional configuration options for LaunchMode.inAppBrowserView
EasyLoading
EasyLoadingAnimation
EmptyEvent
The empty event
EventCompletionEvent
The event completion event
FlutterEasyLoading
Fluttertoast
Plugin to show a toast message on screen Only for android, ios and Web platforms
FToast
Runs on dart side this has no interaction with the Native Side Works with all platforms just in two lines of code final fToast = FToast().init(context) fToast.showToast(child)
LaunchUrlUtil
打开网页,应用商店
LoadingInitializer
loading 初始化
LoadingUtil
loading 工具
ToastStateFulState
State for _ToastStateFul
VisibleRange<T>
WebViewConfiguration
Additional configuration options for LaunchMode.inAppWebView.

Enums

EasyLoadingAnimationStyle
loading animation
EasyLoadingIndicatorType
loading indicator type. see https://github.com/jogboms/flutter_spinkit#-showcase
EasyLoadingMaskType
loading mask type none default mask type, allow user interactions while loading is displayed clear don't allow user interactions while loading is displayed black don't allow user interactions while loading is displayed custom while mask type is custom, maskColor should not be null
EasyLoadingStatus
loading status
EasyLoadingStyle
loading style
EasyLoadingToastPosition
toast position
LaunchMode
The desired mode to launch a URL.
Toast
Toast Length Only for Android Platform
ToastGravity
ToastGravity Used to define the position of the Toast on the screen

Functions

calculateRemainingGridRows<T>({required double offset, required double mainAxisExtent, required double mainAxisSpacing, required double viewportDimension, required int crossAxisCount, required List<T> items, double headerHeight = 0.0, double footerHeight = 0.0}) → int?
计算当前 GridView 滚动位置下,距离列表底部还剩多少“完整行数”。
canLaunch(String urlString) → Future<bool>
Checks whether the specified URL can be handled by some app installed on the device.
canLaunchUrl(Uri url) → Future<bool>
Checks whether the specified URL can be handled by some app installed on the device.
closeInAppWebView() → Future<void>
Closes the current in-app web view, if one was previously opened by launchUrl.
closeWebView() → Future<void>
Closes the current WebView, if one was previously opened via a call to launch.
FToastBuilder() → TransitionBuilder
Simple builder method to create a TransitionBuilder and for the use in MaterialApp builder method
getVisibleGridRange<T>({required double offset, required double mainAxisExtent, required double mainAxisSpacing, required double viewportDimension, required int crossAxisCount, required List<T> items, double headerHeight = 0.0}) → VisibleRange<T>
获取 GridView 的可见项
getVisibleListRange<T>(double offset, double itemExtent, double viewportDimension, List<T> items) → VisibleRange<T>
根据滚动偏移量计算当前可见的子列表。
launch(String urlString, {bool? forceSafariVC, bool forceWebView = false, bool enableJavaScript = false, bool enableDomStorage = false, bool universalLinksOnly = false, Map<String, String> headers = const <String, String>{}, Brightness? statusBarBrightness, String? webOnlyWindowName}) → Future<bool>
Parses the specified URL string and delegates handling of it to the underlying platform.
launchUrl(Uri url, {LaunchMode mode = LaunchMode.platformDefault, WebViewConfiguration webViewConfiguration = const WebViewConfiguration(), BrowserConfiguration browserConfiguration = const BrowserConfiguration(), String? webOnlyWindowName}) → Future<bool>
Passes url to the underlying platform for handling.
mToast(String msg, {Toast toastLength = Toast.LENGTH_SHORT, ToastGravity position = ToastGravity.CENTER, int time = 2, double fontSize = 16.0, Color backColor = Colors.black, Color textColor = Colors.white}) → void
Toast 工具
supportsCloseForLaunchMode(LaunchMode mode) → Future<bool>
Returns true if closeInAppWebView is supported for mode in the current platform implementation.
supportsLaunchMode(LaunchMode mode) → Future<bool>
Returns true if mode is supported by the current platform implementation.

Typedefs

EasyLoadingStatusCallback = void Function(EasyLoadingStatus status)
PositionedToastBuilder = Widget Function(BuildContext context, Widget child, ToastGravity? gravity)
Signature for a function to buildCustom Toast
ToastPositionMapping = Widget? Function(Widget child, ToastGravity? gravity)
Signature for a function that defines custom position mapping for a toast