UniversalContainer class
Create a container that is responsive.
It is recommended to place it directly under UniversalScaffold.body. Otherwise, Container is fine.
The maximum width is automatically set according to UniversalScaffold.breakpoint.
レスポンシブに対応したコンテナを作成します。
UniversalScaffold.bodyの直下に置くことをおすすめします。 それ以外はContainerで問題ございません。
UniversalScaffold.breakpointに応じて最大の横幅が自動で設定されます。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- UniversalContainer
- Available extensions
Constructors
-
UniversalContainer({Key? key, Widget? child, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, Color? color, Decoration? decoration, Decoration? foregroundDecoration, Future<
void> onRefresh()?, double? width, double? height, BoxConstraints? constraints, AlignmentGeometry alignment = Alignment.center, Matrix4? transform, AlignmentGeometry? transformAlignment, Clip clipBehavior = Clip.none, Breakpoint? breakpoint, bool? enableResponsivePadding}) -
Create a container that is responsive.
const
Properties
- alignment → AlignmentGeometry
-
This value holds the alignment to be used by the container.
final
- breakpoint → Breakpoint?
-
You can specify the breakpoint at which the UI will change to a mobile-oriented UI.
final
- child → Widget?
-
Widgets to be stored in Container.
final
- clipBehavior → Clip
-
The clip behavior when Container.decoration is not null.
final
- color → Color?
-
Sets the background color of the container.
final
- constraints → BoxConstraints?
-
Sets size constraints for containers.
final
- decoration → Decoration?
-
Sets the container background decoration.
final
- enableResponsivePadding → bool?
-
Specify whether to enable responsive padding.
final
- foregroundDecoration → Decoration?
-
Sets the decorations to be drawn before the container's
builder.final - hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Sets the height of the container.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry?
-
Sets the margin of the container.
final
-
onRefresh
→ Future<
void> Function()? -
Method called by RefreshIndicator.
final
- padding → EdgeInsetsGeometry?
-
Defines where to place the widget with respect to its parent.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transform → Matrix4?
-
The transformation matrix to apply before painting the container.
final
- transformAlignment → AlignmentGeometry?
-
The alignment of the origin, relative to the size of the container, if transform is specified.
final
- width → double?
-
Sets the width of the container.
final
Methods
-
alignAt(
Alignment alignment, {Key? key, double? heightFactor, double? widthFactor}) → Align -
Available on Widget, provided by the UniversalUIWidgetStructureExtensions extension
Move Widget toalignment. -
background(
Color backgroundColor) → DecoratedBox -
Available on Widget, provided by the UniversalUIDecorationExtensions extension
Change thebackgroundColorof the Widget. -
border(
BoxBorder border) → DecoratedBox -
Available on Widget, provided by the UniversalUIDecorationExtensions extension
Addborderto Widget. -
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
centerAt(
) → Center -
Available on Widget, provided by the UniversalUIWidgetStructureExtensions extension
Center the Widget. -
clipOval(
{CustomClipper< Rect> ? clipper, Clip clipBehavior = Clip.antiAlias}) → ClipOval -
Available on Widget, provided by the UniversalUIClipExtensions extension
Clip Widget in a circle. -
clipRect(
{required BorderRadiusGeometry borderRadius, CustomClipper< RRect> ? clipper, Clip clipBehavior = Clip.antiAlias}) → ClipRRect -
Available on Widget, provided by the UniversalUIClipExtensions extension
Clip Widget with a rounded rectangle. -
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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
-
decoration(
{Color? backgroundColor, BoxBorder? border}) → DecoratedBox -
Available on Widget, provided by the UniversalUIDecorationExtensions extension
Add abackgroundColorbackground orborderto the Widget. -
expanded(
{int flex = 1}) → Expanded -
Available on Widget, provided by the UniversalUIWidgetStructureExtensions extension
Give Expanded to Widget. -
flexible(
{int flex = 1}) → Flexible -
Available on Widget, provided by the UniversalUIWidgetStructureExtensions extension
Give Flexible to Widget. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDoubleTap(
VoidCallback callback) → GestureDetector -
Available on Widget, provided by the UniversalUIGestureDetectorExtensions extension
callbackwhen a double-tap is performed. -
onDoubleTapWithInk(
VoidCallback callback) → InkWell -
Available on Widget, provided by the UniversalUIGestureDetectorExtensions extension
callbackwhen a double-tap is performed. -
onLongPress(
VoidCallback callback) → GestureDetector -
Available on Widget, provided by the UniversalUIGestureDetectorExtensions extension
Executecallbackwhen a long press is performed. -
onLongPressWithInk(
VoidCallback callback) → InkWell -
Available on Widget, provided by the UniversalUIGestureDetectorExtensions extension
Executecallbackwhen a long press is performed. -
onTap(
VoidCallback callback) → GestureDetector -
Available on Widget, provided by the UniversalUIGestureDetectorExtensions extension
callbackwhen a tap is performed. -
onTapWithInk(
VoidCallback callback) → InkWell -
Available on Widget, provided by the UniversalUIGestureDetectorExtensions extension
callbackwhen a tap is performed. -
opacity(
{required double opacity}) → Opacity -
Available on Widget, provided by the UniversalUIDecorationExtensions extension
Change the transparency of Widget toopacity. -
padding(
EdgeInsetsGeometry padding) → Padding -
Available on Widget, provided by the UniversalUIPaddingExtensions extension
Set Widget padding topadding. -
paddingLTRB(
double left, double top, double right, double bottom) → Padding -
Available on Widget, provided by the UniversalUIPaddingExtensions extension
Set the padding of Widget based onleft,top,right, andbottom. -
shadow(
{Color shadowColor = const Color(_kColorDefault), double blurRadius = 0.0, double spreadRadius = 0.0, Offset offset = Offset.zero, BlurStyle blurStyle = BlurStyle.normal}) → DecoratedBox -
Available on Widget, provided by the UniversalUIDecorationExtensions extension
Add shadow to Widget. -
sizeTo(
{double? width, double? height}) → SizedBox -
Available on Widget, provided by the UniversalUIClipExtensions extension
Set the size of the Widget towidthandheight. -
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