buildBody method

Widget buildBody(
  1. AdResponse response
)

Implementation

Widget buildBody(AdResponse response) {
  if (response.script case var script?) {
    // All code within this block treats `script` as non-nullable.
    return Center(
      child: web.createWebViewWidget(script)//WebViewWidget(script: script),
    );
  } else {
    Log(tag).i("Image URL ${response.imagePath}");
    return Center(
        child: Stack(
          children: [
            Image.network(response.imagePath ?? ""),
            // web.createWebViewWidget("<img src=${response.imagePath} >"),
            FixGestureDetector(margin: const EdgeInsets.fromLTRB(0, 0, 0, 0), bgColor: Colors.transparent, text: "", size: 8, tap: () {
              onImageTapped(response);
            },
            ),
          ],
        )
    );
  }
}