mirrored_repositories/Dock-Chat/lib
import 'package:flutter/material.dart';
import 'package:photo_view/photo_view.dart';

class FullPhoto extends StatelessWidget {
  final String url;

  const FullPhoto({Key key, this.url}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).primaryColor,
        iconTheme: IconThemeData(
          color: Colors.white,
        
        ),
        title: Text('Full Image',style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold),
      ),
      centerTitle: true,
      ),
      body: FullPhotoScreen(url:url),
    );
  }
}

class FullPhotoScreen extends StatefulWidget {
  final String url;

  FullPhotoScreen({Key key, this.url}) : super(key: key);
  
  @override
  State createState() => FullPhotoScreenState(url:url);
}

class FullPhotoScreenState extends State<FullPhotoScreen> {
   final String url;

  FullPhotoScreenState({this.url});

 

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Hero(
      tag:"hero",
          child: Container(
        child: PhotoView(imageProvider: NetworkImage(url)),
      ),
    );

  }
}
