Widget クラス
UI要素の構成を宣言する不変なオブジェクトの基底型です。 Elementツリーの作成と更新に必要な構成情報を保持します。
名前空間: FloatSoda.Widgets
アセンブリ: FloatSoda.dll
public abstract record Widget : IEquatable<Widget>InheritedWidget, ProxyWidget, RenderObjectWidget<T>, StatefulWidget<T>, StatelessWidget
実装するインターフェイス
Section titled “実装するインターフェイス”継承したメンバー
Section titled “継承したメンバー”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Elementツリーの差分更新で、このウィジェットを識別するキーを取得します。 キーを指定しない場合は、同じ位置にある同一ランタイム型のウィジェットを更新対象として再利用できます。
public IKey? Key { get; init; }プロパティの値
Section titled “プロパティの値”IKey?
CanUpdate(Widget, Widget)
Section titled “CanUpdate(Widget, Widget)”既存のElementを維持したまま、古いウィジェットを新しいウィジェットで更新できるかを判定します。
public static bool CanUpdate(Widget oldWidget, Widget newWidget)パラメーター
Section titled “パラメーター”oldWidget Widget
既存のElementに現在関連付けられているウィジェット。
newWidget Widget
同じ位置へ新たに配置するウィジェット。
両方のランタイム型が同一で、かつKeyが等しい場合はtrue。 それ以外の場合はfalse。
CreateElement()
Section titled “CreateElement()”このウィジェットの構成をElementツリーへ反映するElementを生成します。
public abstract Element CreateElement()このウィジェットに対応する未マウントのElement。
GetHashCode()
Section titled “GetHashCode()”Serves as the default hash function.
public override int GetHashCode()A hash code for the current object.