import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:get/get.dart';
import 'package:traderscircuit/Utils/text.dart';

import '../view/onBoarding/splashScreen1.dart';
import 'Common/CommonAppBar.dart';

class ImagePreviewScreen extends StatefulWidget {
  const ImagePreviewScreen({super.key});

  @override
  State<ImagePreviewScreen> createState() => _ImagePreviewScreenState();
}

class _ImagePreviewScreenState extends State<ImagePreviewScreen> {
  String image = Get.arguments["image"];
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: CommonAppbar(
          height: 75,
          titleTxt: "",
          customActionWidget: text16W400(""),
        ),
        backgroundColor: Colors.black,
        extendBody: true,
        body: Stack(children: [
          const CommonBlurLeft(),
          const CommonBlurRight(),
          Stack(children: [
            SingleChildScrollView(
                child: Padding(
                    padding: const EdgeInsets.symmetric(
                        horizontal: 18, vertical: 16),
                    child: Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          text25W600("Image Preview"),
                          const Gap(20),
                          CachedNetworkImage(
                            imageUrl: image,
                            placeholder: (context, url) {
                              return Center(
                                child: CircularProgressIndicator(
                                  color: Colors.redAccent,
                                ),
                              );
                            },
                          )
                        ])))
          ])
        ]));
  }
}
