ScreenUtilInit class

Inheritance
Available extensions

Constructors

ScreenUtilInit({Key? key, ScreenUtilInitBuilder? builder, Widget? child, RebuildFactor rebuildFactor = RebuildFactors.size, Size designSize = ScreenUtil.defaultSize, bool splitScreenMode = false, bool minTextAdapt = false, bool useInheritedMediaQuery = false, bool ensureScreenSize = false, bool enableScaleWH()?, bool enableScaleText()?, Iterable<String>? responsiveWidgets, Iterable<String>? excludeWidgets, FontSizeResolver fontSizeResolver = FontSizeResolvers.width})
A helper widget that initializes ScreenUtil
const

Properties

builder ScreenUtilInitBuilder?
final
child Widget?
final
designSize Size
The Size of the device in the design draft, in dp
final
enableScaleText bool Function()?
final
enableScaleWH bool Function()?
final
ensureScreenSize bool
final
excludeWidgets Iterable<String>?
final
fontSizeResolver FontSizeResolver
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minTextAdapt bool
final
rebuildFactor RebuildFactor
final
responsiveWidgets Iterable<String>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
splitScreenMode bool
final
useInheritedMediaQuery bool
final

Methods

align(AlignmentGeometry alignment, {Key? key}) Widget

Available on Widget, provided by the WidgetExtensions extension

对齐
alignBottom() Widget

Available on Widget, provided by the WidgetExtensions extension

对齐 底部
alignCenter() Widget

Available on Widget, provided by the WidgetExtensions extension

对齐 中间
alignLeft() Widget

Available on Widget, provided by the WidgetExtensions extension

对齐 左边
alignment(AlignmentGeometry alignment, {Key? key, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

对齐
alignRight() Widget

Available on Widget, provided by the WidgetExtensions extension

对齐 右边
alignTop() Widget

Available on Widget, provided by the WidgetExtensions extension

对齐 顶部
animate(Duration duration, Curve curve, {Key? key}) Widget

Available on Widget, provided by the WidgetExtensions extension

animated all properties before this method 动画所有属性
aspectRatio({Key? key, required double aspectRatio}) Widget

Available on Widget, provided by the WidgetExtensions extension

比例
backgroundBlendMode(BlendMode blendMode, {Key? key, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

背景混合模式
backgroundBlur(double sigma, {Key? key, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

背景模糊
backgroundColor(Color color, {Key? key, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

背景颜色
backgroundGradient(Gradient gradient, {Key? key, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

背景渐变
backgroundImage(DecorationImage image, {Key? key, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

背景图片
backgroundLinearGradient({Key? key, AlignmentGeometry begin = Alignment.centerLeft, AlignmentGeometry end = Alignment.centerRight, List<Color>? colors, List<double>? stops, TileMode tileMode = TileMode.clamp, GradientTransform? transform, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

背景线性渐变
backgroundRadialGradient({Key? key, AlignmentGeometry center = Alignment.center, double radius = 0.5, List<Color>? colors, List<double>? stops, TileMode tileMode = TileMode.clamp, AlignmentGeometry? focal, double focalRadius = 0.0, GradientTransform? transform, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

背景径向渐变
backgroundSweepGradient({Key? key, AlignmentGeometry center = Alignment.center, double startAngle = 0.0, double endAngle = pi * 2, List<Color>? colors, List<double>? stops, TileMode tileMode = TileMode.clamp, GradientTransform? transform, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

背景扫光渐变
border({Key? key, double? all, double? left, double? right, double? top, double? bottom, Color color = const Color(0xFF000000), BorderStyle style = BorderStyle.solid, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

边框
borderRadius({Key? key, double? all, double? topLeft, double? topRight, double? bottomLeft, double? bottomRight, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

圆角
borderRadiusDirectional({Key? key, double? all, double? topStart, double? topEnd, double? bottomStart, double? bottomEnd, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

圆角方向
boxShadow({Key? key, Color color = const Color(0xFF000000), Offset offset = Offset.zero, double blurRadius = 0.0, double spreadRadius = 0.0, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

盒子阴影
card({Key? key, Color? color, double? elevation, ShapeBorder? shape, bool borderOnForeground = true, EdgeInsetsGeometry? margin, Clip? clipBehavior, bool semanticContainer = true}) Widget

Available on Widget, provided by the WidgetExtensions extension

卡片
center({Key? key, double? widthFactor, double? heightFactor}) Widget

Available on Widget, provided by the WidgetExtensions extension

居中
clipOval({Key? key}) Widget

Available on Widget, provided by the WidgetExtensions extension

椭圆
clipRect({Key? key, CustomClipper<Rect>? clipper, Clip clipBehavior = Clip.hardEdge}) Widget

Available on Widget, provided by the WidgetExtensions extension

矩形
clipRRect({Key? key, double? all, double? topLeft, double? topRight, double? bottomLeft, double? bottomRight, CustomClipper<RRect>? clipper, Clip clipBehavior = Clip.antiAlias, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

圆角矩形
constrained({Key? key, double? width, double? height, double minWidth = 0.0, double maxWidth = double.infinity, double minHeight = 0.0, double maxHeight = double.infinity, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

约束
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ScreenUtilInit>
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
decorated({Key? key, Color? color, DecorationImage? image, BoxBorder? border, BorderRadius? borderRadius, List<BoxShadow>? boxShadow, Gradient? gradient, BlendMode? backgroundBlendMode, BoxShape shape = BoxShape.rectangle, DecorationPosition position = DecorationPosition.background, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

盒子装饰器
elevation(double elevation, {Key? key, BorderRadiusGeometry borderRadius = BorderRadius.zero, Color shadowColor = const Color(0xFF000000)}) Widget

Available on Widget, provided by the WidgetExtensions extension

阴影
expanded({Key? key, int flex = 1}) Widget

Available on Widget, provided by the WidgetExtensions extension

扩展
fittedBox({Key? key, BoxFit fit = BoxFit.contain, AlignmentGeometry alignment = Alignment.center}) Widget

Available on Widget, provided by the WidgetExtensions extension

适配
flexible({Key? key, int flex = 1, FlexFit fit = FlexFit.loose}) Widget

Available on Widget, provided by the WidgetExtensions extension

弹性
fractionallySizedBox({Key? key, AlignmentGeometry alignment = Alignment.center, double? widthFactor, double? heightFactor}) Widget

Available on Widget, provided by the WidgetExtensions extension

适配
gestures({Key? key, GestureOnTapChangeCallback? onTapChange, GestureTapDownCallback? onTapDown, GestureTapUpCallback? onTapUp, GestureTapCallback? onTap, GestureTapCancelCallback? onTapCancel, GestureTapDownCallback? onSecondaryTapDown, GestureTapUpCallback? onSecondaryTapUp, GestureTapCancelCallback? onSecondaryTapCancel, GestureTapCallback? onDoubleTap, GestureLongPressCallback? onLongPress, GestureLongPressStartCallback? onLongPressStart, GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate, GestureLongPressUpCallback? onLongPressUp, GestureLongPressEndCallback? onLongPressEnd, GestureDragDownCallback? onVerticalDragDown, GestureDragStartCallback? onVerticalDragStart, GestureDragUpdateCallback? onVerticalDragUpdate, GestureDragEndCallback? onVerticalDragEnd, GestureDragCancelCallback? onVerticalDragCancel, GestureDragDownCallback? onHorizontalDragDown, GestureDragStartCallback? onHorizontalDragStart, GestureDragUpdateCallback? onHorizontalDragUpdate, GestureDragEndCallback? onHorizontalDragEnd, GestureDragCancelCallback? onHorizontalDragCancel, GestureDragDownCallback? onPanDown, GestureDragStartCallback? onPanStart, GestureDragUpdateCallback? onPanUpdate, GestureDragEndCallback? onPanEnd, GestureDragCancelCallback? onPanCancel, GestureScaleStartCallback? onScaleStart, GestureScaleUpdateCallback? onScaleUpdate, GestureScaleEndCallback? onScaleEnd, GestureForcePressStartCallback? onForcePressStart, GestureForcePressPeakCallback? onForcePressPeak, GestureForcePressUpdateCallback? onForcePressUpdate, GestureForcePressEndCallback? onForcePressEnd, HitTestBehavior? behavior, bool excludeFromSemantics = false, DragStartBehavior dragStartBehavior = DragStartBehavior.start}) Widget

Available on Widget, provided by the WidgetExtensions extension

手势
height(double height, {Key? key, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

约束 高度
inkWell({Key? key, dynamic onTap()?, double? borderRadius}) Widget

Available on Widget, provided by the WidgetExtensions extension

limitedBox({Key? key, double maxWidth = double.infinity, double maxHeight = double.infinity}) Widget

Available on Widget, provided by the WidgetExtensions extension

限制
material({Key? key, MaterialType type = MaterialType.canvas, double elevation = 0.0, Color? color, Color? shadowColor, TextStyle? textStyle, BorderRadiusGeometry? borderRadius, ShapeBorder? shape, bool borderOnForeground = true, Clip clipBehavior = Clip.none, Duration animationDuration = kThemeChangeDuration}) Widget

Available on Widget, provided by the WidgetExtensions extension

材料
mouseRegion({Key? key, void onEnter(PointerEnterEvent)?, void onExit(PointerExitEvent)?, void onHover(PointerHoverEvent)?, MouseCursor cursor = MouseCursor.defer, bool opaque = true}) Widget

Available on Widget, provided by the WidgetExtensions extension

鼠标区域
neumorphism({Key? key, required double elevation, BorderRadius borderRadius = BorderRadius.zero, Color backgroundColor = const Color(0xffEDF1F5), double curve = 0.0, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

新拟态
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
offstage({Key? key, bool offstage = true}) Widget

Available on Widget, provided by the WidgetExtensions extension

舞台
onLongPress(GestureTapCallback? onLongPress, {Key? key, HitTestBehavior? behavior, bool excludeFromSemantics = false, DragStartBehavior dragStartBehavior = DragStartBehavior.start}) Widget

Available on Widget, provided by the WidgetExtensions extension

长按手势
onTap(GestureTapCallback? onTap, {Key? key, HitTestBehavior? behavior, bool excludeFromSemantics = false, DragStartBehavior dragStartBehavior = DragStartBehavior.start}) Widget

Available on Widget, provided by the WidgetExtensions extension

手势
opacity(double opacity, {Key? key, bool animate = false, bool alwaysIncludeSemantics = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

透明度
overflow({Key? key, AlignmentGeometry alignment = Alignment.center, double? minWidth, double? maxWidth, double? minHeight, double? maxHeight, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

溢出
padding({Key? key, double? all, double? horizontal, double? vertical, double? top, double? bottom, double? left, double? right, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距
paddingBottom(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 下
paddingDirectional({Key? key, double? all, double? horizontal, double? vertical, double? top, double? bottom, double? start, double? end, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 方向
paddingHorizontal(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 横向
paddingLeft(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 左
paddingRight(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 右
paddingTop(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 上
paddingVertical(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 纵向
parent(Widget parent({required Widget child})) Widget

Available on Widget, provided by the WidgetExtensions extension

Applies a parent to a child
positioned({Key? key, double? left, double? top, double? right, double? bottom, double? width, double? height, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

位置
positionedDirectional({Key? key, double? start, double? end, double? top, double? bottom, double? width, double? height, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

位置方向
ripple({Key? key, Color? focusColor, Color? hoverColor, Color? highlightColor, Color? splashColor, InteractiveInkFeatureFactory? splashFactory, double? radius, ShapeBorder? customBorder, bool enableFeedback = true, bool excludeFromSemantics = false, FocusNode? focusNode, bool canRequestFocus = true, bool autoFocus = false, bool enable = true}) Widget

Available on Widget, provided by the WidgetExtensions extension

涟漪 InkWell
rotate({Key? key, required double angle, Offset? origin, AlignmentGeometry alignment = Alignment.center, bool transformHitTests = true, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

旋转
safeArea({Key? key, bool top = true, bool bottom = true, bool left = true, bool right = true}) Widget

Available on Widget, provided by the WidgetExtensions extension

安全区域
scale({Key? key, double? all, double? x, double? y, Offset? origin, AlignmentGeometry alignment = Alignment.center, bool transformHitTests = true, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

缩放
scrollable({Key? key, Axis scrollDirection = Axis.vertical, bool reverse = false, bool? primary, ScrollPhysics? physics, ScrollController? controller, DragStartBehavior dragStartBehavior = DragStartBehavior.start, EdgeInsetsGeometry? padding}) Widget

Available on Widget, provided by the WidgetExtensions extension

滚动视图
semanticsLabel(String label, {Key? key}) Widget

Available on Widget, provided by the WidgetExtensions extension

语义标签
sliverPadding({Key? key, EdgeInsetsGeometry? value, double? all, double? horizontal, double? vertical, double? top, double? bottom, double? left, double? right}) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距
sliverPaddingBottom(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 下
sliverPaddingHorizontal(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 横向
sliverPaddingLeft(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 左
sliverPaddingRight(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 右
sliverPaddingTop(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 上
sliverPaddingVertical(double val) Widget

Available on Widget, provided by the WidgetExtensions extension

内间距 纵向
sliverToBoxAdapter({Key? key}) Widget

Available on Widget, provided by the WidgetExtensions extension

SliverToBoxAdapter
tight({double? width, double? height, Key? key}) Widget

Available on Widget, provided by the WidgetExtensions extension

约束 宽高
tightSize(double size, {Key? key}) Widget

Available on Widget, provided by the WidgetExtensions extension

约束 宽高 size
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
transform({Key? key, required Matrix4 transform, Offset? origin, AlignmentGeometry? alignment, bool transformHitTests = true, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

变换
translate({Key? key, required Offset offset, bool transformHitTests = true, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

平移
unconstrained({Key? key, TextDirection? textDirection, AlignmentGeometry alignment = Alignment.center, Axis? constrainedAxis, Clip clipBehavior = Clip.none}) Widget

Available on Widget, provided by the WidgetExtensions extension

取消父级约束
width(double width, {Key? key, bool animate = false}) Widget

Available on Widget, provided by the WidgetExtensions extension

约束 宽度

Operators

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