This commit is contained in:
Hamza-Ayed
2023-10-27 18:53:56 +03:00
parent eabb7f0e54
commit c4285cface
2 changed files with 176 additions and 168 deletions

View File

@@ -5,6 +5,7 @@ import 'package:ride/constant/colors.dart';
import 'package:ride/constant/style.dart';
import 'package:ride/controller/functions/camer_controller.dart';
import 'package:ride/views/widgets/elevated_btn.dart';
import 'package:ride/views/widgets/my_scafold.dart';
class CameraWidgetCardId extends StatelessWidget {
final CameraClassController cameraClassController =
@@ -14,13 +15,17 @@ class CameraWidgetCardId extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
return MyScafolld(
title: 'Scan Id'.tr,
body: [
Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 12),
padding:
const EdgeInsets.symmetric(vertical: 8, horizontal: 12),
child: GetBuilder<CameraClassController>(
builder: (cameraClassController) => cameraClassController
.isCameraInitialized
builder: (cameraClassController) =>
cameraClassController.isCameraInitialized
? Stack(
children: [
Container(
@@ -50,7 +55,8 @@ class CameraWidgetCardId extends StatelessWidget {
decoration: BoxDecoration(
// color: AppColor.blueColor,
border: Border.all(
color: AppColor.yellowColor, width: 2),
color: AppColor.yellowColor,
width: 2),
),
),
),
@@ -62,8 +68,8 @@ class CameraWidgetCardId extends StatelessWidget {
height: 25,
decoration: BoxDecoration(
// color: AppColor.blueColor,
border:
Border.all(color: AppColor.blueColor, width: 2),
border: Border.all(
color: AppColor.blueColor, width: 2),
),
),
),
@@ -75,8 +81,8 @@ class CameraWidgetCardId extends StatelessWidget {
height: 20,
decoration: BoxDecoration(
// color: AppColor.blueColor,
border:
Border.all(color: AppColor.blueColor, width: 2),
border: Border.all(
color: AppColor.blueColor, width: 2),
),
),
),
@@ -88,8 +94,8 @@ class CameraWidgetCardId extends StatelessWidget {
height: 15,
decoration: BoxDecoration(
// color: AppColor.blueColor,
border:
Border.all(color: AppColor.blueColor, width: 2),
border: Border.all(
color: AppColor.blueColor, width: 2),
),
),
),
@@ -101,8 +107,8 @@ class CameraWidgetCardId extends StatelessWidget {
height: 15,
decoration: BoxDecoration(
// color: AppColor.blueColor,
border:
Border.all(color: AppColor.blueColor, width: 2),
border: Border.all(
color: AppColor.blueColor, width: 2),
),
),
),
@@ -114,8 +120,8 @@ class CameraWidgetCardId extends StatelessWidget {
height: 15,
decoration: BoxDecoration(
// color: AppColor.blueColor,
border:
Border.all(color: AppColor.blueColor, width: 2),
border: Border.all(
color: AppColor.blueColor, width: 2),
),
),
),
@@ -127,8 +133,8 @@ class CameraWidgetCardId extends StatelessWidget {
height: 15,
decoration: BoxDecoration(
// color: AppColor.blueColor,
border:
Border.all(color: AppColor.blueColor, width: 2),
border: Border.all(
color: AppColor.blueColor, width: 2),
),
),
),
@@ -140,8 +146,8 @@ class CameraWidgetCardId extends StatelessWidget {
height: 110,
decoration: BoxDecoration(
// color: AppColor.blueColor,
border:
Border.all(color: AppColor.blueColor, width: 2),
border: Border.all(
color: AppColor.blueColor, width: 2),
),
),
),
@@ -175,8 +181,11 @@ class CameraWidgetCardId extends StatelessWidget {
),
GetBuilder<CameraClassController>(
builder: (cameraClassController) => Expanded(
child: Text(cameraClassController.scannedText.toString())))
child:
Text(cameraClassController.scannedText.toString())))
],
);
)
],
isleading: true);
}
}

View File

@@ -197,10 +197,9 @@ class HomeCaptain extends StatelessWidget {
),
TextButton(
onPressed: () {
Get.to(() => Scaffold(
appBar: AppBar(),
body: CameraWidgetCardId(),
));
Get.to(
() => CameraWidgetCardId(),
);
},
child: const Text(
"Text IdCamera",