Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added PhotoView for Product thumbnail and attachments
- Loading branch information
1 parent
e917fa9
commit fdeb41a
Showing
6 changed files
with
104 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:photo_view/photo_view.dart'; | ||
|
||
class HeroPhotoViewWrapper extends StatelessWidget { | ||
final ImageProvider imageProvider; | ||
final Widget loadingChild; | ||
final String heroTag; | ||
final dynamic minScale; | ||
final dynamic maxScale; | ||
|
||
const HeroPhotoViewWrapper( | ||
{this.imageProvider, | ||
this.loadingChild, | ||
this.heroTag, | ||
this.minScale, | ||
this.maxScale}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
appBar: AppBar( | ||
backgroundColor: Colors.black87, | ||
), | ||
body: Container( | ||
constraints: BoxConstraints.expand( | ||
height: MediaQuery.of(context).size.height, | ||
), | ||
child: new PhotoView( | ||
imageProvider: imageProvider, | ||
loadingChild: loadingChild, | ||
backgroundColor: Colors.black, | ||
minScale: minScale, | ||
maxScale: maxScale, | ||
heroTag: heroTag, | ||
), | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters