Created
April 23, 2020 18:00
-
-
Save sahil280114/8d3bbaba0ab0315d7e90d6c0858fd12b to your computer and use it in GitHub Desktop.
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
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Center( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: <Widget>[ | |
imageURI == null | |
? Text('No image selected.') | |
: Image.file(imageURI, width: 300, height: 200, fit: BoxFit.cover), | |
Container( | |
margin: EdgeInsets.fromLTRB(0, 30, 0, 20), | |
child: RaisedButton( | |
onPressed: () => getImageFromCamera(), | |
child: Text('Click Here To Select Image From Camera'), | |
textColor: Colors.white, | |
color: Colors.blue, | |
padding: EdgeInsets.fromLTRB(12, 12, 12, 12), | |
)), | |
Container( | |
margin: EdgeInsets.fromLTRB(0, 0, 0, 0), | |
child: RaisedButton( | |
onPressed: () => getImageFromGallery(), | |
child: Text('Click Here To Select Image From Gallery'), | |
textColor: Colors.white, | |
color: Colors.blue, | |
padding: EdgeInsets.fromLTRB(12, 12, 12, 12), | |
)), | |
Container( | |
margin: EdgeInsets.fromLTRB(0, 30, 0, 20), | |
child: RaisedButton( | |
onPressed: () => classifyImage(), | |
child: Text('Classify Image'), | |
textColor: Colors.white, | |
color: Colors.blue, | |
padding: EdgeInsets.fromLTRB(12, 12, 12, 12), | |
)), | |
result == null | |
? Text('Result') | |
: Text(result) | |
])) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment