FancyFlatButton constructor

const FancyFlatButton(
  1. {Key key,
  2. bool isEnabled,
  3. @required VoidCallback onPressed,
  4. @required Widget child,
  5. bool isLoading: false,
  6. Widget loadingChild,
  7. Color textColor,
  8. Color color,
  9. ShapeBorder shape}

Creates a FlatButton.

Use isEnabled to avoid ternary statements for onPressed — you can disable the button with:

  • isEnabled: false or
  • onPressed: null

child and isLoading must not be null.


const FancyFlatButton({
  Key key,
  bool isEnabled,
  @required VoidCallback onPressed,
  @required Widget child,
  bool isLoading = false,
  Widget loadingChild,
  Color textColor,
  Color color,
  ShapeBorder shape,
}) : super(
        key: key,
        isEnabled: isEnabled,
        onPressed: onPressed,
        child: child,
        isLoading: isLoading,
        loadingChild: loadingChild,
        textColor: textColor,
        color: color,
        shape: shape,