memoryPicWithFadeIn method

Widget memoryPicWithFadeIn({
  1. GlobalKey<State<StatefulWidget>>? gk,
  2. String? toolTip,
  3. required Uint8List bytes,
  4. Alignment alignment = Alignment.center,
  5. double? width,
  6. double? height,
  7. double padding = 20,
})

Implementation

Widget memoryPicWithFadeIn({GlobalKey? gk,
  String? toolTip,
  required Uint8List bytes,
  Alignment alignment = Alignment.center,
  double? width,
  double? height,
  double padding = 20}) =>
    Container(
      key: gk,
      padding: EdgeInsets.all(padding),
      alignment: alignment,
      width: width,
      height: height,
      child: toolTip == null
          ? FadeInImage(
        fadeInDuration: const Duration(milliseconds: 200),
        alignment: alignment,
        placeholder: const AssetImage(
            'lib/assets/images/loading-icon-256x256.png',
            package: 'flutter_callouts'),
        image: MemoryImage(bytes),
        width: width,
        height: height,
      )
          : Tooltip(
          message: toolTip,
          child: FadeInImage(
            fadeInDuration: const Duration(milliseconds: 200),
            alignment: alignment,
            placeholder: const AssetImage(
                'lib/assets/images/loading-icon-256x256.png',
                package: 'flutter_callouts'),
            image: MemoryImage(bytes),
            width: width,
            height: height,
          )),
    );