remove share and change position of download
This commit is contained in:
@@ -66,6 +66,8 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
width: 50,
|
width: 50,
|
||||||
height: 50,
|
height: 50,
|
||||||
child: IconButton.filled(
|
child: IconButton.filled(
|
||||||
|
iconSize: 35,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context).pushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
'/file-veiwer',
|
'/file-veiwer',
|
||||||
@@ -78,7 +80,6 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.fullscreen,
|
Icons.fullscreen,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
size: 35,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -88,6 +89,8 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
width: 50,
|
width: 50,
|
||||||
height: 50,
|
height: 50,
|
||||||
child: IconButton.filled(
|
child: IconButton.filled(
|
||||||
|
iconSize: 35,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
html.window.open(
|
html.window.open(
|
||||||
widget.link,
|
widget.link,
|
||||||
@@ -97,7 +100,6 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.download,
|
Icons.download,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
size: 35,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -124,6 +126,8 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
width: 50,
|
width: 50,
|
||||||
height: 50,
|
height: 50,
|
||||||
child: IconButton.filled(
|
child: IconButton.filled(
|
||||||
|
iconSize: 35,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
//expandImage(width, height);
|
//expandImage(width, height);
|
||||||
Navigator.of(context).pushNamed(
|
Navigator.of(context).pushNamed(
|
||||||
@@ -137,7 +141,6 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.fullscreen,
|
Icons.fullscreen,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
size: 35,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -147,6 +150,8 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
width: 50,
|
width: 50,
|
||||||
height: 50,
|
height: 50,
|
||||||
child: IconButton.filled(
|
child: IconButton.filled(
|
||||||
|
iconSize: 35,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
html.window.open(
|
html.window.open(
|
||||||
widget.link,
|
widget.link,
|
||||||
@@ -156,7 +161,6 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.download,
|
Icons.download,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
size: 35,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ class _FullScreenFileViewerState extends State<FullScreenFileViewer> {
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: isPDF,
|
visible: isPDF,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
|
iconSize: 30,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
pdfViewerController.previousPage();
|
pdfViewerController.previousPage();
|
||||||
//print(pdfViewerController.);
|
//print(pdfViewerController.);
|
||||||
@@ -102,7 +104,6 @@ class _FullScreenFileViewerState extends State<FullScreenFileViewer> {
|
|||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.arrow_back,
|
Icons.arrow_back,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
size: 35,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -116,6 +117,8 @@ class _FullScreenFileViewerState extends State<FullScreenFileViewer> {
|
|||||||
Visibility(
|
Visibility(
|
||||||
visible: isPDF,
|
visible: isPDF,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
|
iconSize: 30,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
pdfViewerController.nextPage();
|
pdfViewerController.nextPage();
|
||||||
//print(pdfViewerController.pageNumber);
|
//print(pdfViewerController.pageNumber);
|
||||||
@@ -128,13 +131,14 @@ class _FullScreenFileViewerState extends State<FullScreenFileViewer> {
|
|||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.arrow_forward,
|
Icons.arrow_forward,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
size: 35,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: isPDF,
|
visible: isPDF,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
|
iconSize: 30,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (zoomOut > 0) {
|
if (zoomOut > 0) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -150,13 +154,14 @@ class _FullScreenFileViewerState extends State<FullScreenFileViewer> {
|
|||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.zoom_in,
|
Icons.zoom_in,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
size: 35,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: isPDF,
|
visible: isPDF,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
|
iconSize: 30,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (pdfViewerController.zoomLevel > 1) {
|
if (pdfViewerController.zoomLevel > 1) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -174,46 +179,37 @@ class _FullScreenFileViewerState extends State<FullScreenFileViewer> {
|
|||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.zoom_out,
|
Icons.zoom_out,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
size: 35,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: isPDF,
|
visible: isPDF,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
|
iconSize: 30,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
printDocument();
|
printDocument();
|
||||||
},
|
},
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.print,
|
Icons.print,
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
size: 35,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
IconButton(
|
// IconButton(
|
||||||
onPressed: () {
|
// iconSize: 30,
|
||||||
html.window.open(
|
// padding: const EdgeInsets.all(0),
|
||||||
widget.arguments.link,
|
// onPressed: () {
|
||||||
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
// html.window.open(
|
||||||
'download');
|
// widget.arguments.link,
|
||||||
},
|
// // '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||||
icon: Icon(
|
// 'download');
|
||||||
Icons.download,
|
// },
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
// icon: Icon(
|
||||||
size: 35,
|
// Icons.download,
|
||||||
),
|
// color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
),
|
// ),
|
||||||
IconButton(
|
// ),
|
||||||
onPressed: () {
|
|
||||||
shareDocument();
|
|
||||||
},
|
|
||||||
icon: Icon(
|
|
||||||
Icons.share,
|
|
||||||
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
|
||||||
size: 35,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -258,7 +254,33 @@ class _FullScreenFileViewerState extends State<FullScreenFileViewer> {
|
|||||||
}
|
}
|
||||||
return MIHBody(
|
return MIHBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
bodyItems: [fileViewer],
|
bodyItems: [
|
||||||
|
Stack(
|
||||||
|
children: [
|
||||||
|
Expanded(child: fileViewer),
|
||||||
|
Positioned(
|
||||||
|
bottom: 5,
|
||||||
|
right: 5,
|
||||||
|
width: 50,
|
||||||
|
height: 50,
|
||||||
|
child: IconButton.filled(
|
||||||
|
iconSize: 35,
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
|
onPressed: () {
|
||||||
|
html.window.open(
|
||||||
|
widget.arguments.link,
|
||||||
|
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||||
|
'download');
|
||||||
|
},
|
||||||
|
icon: Icon(
|
||||||
|
Icons.download,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user