wrapScreen static method

Widget wrapScreen({
  1. required Widget child,
  2. bool? showButton,
  3. AlignmentGeometry? buttonPosition,
  4. Color? buttonColor,
  5. ShareMode? overrideShareMode,
})

Create a widget that wraps the entire app with screenshot capture functionality

Implementation

static Widget wrapScreen({
  required Widget child,
  bool? showButton,
  AlignmentGeometry? buttonPosition,
  Color? buttonColor,
  ShareMode? overrideShareMode,
}) {
  final config = ScreenshotConfig();

  return ScreenshotWrapper(
    mostrarBotao: showButton ?? config.shouldShowButtons,
    posicaoBotao: buttonPosition ?? Alignment.bottomRight,
    corBotao: buttonColor ?? Colors.red.withOpacity(0.7),
    shareMode: overrideShareMode ?? config.shareMode,
    child: child,
  );
}