PlaceholderSetting class

A display setting of PlaceholderText. Note that null fields will be filled with the corresponding fields in PlaceholderTextTheme.setting, if the field is still null, PlaceholderSetting.defaultSetting will be used instead.

Mixed in types

Constructors

PlaceholderSetting({bool? useAnimatedSwitcher, Duration? switchDuration, Duration? switchReverseDuration, Curve? switchInCurve, Curve? switchOutCurve, AnimatedSwitcherTransitionBuilder? switchTransitionBuilder, AnimatedSwitcherLayoutBuilder? switchLayoutBuilder, String? loadingText, String? nothingText, String? nothingRetryText, String? unknownErrorText, String? errorRetryText, IconData? nothingIcon, IconData? errorIcon, EdgeInsets? textPadding, EdgeInsets? iconPadding, EdgeInsets? buttonPadding, EdgeInsets? progressPadding, EdgeInsets? wholePaddingUnlessNormal, TextStyle? textStyle, int? textMaxLines, TextOverflow? textOverflow, TextStyle? buttonTextStyle, ButtonStyle? buttonStyle, double? iconSize, Color? iconColor, double? progressSize, double? progressStrokeWidth, bool? showLoadingProgress, bool? showLoadingText, bool? showNothingIcon, bool? showNothingText, bool? showNothingRetry, bool? showErrorIcon, bool? showErrorText, bool? showErrorRetry, PlaceholderWidgetBuilder? customLoadingProgressBuilder, PlaceholderWidgetBuilder? customLoadingTextBuilder, PlaceholderWidgetBuilder? customNothingIconBuilder, PlaceholderWidgetBuilder? customNothingTextBuilder, PlaceholderVoidCallbackWidgetBuilder? customNothingRetryBuilder, PlaceholderWidgetBuilder? customErrorIconBuilder, PlaceholderWidgetBuilder? customErrorTextBuilder, PlaceholderVoidCallbackWidgetBuilder? customErrorRetryBuilder, PlaceholderWidgetBuilderWidgetBuilder? customNormalStateBuilder, PlaceholderWidgetBuilderWidgetBuilder? customSwitcherBuilder})
const

Properties

buttonPadding EdgeInsets?
final
buttonStyle ButtonStyle?
final
buttonTextStyle TextStyle?
final
customErrorIconBuilder PlaceholderWidgetBuilder?
final
customErrorRetryBuilder PlaceholderVoidCallbackWidgetBuilder?
final
customErrorTextBuilder PlaceholderWidgetBuilder?
final
customLoadingProgressBuilder PlaceholderWidgetBuilder?
final
customLoadingTextBuilder PlaceholderWidgetBuilder?
final
customNormalStateBuilder PlaceholderWidgetBuilderWidgetBuilder?
final
customNothingIconBuilder PlaceholderWidgetBuilder?
final
customNothingRetryBuilder PlaceholderVoidCallbackWidgetBuilder?
final
customNothingTextBuilder PlaceholderWidgetBuilder?
final
customSwitcherBuilder PlaceholderWidgetBuilderWidgetBuilder?
final
errorIcon IconData?
final
errorRetryText String?
final
hashCode int
The hash code for this object.
no setteroverride
iconColor Color?
final
iconPadding EdgeInsets?
final
iconSize double?
final
loadingText String?
final
nothingIcon IconData?
final
nothingRetryText String?
final
nothingText String?
final
progressPadding EdgeInsets?
final
progressSize double?
final
progressStrokeWidth double?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showErrorIcon bool?
final
showErrorRetry bool?
final
showErrorText bool?
final
showLoadingProgress bool?
final
showLoadingText bool?
final
showNothingIcon bool?
final
showNothingRetry bool?
final
showNothingText bool?
final
switchDuration Duration?
final
switchInCurve Curve?
final
switchLayoutBuilder AnimatedSwitcherLayoutBuilder?
final
switchOutCurve Curve?
final
switchReverseDuration Duration?
final
switchTransitionBuilder AnimatedSwitcherTransitionBuilder?
final
textMaxLines int?
final
textOverflow TextOverflow?
final
textPadding EdgeInsets?
final
textStyle TextStyle?
final
unknownErrorText String?
final
useAnimatedSwitcher bool?
final
wholePaddingUnlessNormal EdgeInsets?
final

Methods

copyWith({bool? useAnimatedSwitcher, Duration? switchDuration, Duration? switchReverseDuration, Curve? switchInCurve, Curve? switchOutCurve, AnimatedSwitcherTransitionBuilder? switchTransitionBuilder, AnimatedSwitcherLayoutBuilder? switchLayoutBuilder, String? loadingText, String? nothingText, String? nothingRetryText, String? unknownErrorText, String? errorRetryText, IconData? nothingIcon, IconData? errorIcon, EdgeInsets? textPadding, EdgeInsets? iconPadding, EdgeInsets? buttonPadding, EdgeInsets? progressPadding, EdgeInsets? wholePaddingUnlessNormal, TextStyle? textStyle, int? textMaxLines, TextOverflow? textOverflow, TextStyle? buttonTextStyle, ButtonStyle? buttonStyle, double? iconSize, Color? iconColor, double? progressSize, double? progressStrokeWidth, bool? showLoadingProgress, bool? showLoadingText, bool? showNothingIcon, bool? showNothingText, bool? showNothingRetry, bool? showErrorIcon, bool? showErrorText, bool? showErrorRetry, PlaceholderWidgetBuilder? customLoadingProgressBuilder, PlaceholderWidgetBuilder? customLoadingTextBuilder, PlaceholderWidgetBuilder? customNothingIconBuilder, PlaceholderWidgetBuilder? customNothingTextBuilder, PlaceholderVoidCallbackWidgetBuilder? customNothingRetryBuilder, PlaceholderWidgetBuilder? customErrorIconBuilder, PlaceholderWidgetBuilder? customErrorTextBuilder, PlaceholderVoidCallbackWidgetBuilder? customErrorRetryBuilder, PlaceholderWidgetBuilderWidgetBuilder? customNormalStateBuilder, PlaceholderWidgetBuilderWidgetBuilder? customSwitcherBuilder}) PlaceholderSetting
Creates a copy of this value but with given fields replaced with the new values.
copyWithChinese({String loadingText = '加载中...', String nothingText = '无内容', String nothingRetryText = '重试', String unknownErrorText = '未知错误', String errorRetryText = '重试'}) PlaceholderSetting
Translates the current setting to Chinese and returns the new PlaceholderSetting.
copyWithJapanese({String loadingText = '読み込み中...', String nothingText = '何も見つかりませんでした', String nothingRetryText = '再試行', String unknownErrorText = '未知エラー', String errorRetryText = '再試行'}) PlaceholderSetting
Translates the current setting to Japanese and returns the new PlaceholderSetting.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
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
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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

Static Methods

defaultSetting(BuildContext context) PlaceholderSetting
Constructs and returns the default setting value, which will be used when some fields are null in both PlaceholderText.setting and PlaceholderTextTheme.setting.
merge(PlaceholderSetting data, PlaceholderSetting? fallback) PlaceholderSetting