|
|
|
@ -177,36 +177,37 @@ Widget _menuOptionsForReadonlyImage( |
|
|
|
|
onTap: () { |
|
|
|
|
showDialog( |
|
|
|
|
context: context, |
|
|
|
|
builder: (context) => Padding( |
|
|
|
|
padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), |
|
|
|
|
child: SimpleDialog( |
|
|
|
|
shape: const RoundedRectangleBorder( |
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10))), |
|
|
|
|
children: [ |
|
|
|
|
_SimpleDialogItem( |
|
|
|
|
icon: Icons.save, |
|
|
|
|
color: Colors.greenAccent, |
|
|
|
|
text: 'Save'.i18n, |
|
|
|
|
onPressed: () { |
|
|
|
|
GallerySaver.saveImage(imageUrl).then((_) => |
|
|
|
|
ScaffoldMessenger.of(context).showSnackBar( |
|
|
|
|
SnackBar(content: Text('Saved'.i18n)))); |
|
|
|
|
}, |
|
|
|
|
), |
|
|
|
|
_SimpleDialogItem( |
|
|
|
|
icon: Icons.zoom_in, |
|
|
|
|
color: Colors.cyanAccent, |
|
|
|
|
text: 'Zoom'.i18n, |
|
|
|
|
onPressed: () { |
|
|
|
|
Navigator.push( |
|
|
|
|
context, |
|
|
|
|
MaterialPageRoute( |
|
|
|
|
builder: (context) => |
|
|
|
|
ImageTapWrapper(imageUrl: imageUrl))); |
|
|
|
|
}, |
|
|
|
|
) |
|
|
|
|
]), |
|
|
|
|
)); |
|
|
|
|
builder: (context) { |
|
|
|
|
final saveOption = _SimpleDialogItem( |
|
|
|
|
icon: Icons.save, |
|
|
|
|
color: Colors.greenAccent, |
|
|
|
|
text: 'Save'.i18n, |
|
|
|
|
onPressed: () { |
|
|
|
|
GallerySaver.saveImage(imageUrl).then((_) => |
|
|
|
|
ScaffoldMessenger.of(context) |
|
|
|
|
.showSnackBar(SnackBar(content: Text('Saved'.i18n)))); |
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
final zoomOption = _SimpleDialogItem( |
|
|
|
|
icon: Icons.zoom_in, |
|
|
|
|
color: Colors.cyanAccent, |
|
|
|
|
text: 'Zoom'.i18n, |
|
|
|
|
onPressed: () { |
|
|
|
|
Navigator.push( |
|
|
|
|
context, |
|
|
|
|
MaterialPageRoute( |
|
|
|
|
builder: (context) => |
|
|
|
|
ImageTapWrapper(imageUrl: imageUrl))); |
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
return Padding( |
|
|
|
|
padding: const EdgeInsets.fromLTRB(50, 0, 50, 0), |
|
|
|
|
child: SimpleDialog( |
|
|
|
|
shape: const RoundedRectangleBorder( |
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10))), |
|
|
|
|
children: [saveOption, zoomOption]), |
|
|
|
|
); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: image); |
|
|
|
|
} |
|
|
|
|