Container クラス
装飾、寸法、配置、および変換を組み合わせる便利なウィジェットです。
名前空間: FloatSoda.Widgets.Layout
アセンブリ: FloatSoda.dll
public record Container : StatelessWidget, IEquatable<Widget>, IEquatable<StatelessWidget>, IEquatable<Container>object ← Widget ← StatelessWidget ← Container
実装するインターフェイス
Section titled “実装するインターフェイス”IEquatable<Widget>, IEquatable<StatelessWidget>, IEquatable<Container>
継承したメンバー
Section titled “継承したメンバー”StatelessWidget.CreateElement(), StatelessWidget.Build(IBuildContext), Widget.Key, Widget.CanUpdate(Widget, Widget), Widget.CreateElement(), Widget.GetHashCode(), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
FlutterのContainerと同様に、内側から配置、余白、装飾、寸法制約、変換の順で合成します。
Alignment
Section titled “Alignment”子ウィジェットをコンテナー内へ配置する基準位置を取得します。 nullの場合、配置ウィジェットを追加しません。
public Alignment? Alignment { get; init; }プロパティの値
Section titled “プロパティの値”コンテナー内へ配置する子ウィジェットを取得します。
public Widget? Child { get; init; }プロパティの値
Section titled “プロパティの値”背景へ描画する単色を取得します。 nullの場合、単色の背景を追加しません。
public Color? Color { get; init; }プロパティの値
Section titled “プロパティの値”Decorationと同時には指定できません。
Decoration
Section titled “Decoration”背景へ描画するボックス装飾を取得します。 nullの場合、装飾を追加しません。
public BoxDecoration? Decoration { get; init; }プロパティの値
Section titled “プロパティの値”Colorと同時には指定できません。
Height
Section titled “Height”コンテナーの高さを論理ピクセル単位で取得します。 nullの場合、高さを固定しません。
public double? Height { get; init; }プロパティの値
Section titled “プロパティの値”Padding
Section titled “Padding”装飾の内側で子ウィジェットの周囲へ確保する余白を取得します。 nullの場合、指定による余白を追加しません。
public EdgeInsets? Padding { get; init; }プロパティの値
Section titled “プロパティの値”DecorationにBorderがある場合、各辺のボーダーの太さをこの余白に加算します。 そのため、余白を省略しても子ウィジェットはボーダーの内側に収まります。
Transform
Section titled “Transform”レイアウト後のコンテナーへ適用する2次元変換を取得します。 nullの場合、変換ウィジェットを追加しません。
public Matrix3x2? Transform { get; init; }プロパティの値
Section titled “プロパティの値”TransformAlignment
Section titled “TransformAlignment”Transformの変換原点をボックス内で決める配置を取得します。
public Alignment? TransformAlignment { get; init; }プロパティの値
Section titled “プロパティの値”コンテナーの幅を論理ピクセル単位で取得します。 nullの場合、幅を固定しません。
public double? Width { get; init; }プロパティの値
Section titled “プロパティの値”Build(IBuildContext)
Section titled “Build(IBuildContext)”現在の構成から、このウィジェットの直下に配置するウィジェットを構築します。
public override Widget Build(IBuildContext context)パラメーター
Section titled “パラメーター”context IBuildContext
このウィジェットが配置されている構築コンテキスト。
このウィジェットの直下に配置するウィジェット。