update invoice

This commit is contained in:
PhyoThandar
2020-10-16 21:38:39 +06:30
parent ad7d0039fc
commit 274c999959
18 changed files with 658 additions and 398 deletions

View File

@@ -8,7 +8,9 @@ class ShowImage extends StatefulWidget {
final String url;
final File imageFile;
final String fileName;
const ShowImage({Key key, this.imageFile, this.fileName, this.url})
final String localImage;
const ShowImage(
{Key key, this.imageFile, this.fileName, this.url, this.localImage})
: super(key: key);
@override
_ShowImageState createState() => _ShowImageState();
@@ -20,16 +22,17 @@ class _ShowImageState extends State<ShowImage> {
return Scaffold(
appBar: AppBar(
backgroundColor: primaryColor,
title: Text(widget.fileName),
title: Text(widget.fileName, style: TextStyle(color: Colors.white)),
iconTheme: new IconThemeData(color: Colors.white),
),
body: Center(
child: widget.url != null || widget.imageFile != null
? PhotoView(
imageProvider: widget.url != null
? NetworkImage(widget.url)
: FileImage(widget.imageFile),
minScale: PhotoViewComputedScale.contained * 1)
: Container()),
child: PhotoView(
imageProvider: widget.url != null
? NetworkImage(widget.url)
: widget.imageFile != null
? FileImage(widget.imageFile)
: AssetImage(widget.localImage),
minScale: PhotoViewComputedScale.contained * 1)),
);
}
}