Add camera dart
This commit is contained in:
parent
26372368b2
commit
413807f039
@ -46,7 +46,7 @@
|
|||||||
"edit_email": "Edit email address",
|
"edit_email": "Edit email address",
|
||||||
"birth_date": "Birth date",
|
"birth_date": "Birth date",
|
||||||
"edit_birth": "Edit birth date",
|
"edit_birth": "Edit birth date",
|
||||||
"create_profile_button": "Create profile"
|
"create_profile_button": "Create profile",
|
||||||
|
"take_picture": "Take a picture"
|
||||||
|
|
||||||
}
|
}
|
@ -46,6 +46,6 @@
|
|||||||
"edit_email": "Modifier l'email",
|
"edit_email": "Modifier l'email",
|
||||||
"birth_date": "Date de naissance",
|
"birth_date": "Date de naissance",
|
||||||
"edit_birth": "Modifier la date de naissance",
|
"edit_birth": "Modifier la date de naissance",
|
||||||
"create_profile_button": "Créer le profil"
|
"create_profile_button": "Créer le profil",
|
||||||
|
"take_picture": "Take a picture"
|
||||||
}
|
}
|
@ -7,6 +7,10 @@ import 'DisplayPictureScreen.dart';
|
|||||||
import 'package:camera/camera.dart';
|
import 'package:camera/camera.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../classes/auth_service.dart';
|
import '../classes/auth_service.dart';
|
||||||
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
|
import '../locale_provider.dart'; // Créé plus loin
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
// Ensure that plugin services are initialized so that `availableCameras()`
|
// Ensure that plugin services are initialized so that `availableCameras()`
|
||||||
@ -92,7 +96,9 @@ class CameraState extends State<Camera> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: const Text('Take a picture')),
|
appBar: AppBar(
|
||||||
|
title: Text(AppLocalizations.of(context)?.take_picture ??
|
||||||
|
"Take a picture")),
|
||||||
// You must wait until the controller is initialized before displaying the
|
// You must wait until the controller is initialized before displaying the
|
||||||
// camera preview. Use a FutureBuilder to display a loading spinner until the
|
// camera preview. Use a FutureBuilder to display a loading spinner until the
|
||||||
// controller has finished initializing.
|
// controller has finished initializing.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user