Ejemplo n.º 1
0
        public override Widget build(BuildContext context)
        {
            ThemeData       theme       = Theme.of(context);
            ButtonThemeData buttonTheme = ButtonTheme.of(context);

            return(new RawMaterialButton(
                       onPressed: onPressed,
                       onLongPress: () => onLongPress?.Invoke(),
                       onHighlightChanged: onHighlightChanged,
                       fillColor: buttonTheme.getFillColor(this),
                       textStyle: theme.textTheme.button.copyWith(color: buttonTheme.getTextColor(this)),
                       focusColor: buttonTheme.getFocusColor(this),
                       hoverColor: buttonTheme.getHoverColor(this),
                       highlightColor: buttonTheme.getHighlightColor(this),
                       splashColor: buttonTheme.getSplashColor(this),
                       elevation: buttonTheme.getElevation(this),
                       focusElevation: buttonTheme.getFocusElevation(this),
                       hoverElevation: buttonTheme.getHoverElevation(this),
                       highlightElevation: buttonTheme.getHighlightElevation(this),
                       disabledElevation: buttonTheme.getDisabledElevation(this),
                       padding: buttonTheme.getPadding(this),
                       visualDensity: visualDensity ?? theme.visualDensity,
                       constraints: buttonTheme.getConstraints(this),
                       shape: buttonTheme.getShape(this),
                       clipBehavior: clipBehavior ?? Clip.none,
                       focusNode: focusNode,
                       autofocus: autofocus ?? false,
                       materialTapTargetSize: buttonTheme.getMaterialTapTargetSize(this),
                       animationDuration: buttonTheme.getAnimationDuration(this),
                       child: child
                       ));
        }
Ejemplo n.º 2
0
        public override Widget build(BuildContext context)
        {
            ButtonThemeData buttonTheme = ButtonTheme.of(context);

            return(new _OutlineButton(
                       onPressed: onPressed,
                       onLongPress: onLongPress,
                       brightness: buttonTheme.getBrightness(this),
                       textTheme: textTheme,
                       textColor: buttonTheme.getTextColor(this),
                       disabledTextColor: buttonTheme.getDisabledTextColor(this),
                       color: color,
                       focusColor: buttonTheme.getFocusColor(this),
                       hoverColor: buttonTheme.getHoverColor(this),
                       highlightColor: buttonTheme.getHighlightColor(this),
                       splashColor: buttonTheme.getSplashColor(this),
                       highlightElevation: buttonTheme.getHighlightElevation(this),
                       borderSide: borderSide,
                       disabledBorderColor: disabledBorderColor,
                       highlightedBorderColor: highlightedBorderColor ?? buttonTheme.colorScheme.primary,
                       padding: buttonTheme.getPadding(this),
                       visualDensity: visualDensity,
                       shape: buttonTheme.getShape(this),
                       clipBehavior: clipBehavior,
                       focusNode: focusNode,
                       child: child
                       ));
        }
Ejemplo n.º 3
0
        public override Widget build(BuildContext context)
        {
            ButtonThemeData buttonTheme = ButtonTheme.of(context);

            return(new _OutlineButton(
                       onPressed: this.onPressed,
                       brightness: buttonTheme.getBrightness(this),
                       textTheme: this.textTheme,
                       textColor: buttonTheme.getTextColor(this),
                       disabledTextColor: buttonTheme.getDisabledTextColor(this),
                       color: this.color,
                       highlightColor: buttonTheme.getHighlightColor(this),
                       splashColor: buttonTheme.getSplashColor(this),
                       highlightElevation: buttonTheme.getHighlightElevation(this),
                       borderSide: this.borderSide,
                       disabledBorderColor: this.disabledBorderColor,
                       highlightedBorderColor: this.highlightedBorderColor ?? buttonTheme.colorScheme.primary,
                       padding: buttonTheme.getPadding(this),
                       shape: buttonTheme.getShape(this),
                       clipBehavior: this.clipBehavior,
                       child: this.child
                       ));
        }
Ejemplo n.º 4
0
        public override Widget build(BuildContext context)
        {
            ThemeData       theme       = Theme.of(context);
            ButtonThemeData buttonTheme = ButtonTheme.of(context);

            return(new RawMaterialButton(
                       onPressed: this.onPressed,
                       fillColor: this.color,
                       textStyle: theme.textTheme.button.copyWith(color: buttonTheme.getTextColor(this)),
                       highlightColor: this.highlightColor ?? theme.highlightColor,
                       splashColor: this.splashColor ?? theme.splashColor,
                       elevation: buttonTheme.getElevation(this),
                       highlightElevation: buttonTheme.getHighlightElevation(this),
                       padding: buttonTheme.getPadding(this),
                       constraints: buttonTheme.getConstraints(this).copyWith(
                           minWidth: this.minWidth,
                           minHeight: this.height),
                       shape: buttonTheme.shape,
                       clipBehavior: this.clipBehavior ?? Clip.none,
                       animationDuration: buttonTheme.getAnimationDuration(this),
                       child: this.child,
                       materialTapTargetSize: this.materialTapTargetSize ?? theme.materialTapTargetSize));
        }
Ejemplo n.º 5
0
        public override Widget build(BuildContext context)
        {
            ThemeData       theme       = Theme.of(context);
            ButtonThemeData buttonTheme = ButtonTheme.of(context);

            return(new RawMaterialButton(
                       onPressed: this.onPressed,
                       onHighlightChanged: this.onHighlightChanged,
                       clipBehavior: this.clipBehavior ?? Clip.none,
                       fillColor: buttonTheme.getFillColor(this),
                       textStyle: theme.textTheme.button.copyWith(color: buttonTheme.getTextColor(this)),
                       highlightColor: buttonTheme.getHighlightColor(this),
                       splashColor: buttonTheme.getSplashColor(this),
                       elevation: buttonTheme.getElevation(this),
                       highlightElevation: buttonTheme.getHighlightElevation(this),
                       disabledElevation: buttonTheme.getDisabledElevation(this),
                       padding: buttonTheme.getPadding(this),
                       constraints: buttonTheme.getConstraints(this),
                       shape: buttonTheme.getShape(this),
                       animationDuration: buttonTheme.getAnimationDuration(this),
                       materialTapTargetSize: buttonTheme.getMaterialTapTargetSize(this),
                       child: this.child
                       ));
        }