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
Branches
No related tags found
No related merge requests found
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
class CameraAccess extends StatefulWidget {
......@@ -12,8 +10,6 @@ class CameraAccess extends StatefulWidget {
}
class _CameraAccessState extends State<CameraAccess> {
File image;
@override
void initState() {
super.initState();
......@@ -21,11 +17,6 @@ class _CameraAccessState extends State<CameraAccess> {
@override
Widget build(BuildContext context) {
Future getImage() async {
image = await ImagePicker.pickImage(
source: ImageSource.camera,
);
}
return Scaffold(
appBar: AppBar(
......@@ -61,16 +52,7 @@ class _CameraAccessState extends State<CameraAccess> {
color: Colors.grey,
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(
height: 50,
),
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment