import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:photo_view/photo_view.dart';

class DetailImageClicked extends StatelessWidget {
  String? imageUrl;
  DetailImageClicked(this.imageUrl);
  @override
  Widget build(BuildContext context) {
    return Container(
      color: Colors.grey,
      child: SafeArea(

        child: Stack(
          children: [
            Positioned(
              child: Container(
                  child: PhotoView(
                    imageProvider: CachedNetworkImageProvider(
                      imageUrl!
                    ),
                  )
              ),
            ),
            Positioned(
                top: 12,
                left: 8,
                child: GestureDetector(
                    onTap: () => Navigator.pop(context),
                    child: Icon(Icons.arrow_back, color: Colors.white, size: 30,))),
          ],
        ),
      ),
    );
  }
}
