Skip to content

Commit dbf9d16

Browse files
committed
refactor code
1 parent 8802043 commit dbf9d16

File tree

2 files changed

+43
-31
lines changed

2 files changed

+43
-31
lines changed

qrscanner/lib/controller/camera_view_controller.dart

-4
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,7 @@ class CameraViewController extends GetxController {
4949
_yoloController.onEachCameraImage(
5050
image, camFrameRotation, setCameraZoomLevel));
5151

52-
logger.log(level, cameraController!.value.previewSize.toString());
53-
5452
ratio = cameraController!.value.aspectRatio;
55-
56-
logger.log(level, ratio);
5753
});
5854

5955
update(); // Using update() to rebuild GetBuilder widgets

qrscanner/lib/pages/home_page.dart

+43-27
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,51 @@ class HomePage extends StatelessWidget {
1515
body: Padding(
1616
padding: const EdgeInsets.symmetric(horizontal: 12.0),
1717
child: Column(
18-
crossAxisAlignment: CrossAxisAlignment.center,
19-
mainAxisAlignment: MainAxisAlignment.center,
18+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
2019
children: [
21-
Text(
22-
"Camera with intelligent autozoom in Flutter",
23-
style:
24-
GoogleFonts.nunito(fontSize: 28, fontWeight: FontWeight.bold),
25-
textAlign: TextAlign.center,
26-
),
27-
SizedBox(
28-
height: MediaQuery.of(context).size.height * 0.05,
29-
),
30-
Text(
31-
"QR Code Autozoom is a Flutter application that addresses the challenge of intelligent autozoom in the camera. Inspired by the problem statement, the app enables users to take pictures of objects, specifically focusing on scenarios like capturing images of dogs or cats. In this app, I have used a QR code detection model inspired by Google Pay's autozoom feature. The app utilizes Ultralytics YOLO v8 model to intelligently autozoom to the right size, ensuring that the object in view is captured with optimal clarity.",
32-
style: GoogleFonts.montserrat(fontSize: 18),
33-
textAlign: TextAlign.justify,
34-
),
35-
SizedBox(
36-
height: MediaQuery.of(context).size.height * 0.05,
37-
),
38-
GestureDetector(
39-
onTap: () => Get.toNamed('/qrautozoom'),
40-
child: CircleAvatar(
41-
backgroundColor: Colors.grey.shade200,
42-
radius: 40,
43-
child: const Icon(
44-
Icons.arrow_forward_ios,
45-
size: 52,
20+
Column(
21+
crossAxisAlignment: CrossAxisAlignment.center,
22+
mainAxisAlignment: MainAxisAlignment.center,
23+
children: [
24+
SizedBox(
25+
height: MediaQuery.of(context).size.height * 0.1,
26+
),
27+
Text(
28+
"Camera with intelligent autozoom in Flutter",
29+
style: GoogleFonts.nunito(
30+
fontSize: 28, fontWeight: FontWeight.w600),
31+
textAlign: TextAlign.center,
4632
),
33+
SizedBox(
34+
height: MediaQuery.of(context).size.height * 0.05,
35+
),
36+
Text(
37+
"QR Code Autozoom is a Flutter application that addresses the challenge of intelligent autozoom in the camera. Inspired by the problem statement, the app enables users to take pictures of objects, specifically focusing on scenarios like capturing images of dogs or cats. In this app, I have used a QR code detection model inspired by Google Pay's autozoom feature. The app utilizes Ultralytics YOLO v8 model to intelligently recognize QR codes, ensuring that the object in view is captured with optimal clarity.",
38+
style: GoogleFonts.montserrat(fontSize: 18),
39+
textAlign: TextAlign.justify,
40+
),
41+
SizedBox(
42+
height: MediaQuery.of(context).size.height * 0.05,
43+
),
44+
GestureDetector(
45+
onTap: () => Get.toNamed('/qrautozoom'),
46+
child: CircleAvatar(
47+
backgroundColor: Colors.grey.shade200,
48+
radius: 40,
49+
child: const Icon(
50+
Icons.arrow_forward_ios,
51+
size: 52,
52+
),
53+
),
54+
),
55+
],
56+
),
57+
Padding(
58+
padding: const EdgeInsets.symmetric(vertical: 12),
59+
child: Text(
60+
"Made with 💙 by Keyur",
61+
style: GoogleFonts.montserrat(fontSize: 14),
62+
textAlign: TextAlign.justify,
4763
),
4864
),
4965
],

0 commit comments

Comments
 (0)