DefaultTextStyle クラス
子孫のTextへ既定のテキスト書式を伝播するInheritedWidgetです。
名前空間: FloatSoda.Widgets
アセンブリ: FloatSoda.dll
public sealed record DefaultTextStyle : InheritedWidget, IEquatable<Widget>, IEquatable<InheritedWidget>, IEquatable<DefaultTextStyle>object ← Widget ← InheritedWidget ← DefaultTextStyle
実装するインターフェイス
Section titled “実装するインターフェイス”IEquatable<Widget>, IEquatable<InheritedWidget>, IEquatable<DefaultTextStyle>
継承したメンバー
Section titled “継承したメンバー”InheritedWidget.Child, InheritedWidget.ScopeType, InheritedWidget.CreateElement(), InheritedWidget.UpdateShouldNotify(InheritedWidget), Widget.Key, Widget.CanUpdate(Widget, Widget), Widget.CreateElement(), Widget.GetHashCode(), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
配下のTextは、Styleで明示されなかったプロパティを この書式から継承します(明示指定 > DefaultTextStyle > フレームワークの既定値)。
子孫へ適用するテキスト書式を取得します。
public required TextStyle Style { get; init; }プロパティの値
Section titled “プロパティの値”Of(IBuildContext)
Section titled “Of(IBuildContext)”最も近い祖先のDefaultTextStyleを取得し、 呼び出し元をそのInheritedWidgetの依存対象として登録します。
public static DefaultTextStyle Of(IBuildContext context)パラメーター
Section titled “パラメーター”context IBuildContext
書式を要求するウィジェットのBuildContext。
最も近い祖先のDefaultTextStyle。 祖先に存在しない場合は、全プロパティが未指定の書式を持つフォールバックを返します。 フォールバックはウィジェットツリーへ組み込めません。
UpdateShouldNotify(InheritedWidget)
Section titled “UpdateShouldNotify(InheritedWidget)”テキスト書式が変更され、依存するElementの再ビルドが必要かを判定します。
public override bool UpdateShouldNotify(InheritedWidget oldWidget)パラメーター
Section titled “パラメーター”oldWidget InheritedWidget
更新前のInheritedWidget。
更新前のウィジェットがDefaultTextStyleであり、 Styleの値が変更された場合はtrue。 それ以外の場合はfalse。