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