opacity method

  1. @widgetFactory
Widget opacity(
  1. double opacity, {
  2. bool alwaysIncludeSemantics = false,
  3. bool sliver = false,
})

Applies opacity to this widget.

Implementation

@widgetFactory
Widget opacity(
  double opacity, {
  bool alwaysIncludeSemantics = false,
  bool sliver = false,
}) {
  if (sliver) {
    return FleetSliverOpacity(
      opacity: opacity,
      alwaysIncludeSemantics: alwaysIncludeSemantics,
      sliver: this,
    );
  } else {
    return FleetOpacity(
      opacity: opacity,
      alwaysIncludeSemantics: alwaysIncludeSemantics,
      child: this,
    );
  }
}