نسخة كاملة من مستودع سيرو عند ecfe7568 لتكون أساس تطبيق «انطلق». نُسخ المتعقَّب في git فقط (12,509 ملفاً / 302 م.ب) بـ git archive، لا `cp -r` — فاستُثنيت تلقائياً مخلفات البناء (build · node_modules · .dart_tool · .gradle · Pods ≈ 10.7 غ.ب) وكل ما يستثنيه .gitignore. هذا الكوميت **بلا أي تعديل عمداً** حتى يكون كل ما يليه فرقاً مقروءاً مقابل سيرو الأصلي. سيرو نفسه لم يُمسّ. ⚠️ لا يبني بعد: `.env` و`lib/env/env.g.dart` غير متعقَّبين في سيرو (وهذا صحيح — أسرار لكل مستأجر). كل تطبيق فلاتر هنا يحتاج .env خاصاً بانطلق ثم توليد env.g.dart عبر build_runner. لا تُنسخ أسرار سيرو. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
83 lines
2.6 KiB
Dart
83 lines
2.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:qr_flutter/qr_flutter.dart';
|
|
|
|
import '../../constant/colors.dart';
|
|
import '../../constant/style.dart';
|
|
import '../../constant/box_name.dart';
|
|
import '../../main.dart';
|
|
|
|
class TransitQRCodePage extends StatelessWidget {
|
|
const TransitQRCodePage({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final String passengerId = box.read(BoxName.passengerID) ?? '';
|
|
final String name = box.read(BoxName.name) ?? '';
|
|
|
|
// The payload for the QR Code
|
|
// You can later encrypt this or make it dynamic for security.
|
|
final String qrPayload = 'transit_board:$passengerId';
|
|
|
|
return Scaffold(
|
|
backgroundColor: AppColor.secondaryColor,
|
|
appBar: AppBar(
|
|
title: Text('بطاقة الصعود'.tr),
|
|
backgroundColor: AppColor.secondaryColor,
|
|
elevation: 0,
|
|
foregroundColor: AppColor.writeColor,
|
|
),
|
|
body: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text(
|
|
'يرجى إبراز هذا الرمز للسائق عند الصعود للحافلة'.tr,
|
|
textAlign: TextAlign.center,
|
|
style: AppStyle.title.copyWith(color: AppColor.grayColor),
|
|
),
|
|
const SizedBox(height: 30),
|
|
Container(
|
|
padding: const EdgeInsets.all(20),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(20),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.black.withOpacity(0.1),
|
|
blurRadius: 10,
|
|
spreadRadius: 2,
|
|
),
|
|
],
|
|
),
|
|
child: Column(
|
|
children: [
|
|
QrImageView(
|
|
data: qrPayload,
|
|
version: QrVersions.auto,
|
|
size: 250.0,
|
|
foregroundColor: Colors.black,
|
|
),
|
|
const SizedBox(height: 20),
|
|
Text(
|
|
name,
|
|
style: AppStyle.headTitle2,
|
|
),
|
|
const SizedBox(height: 5),
|
|
Text(
|
|
'مسافر موثق',
|
|
style: AppStyle.title.copyWith(
|
|
color: AppColor.greenColor,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|