MySplash class

启动叠层:只负责品牌脸,并上报「一圈播完 / 加载失败」。

揭开由 MyApp 的门闩决定,不要在这里写 Timer 或改路由。 所有尺寸参数均为设计尺寸值,内部在 build 时通过 ScreenUtil 换算。

Inheritance
Available extensions

Constructors

MySplash({Key? key, @Deprecated('Splash 不是路由。无品牌脸请传 splash: null。') String nextRoute = '', String? lottieAssetPath, String? appTitle, Color backgroundColor = Colors.white, @Deprecated('揭开看 bootstrap × 动画,不再用固定时长。') Duration splashDuration = const Duration(milliseconds: 2500), Color textColor = Colors.black, double? fontSize, FontWeight fontWeight = FontWeight.w800, double? lottieWidth, double? spaceBetween, Duration minVisible = const Duration(milliseconds: 300), Duration brandTimeout = const Duration(seconds: 8)})
const

Properties

appTitle String?
final
backgroundColor Color
final
brandTimeout Duration
Lottie hang(onLoaded 不回调)时视为动画结束。
final
fontSize double?
标题字号(设计尺寸值,内部自动 .sp),默认 50
final
fontWeight FontWeight
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lottieAssetPath String?
final
lottieWidth double?
Lottie 动画宽度(设计尺寸值,内部自动 .w),默认 200
final
marginZero Widget

Available on Widget, provided by the WidgetMarginX extension

no setter
minVisible Duration
无 Lottie 的静态品牌脸最短可见时间,防止闪一帧。有 Lottie 时忽略。
final
nextRoute String
已无导航作用,保留只为旧调用方还能编译。
final
paddingZero Widget

Available on Widget, provided by the WidgetPaddingX extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sliverBox Widget

Available on Widget, provided by the WidgetSliverBoxX extension

no setter
spaceBetween double?
动画与标题之间的间距(设计尺寸值,内部自动 .w),默认 20
final
splashDuration Duration
已不再用于揭开。有 Lottie 时播完一圈;静态脸用 minVisible
final
textColor Color
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MySplash>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
marginAll(double margin) Widget

Available on Widget, provided by the WidgetMarginX extension

marginOnly({double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) Widget

Available on Widget, provided by the WidgetMarginX extension

marginSymmetric({double horizontal = 0.0, double vertical = 0.0}) Widget

Available on Widget, provided by the WidgetMarginX extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paddingAll(double padding) Widget

Available on Widget, provided by the WidgetPaddingX extension

paddingOnly({double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) Widget

Available on Widget, provided by the WidgetPaddingX extension

paddingSymmetric({double horizontal = 0.0, double vertical = 0.0}) Widget

Available on Widget, provided by the WidgetPaddingX extension

setFocus({String? focusKey, VoidCallback? onPressed, bool opacity = false, Color focusedBorderColor = Colors.grey, double borderWidth = 1.5, Duration animationDuration = const Duration(milliseconds: 350), double opacityBeginScale = 0.65}) Widget

Available on Widget, provided by the XlyFocusableExtension extension

showRightMenu({required BuildContext context, required List<MyMenuElement> menuElements, MyMenuPopStyle animationStyle = MyMenuPopStyle.reveal, MyMenuStyle? style}) Widget

Available on Widget, provided by the RightClickMenuExtension extension

toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

overlayKey → const Key