app_base_kit
library
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 , })
→ 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 , 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.