Created
July 23, 2018 01:32
-
-
Save barbswatanabe/b1c07d71f6b00d247b105148c616fd91 to your computer and use it in GitHub Desktop.
Zoom with drag and drop - Flutter
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
... | |
class _MyHomePageState extends State<MyHomePage> { | |
File _image; | |
@override | |
Widget build(BuildContext context) { | |
return new Scaffold( | |
appBar: new AppBar( | |
title: new Text(widget.title), | |
), | |
body: new Stack( | |
children: <Widget>[ | |
new Container( | |
child: _image == null ? null : new Image.file(_image), | |
), | |
new Positioned( | |
bottom: 15.0, | |
left: 15.0, | |
child: new FloatingActionButton( | |
onPressed: _initGallery, | |
child: new Icon(Icons.collections), | |
), | |
), | |
], | |
), | |
floatingActionButton: new FloatingActionButton( | |
onPressed: _initCamera, | |
child: new Icon(Icons.camera_alt), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment