Skip to content

Instantly share code, notes, and snippets.

@Ayush783
Created November 7, 2020 22:08
Show Gist options
  • Save Ayush783/6f183821614e0aaeac987e1fa2b6a7b0 to your computer and use it in GitHub Desktop.
Save Ayush783/6f183821614e0aaeac987e1fa2b6a7b0 to your computer and use it in GitHub Desktop.
class CapturedImage {
final File image;
final String error;
CapturedImage(this.image, this.error);
CapturedImage.fromFile(File file)
: image = file,
error = '';
CapturedImage.fromError(String error)
: image = File(''),
error = error;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment