Skip to content
Snippets Groups Projects
Commit 23ea0f44 authored by Thi Huyen Trang Nguyen's avatar Thi Huyen Trang Nguyen
Browse files

KAT-51: Deleted unused imports, methods of image_picker in camera_access.dart

parent fb4a5bf9
No related branches found
No related tags found
No related merge requests found
import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
class CameraAccess extends StatefulWidget { class CameraAccess extends StatefulWidget {
...@@ -12,8 +10,6 @@ class CameraAccess extends StatefulWidget { ...@@ -12,8 +10,6 @@ class CameraAccess extends StatefulWidget {
} }
class _CameraAccessState extends State<CameraAccess> { class _CameraAccessState extends State<CameraAccess> {
File image;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
...@@ -21,11 +17,6 @@ class _CameraAccessState extends State<CameraAccess> { ...@@ -21,11 +17,6 @@ class _CameraAccessState extends State<CameraAccess> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Future getImage() async {
image = await ImagePicker.pickImage(
source: ImageSource.camera,
);
}
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
...@@ -61,16 +52,7 @@ class _CameraAccessState extends State<CameraAccess> { ...@@ -61,16 +52,7 @@ class _CameraAccessState extends State<CameraAccess> {
color: Colors.grey, color: Colors.grey,
onPressed: getImage), onPressed: getImage),
), ),
SizedBox(
height: 50,
),
SizedBox(
height: 200.0,
width: 300.0,
child: image == null
? Center(child: new Text('Sorry nichts ausgewählt!!'))
: Center(child: new Image.file(image)),
),
SizedBox( SizedBox(
height: 50, height: 50,
), ),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment