opacity method

Future<void> opacity(
  1. double? opacity
)

Sets the opacity on the widget to hide it or show it for golden image tests.

Implementation

Future<void> opacity(double? opacity) async {
  _opacity = opacity ?? 0;
  if (mounted == true) {
    setState(() {});
    await Future.delayed(Duration(milliseconds: 300));
  }
}