This repository has been archived by the owner on Jan 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(capture): check if camera is available before trying to capture
On some devices (desktop, web, iOS emulators) camera can be unavailable, and the app display a verbose error. With this feature, we display an error for the User, and the way to return the Home page (thanks to the Scaffold).
- Loading branch information
Showing
3 changed files
with
171 additions
and
181 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:flutter/material.dart'; | ||
|
||
const MaterialColor DEFAULT_COLOR = Colors.indigo; | ||
const String API_HOSTNAME = '10.0.2.2:5000'; | ||
const bool API_IS_HTTPS = false; | ||
String API_HOSTNAME = Platform.isAndroid ? '10.0.2.2:5000' : '0.0.0.0:5000'; | ||
const bool API_IS_HTTPS = false; |
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
Oops, something went wrong.