ButtonStyler class

Inheritance
Implemented types
Mixed-in types

Constructors

ButtonStyler({FlexBoxStyler? container, TextStyler? label, IconStyler? icon, SpinnerStyler? spinner, RemixBoxEffectsMix? containerEffects, RemixPlacement? iconAlignment, AnimationConfig? animation, WidgetModifierConfig? modifier, List<VariantStyle<ButtonSpec>>? variants})
ButtonStyler.alignment(AlignmentGeometry value)
factory
ButtonStyler.backgroundImage(ImageProvider<Object> image, {BoxFit? fit, AlignmentGeometry? alignment, ImageRepeat repeat = .noRepeat})
factory
ButtonStyler.backgroundImageAsset(String path, {BoxFit? fit, AlignmentGeometry? alignment, ImageRepeat repeat = .noRepeat})
factory
ButtonStyler.backgroundImageUrl(String url, {BoxFit? fit, AlignmentGeometry? alignment, ImageRepeat repeat = .noRepeat})
factory
ButtonStyler.border(BoxBorderMix<BoxBorder> value)
factory
ButtonStyler.borderRadius(BorderRadiusGeometryMix<BorderRadiusGeometry> value)
factory
ButtonStyler.clipBehavior(Clip value)
factory
ButtonStyler.color(Color value)
factory
ButtonStyler.column()
factory
ButtonStyler.constraints(BoxConstraintsMix value)
factory
ButtonStyler.container(FlexBoxStyler value)
factory
ButtonStyler.containerEffects(RemixBoxEffectsMix value)
factory
ButtonStyler.create({Prop<StyleSpec<FlexBoxSpec>>? container, Prop<StyleSpec<TextSpec>>? label, Prop<StyleSpec<IconSpec>>? icon, Prop<StyleSpec<SpinnerSpec>>? spinner, Prop<RemixBoxEffectsSpec>? containerEffects, Prop<RemixPlacement>? iconAlignment, List<VariantStyle<ButtonSpec>>? variants, WidgetModifierConfig? modifier, AnimationConfig? animation})
const
ButtonStyler.crossAxisAlignment(CrossAxisAlignment value)
factory
ButtonStyler.decoration(DecorationMix<Decoration> value)
factory
ButtonStyler.direction(Axis value)
factory
ButtonStyler.elevation(ElevationShadow value)
factory
ButtonStyler.foregroundDecoration(DecorationMix<Decoration> value)
factory
ButtonStyler.foregroundLinearGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? begin, AlignmentGeometry? end, TileMode? tileMode})
factory
ButtonStyler.foregroundRadialGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? center, double? radius, AlignmentGeometry? focal, double? focalRadius, TileMode? tileMode})
factory
ButtonStyler.foregroundSweepGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? center, double? startAngle, double? endAngle, TileMode? tileMode})
factory
ButtonStyler.gradient(GradientMix<Gradient> value)
factory
ButtonStyler.height(double value)
factory
ButtonStyler.icon(IconStyler value)
factory
ButtonStyler.iconAlignment(RemixPlacement value)
factory
ButtonStyler.image(DecorationImageMix value)
factory
ButtonStyler.label(TextStyler value)
factory
ButtonStyler.linearGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? begin, AlignmentGeometry? end, TileMode? tileMode})
factory
ButtonStyler.mainAxisAlignment(MainAxisAlignment value)
factory
ButtonStyler.mainAxisSize(MainAxisSize value)
factory
ButtonStyler.margin(EdgeInsetsGeometryMix<EdgeInsetsGeometry> value)
factory
ButtonStyler.maxHeight(double value)
factory
ButtonStyler.maxWidth(double value)
factory
ButtonStyler.minHeight(double value)
factory
ButtonStyler.minWidth(double value)
factory
ButtonStyler.padding(EdgeInsetsGeometryMix<EdgeInsetsGeometry> value)
factory
ButtonStyler.radialGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? center, double? radius, AlignmentGeometry? focal, double? focalRadius, TileMode? tileMode})
factory
ButtonStyler.rotate(double radians, {Alignment alignment = .center})
factory
ButtonStyler.row()
factory
ButtonStyler.scale(double scale, {Alignment alignment = .center})
factory
ButtonStyler.shadow(BoxShadowMix value)
factory
ButtonStyler.shadows(List<BoxShadowMix> value)
factory
ButtonStyler.shape(ShapeBorderMix<ShapeBorder> value)
factory
ButtonStyler.size(double width, double height)
factory
ButtonStyler.skew(double skewX, double skewY)
factory
ButtonStyler.spacing(double value)
factory
ButtonStyler.spinner(SpinnerStyler value)
factory
ButtonStyler.sweepGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? center, double? startAngle, double? endAngle, TileMode? tileMode})
factory
ButtonStyler.textBaseline(TextBaseline value)
factory
ButtonStyler.textDirection(TextDirection value)
factory
ButtonStyler.textStyle(TextStyler value)
factory
ButtonStyler.transform(Matrix4 value, {Alignment alignment = .center})
factory
ButtonStyler.translate(double x, double y, [double z = 0.0])
factory
ButtonStyler.verticalDirection(VerticalDirection value)
factory
ButtonStyler.width(double value)
factory

Properties

$animation → AnimationConfig?
finalinherited
$container → Prop<StyleSpec<FlexBoxSpec>>?
final
$containerEffects → Prop<RemixBoxEffectsSpec>?
final
$icon → Prop<StyleSpec<IconSpec>>?
final
$iconAlignment → Prop<RemixPlacement>?
final
$label → Prop<StyleSpec<TextSpec>>?
final
$modifier → WidgetModifierConfig?
finalinherited
$spinner → Prop<StyleSpec<SpinnerSpec>>?
final
$stylerFieldNames → Set<String>
Names of every field represented by the Styler's Mix.props.
no setteroverride
$variants → List<VariantStyle<ButtonSpec>>?
finalinherited
hashCode → int
Overrides the hash code getter to compute hash code based on properties.
no setterinherited
mergeKey → Object
Default implementation uses runtimeType as the merge key
no setterinherited
props → List<Object?>
The properties based on which equality and hash code are computed.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stringify → bool
Whether to use a detailed string representation of the object.
no setterinherited

Methods

alignment(AlignmentGeometry value) → ButtonStyler
animate(AnimationConfig value) → ButtonStyler
Sets the animation configuration.
override
applyVariants(Iterable<NamedVariant> variantsToApply) → ButtonStyler
Applies the specified named variants by merging their styles into this style.
inherited
backgroundImage(ImageProvider<Object> image, {BoxFit? fit, AlignmentGeometry? alignment, ImageRepeat repeat = .noRepeat}) → ButtonStyler
backgroundImageAsset(String path, {BoxFit? fit, AlignmentGeometry? alignment, ImageRepeat repeat = .noRepeat}) → ButtonStyler
backgroundImageUrl(String url, {BoxFit? fit, AlignmentGeometry? alignment, ImageRepeat repeat = .noRepeat}) → ButtonStyler
border(BoxBorderMix<BoxBorder> value) → ButtonStyler
override
borderRadius(BorderRadiusGeometryMix<BorderRadiusGeometry> value) → ButtonStyler
override
build(BuildContext context, {Set<NamedVariant> namedVariants = const {}}) → StyleSpec<ButtonSpec>
Builds the style into a fully resolved spec with metadata.
inherited
call({Key? key, required String label, IconData? leadingIcon, IconData? trailingIcon, RemixButtonTextBuilder? textBuilder, RemixButtonIconBuilder? leadingIconBuilder, RemixButtonIconBuilder? trailingIconBuilder, RemixButtonLoadingBuilder? loadingBuilder, bool loading = false, bool enabled = true, VoidCallback? onPressed, VoidCallback? onLongPress, FocusNode? focusNode, bool autofocus = false, bool enableFeedback = true, String? semanticLabel, String? semanticHint, bool excludeSemantics = false, MouseCursor mouseCursor = SystemMouseCursors.click}) → RemixButton
clipBehavior(Clip value) → ButtonStyler
color(Color value) → ButtonStyler
column() → ButtonStyler
constraints(BoxConstraintsMix value) → ButtonStyler
override
container(FlexBoxStyler value) → ButtonStyler
Sets the container.
containerEffects(RemixBoxEffectsMix value) → ButtonStyler
Sets the containerEffects.
crossAxisAlignment(CrossAxisAlignment value) → ButtonStyler
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
decoration(DecorationMix<Decoration> value) → ButtonStyler
override
direction(Axis value) → ButtonStyler
elevation(ElevationShadow value) → ButtonStyler
foregroundDecoration(DecorationMix<Decoration> value) → ButtonStyler
foregroundLinearGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? begin, AlignmentGeometry? end, TileMode? tileMode}) → ButtonStyler
foregroundRadialGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? center, double? radius, AlignmentGeometry? focal, double? focalRadius, TileMode? tileMode}) → ButtonStyler
foregroundSweepGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? center, double? startAngle, double? endAngle, TileMode? tileMode}) → ButtonStyler
getDiff(Equatable other) → Map<String, String>
Returns a map of properties that differ between this object and another.
inherited
gradient(GradientMix<Gradient> value) → ButtonStyler
height(double value) → ButtonStyler
icon(IconStyler value) → ButtonStyler
Sets the icon.
iconAlignment(RemixPlacement value) → ButtonStyler
Sets the iconAlignment.
iconBlendMode(BlendMode value) → ButtonStyler
Sets icon blend mode
inherited
iconColor(Color value) → ButtonStyler
Sets icon color
inherited
iconFill(double value) → ButtonStyler
Sets icon fill (useful for Material Icons filled variants)
inherited
iconGrade(double value) → ButtonStyler
Sets icon grade (useful for Material Icons)
inherited
iconOpacity(double value) → ButtonStyler
Sets icon opacity
inherited
iconOpticalSize(double value) → ButtonStyler
Sets icon optical size (useful for Material Icons)
inherited
iconShadow(ShadowMix value) → ButtonStyler
Sets single icon shadow
inherited
iconShadows(List<ShadowMix> value) → ButtonStyler
Sets icon shadows
inherited
iconSize(double value) → ButtonStyler
Sets icon size
inherited
iconTextDirection(TextDirection value) → ButtonStyler
Sets icon text direction
inherited
iconWeight(double value) → ButtonStyler
Sets icon weight (useful for variable icons like Material Symbols)
inherited
image(DecorationImageMix value) → ButtonStyler
keyframeAnimation({Listenable? trigger, required List<KeyframeTrack> timeline, required KeyframeStyleBuilder<ButtonSpec, ButtonStyler> styleBuilder}) → ButtonStyler
Creates a keyframe animation. It will animate through the given timeline.
inherited
label(TextStyler value) → ButtonStyler
Sets the label.
labelColor(Color value) → ButtonStyler
Sets label/text color
inherited
labelDecoration(TextDecoration value) → ButtonStyler
Sets label/text decoration (underline, strikethrough, etc.)
inherited
labelDecorationColor(Color value) → ButtonStyler
Sets label/text decoration color
inherited
labelFontFamily(String value) → ButtonStyler
Sets label/text font family
inherited
labelFontSize(double value) → ButtonStyler
Sets label/text font size
inherited
labelFontStyle(FontStyle value) → ButtonStyler
Sets label/text font style (italic/normal)
inherited
labelFontWeight(FontWeight value) → ButtonStyler
Sets label/text font weight
inherited
labelHeight(double value) → ButtonStyler
Sets label/text line height
inherited
labelLetterSpacing(double value) → ButtonStyler
Sets label/text letter spacing
inherited
labelStyle(TextStyleMix value) → ButtonStyler
Sets label/text style using TextStyleMix directly
inherited
labelWordSpacing(double value) → ButtonStyler
Sets label/text word spacing
inherited
linearGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? begin, AlignmentGeometry? end, TileMode? tileMode}) → ButtonStyler
mainAxisAlignment(MainAxisAlignment value) → ButtonStyler
mainAxisSize(MainAxisSize value) → ButtonStyler
margin(EdgeInsetsGeometryMix<EdgeInsetsGeometry> value) → ButtonStyler
override
maxHeight(double value) → ButtonStyler
maxWidth(double value) → ButtonStyler
merge(covariant ButtonStyler? other) → ButtonStyler
Merges with another ButtonStyler.
override
mergeActiveVariants(BuildContext context, {required Set<NamedVariant> namedVariants}) → Style<ButtonSpec>
Merges all active variants with their nested variants recursively.
inherited
minHeight(double value) → ButtonStyler
minWidth(double value) → ButtonStyler
modifier(WidgetModifierConfig value) → ButtonStyler
Sets the widget modifier.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAndroid(ButtonStyler style) → ButtonStyler
Creates a variant for Android platform.
inherited
onBreakpoint(Breakpoint breakpoint, ButtonStyler style) → ButtonStyler
Creates a variant based on the specified breakpoint.
inherited
onBuilder(ButtonStyler fn(BuildContext context)) → ButtonStyler
Creates a variant using a builder function that receives the build context.
inherited
onDark(ButtonStyler style) → ButtonStyler
Creates a variant for dark mode.
inherited
onDesktop(ButtonStyler style) → ButtonStyler
Creates a variant for desktop breakpoint.
inherited
onDisabled(ButtonStyler style) → ButtonStyler
Creates a variant for disabled state
inherited
onEnabled(ButtonStyler style) → ButtonStyler
Creates a variant for enabled state (opposite of disabled)
inherited
onFocused(ButtonStyler style) → ButtonStyler
Creates a variant for focused state.
inherited
onFocusVisible(ButtonStyler style) → ButtonStyler
Creates a variant for focus shown in Flutter's traditional highlight mode.
inherited
onFuchsia(ButtonStyler style) → ButtonStyler
Creates a variant for Fuchsia platform.
inherited
onHovered(ButtonStyler style) → ButtonStyler
Creates a variant for hover state
inherited
onIos(ButtonStyler style) → ButtonStyler
Creates a variant for iOS platform.
inherited
onLandscape(ButtonStyler style) → ButtonStyler
Creates a variant for landscape device orientation.
inherited
onLight(ButtonStyler style) → ButtonStyler
Creates a variant for light mode.
inherited
onLinux(ButtonStyler style) → ButtonStyler
Creates a variant for Linux platform.
inherited
onLtr(ButtonStyler style) → ButtonStyler
Creates a variant for left-to-right text direction.
inherited
onMacos(ButtonStyler style) → ButtonStyler
Creates a variant for macOS platform.
inherited
onMobile(ButtonStyler style) → ButtonStyler
Creates a variant for mobile breakpoint.
inherited
onNot(ContextVariant contextVariant, ButtonStyler style) → ButtonStyler
Creates a variant for when the context does NOT match the provided variant.
inherited
onPortrait(ButtonStyler style) → ButtonStyler
Creates a variant for portrait device orientation.
inherited
onPressed(ButtonStyler style) → ButtonStyler
Creates a variant for pressed state
inherited
onRtl(ButtonStyler style) → ButtonStyler
Creates a variant for right-to-left text direction.
inherited
onTablet(ButtonStyler style) → ButtonStyler
Creates a variant for tablet breakpoint.
inherited
onWeb(ButtonStyler style) → ButtonStyler
Creates a variant for web platform.
inherited
onWindows(ButtonStyler style) → ButtonStyler
Creates a variant for Windows platform.
inherited
padding(EdgeInsetsGeometryMix<EdgeInsetsGeometry> value) → ButtonStyler
override
phaseAnimation<P>({Listenable? trigger, required List<P> phases, required ButtonStyler styleBuilder(P phase, ButtonStyler style), required CurveAnimationConfig configBuilder(P phase)}) → ButtonStyler
Creates a phase animation. It will animate through the given phases.
inherited
radialGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? center, double? radius, AlignmentGeometry? focal, double? focalRadius, TileMode? tileMode}) → ButtonStyler
resolve(BuildContext context) → StyleSpec<ButtonSpec>
Resolves to StyleSpec<ButtonSpec> using context.
override
rotate(double radians, {Alignment alignment = .center}) → ButtonStyler
row() → ButtonStyler
scale(double scale, {Alignment alignment = .center}) → ButtonStyler
shadow(BoxShadowMix value) → ButtonStyler
shadows(List<BoxShadowMix> value) → ButtonStyler
shape(ShapeBorderMix<ShapeBorder> value) → ButtonStyler
override
size(double width, double height) → ButtonStyler
skew(double skewX, double skewY) → ButtonStyler
spacing(double value) → ButtonStyler
spinner(SpinnerStyler value) → ButtonStyler
Sets the spinner.
spinnerColor(Color value) → ButtonStyler
Sets an explicit spinner color instead of inherited current color.
inherited
spinnerDuration(Duration value) → ButtonStyler
Sets spinner animation duration
inherited
spinnerFast() → ButtonStyler
Sets spinner animation to fast (500ms)
inherited
spinnerIndicatorColor(Color value) → ButtonStyler
Sets the legacy circular-spinner indicator color.
inherited
spinnerLeafRadius(Radius value) → ButtonStyler
Sets each leaf's corner radius.
inherited
spinnerNormal() → ButtonStyler
Sets spinner animation to normal (1000ms)
inherited
spinnerOpacity(double value) → ButtonStyler
Sets the complete spinner opacity.
inherited
spinnerSize(double value) → ButtonStyler
Sets spinner size
inherited
spinnerSlow() → ButtonStyler
Sets spinner animation to slow (1500ms)
inherited
spinnerStrokeWidth(double value) → ButtonStyler
Sets the legacy circular-spinner indicator stroke width.
inherited
spinnerTrackColor(Color value) → ButtonStyler
Sets the legacy circular-spinner track color.
inherited
spinnerTrackStrokeWidth(double value) → ButtonStyler
Sets the legacy circular-spinner track stroke width.
inherited
sweepGradient({required List<Color> colors, List<double>? stops, AlignmentGeometry? center, double? startAngle, double? endAngle, TileMode? tileMode}) → ButtonStyler
textBaseline(TextBaseline value) → ButtonStyler
textDirection(TextDirection value) → ButtonStyler
textStyle(TextStyler value) → ButtonStyler
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
transform(Matrix4 value, {Alignment alignment = .center}) → ButtonStyler
override
translate(double x, double y, [double z = 0.0]) → ButtonStyler
variant(Variant variant, ButtonStyler style) → ButtonStyler
Must be implemented by the class using this mixin
inherited
variants(List<VariantStyle<ButtonSpec>> value) → ButtonStyler
Sets the style variants.
override
verticalDirection(VerticalDirection value) → ButtonStyler
width(double value) → ButtonStyler
wrap(WidgetModifierConfig value) → ButtonStyler
Wraps with a widget modifier.
override

Operators

operator ==(Object other) → bool
Overrides the equality operator to compare based on the properties.
inherited