Add camera dart
This commit is contained in:
parent
26372368b2
commit
413807f039
@ -46,7 +46,7 @@
|
||||
"edit_email": "Edit email address",
|
||||
"birth_date": "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",
|
||||
"birth_date": "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:flutter/material.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 {
|
||||
// Ensure that plugin services are initialized so that `availableCameras()`
|
||||
@ -92,7 +96,9 @@ class CameraState extends State<Camera> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
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
|
||||
// camera preview. Use a FutureBuilder to display a loading spinner until the
|
||||
// controller has finished initializing.
|
||||
|
Loading…
x
Reference in New Issue
Block a user