showUrl static method

void showUrl(
  1. String url, {
  2. Object? tag,
  3. Map<String, String>? header,
  4. Color? backgroundColor,
})

Implementation

static void showUrl(
  String url, {
  Object? tag,
  Map<String, String>? header,
  Color? backgroundColor,
}) {
  Navigator.push(
    Get.context!,
    PageRouteBuilder(
      opaque: false,
      barrierColor: Colors.white.withOpacity(0),
      pageBuilder: (BuildContext context, _, __) {
        return FullScreenViewer(
          tag: tag ?? UniqueKey(),
          backgroundColor: backgroundColor ?? Colors.black,
          disableSwipeToDismiss: false,
          child: Image(
            image: Image.network(url, headers: header).image,
          ),
        );
      },
    ),
  );
}