المجلدات وأسماء حزم dart واستيراداتها: siro_rider → intaleq_rider siro_driver → intaleq_driver siro_admin → intaleq_admin siro_service → intaleq_service شمل ذلك `name:` في كل pubspec وكل `package:siro_*` في الاستيرادات (115 ملفاً في rider وحده)، وإشارات أسماء المجلدات في docs/ وتعليق في backend/Admin/notifications/broadcast.php. لم تبقَ إشارة واحدة (تحقّقت). + ضُمّت حزم get و get_storage داخل intaleq_driver/packages/ وحُوّلت مساراتها الثلاثة من `../../Intaleq/packages/*` إلى `./packages/*`. كانت تُحل عرضاً إلى مجلد App/Intaleq القديم المجاور — تبعية خارج المستودع تنكسر بأول نقل. لم يبقَ في أي تطبيق تبعية مسار خارج الشجرة. ⚠️ لم تُمسّ بعد: هويات المتاجر (applicationId · PRODUCT_BUNDLE_IDENTIFIER · shorebird app_id) ولا الألوان ولا النصوص المرئية ولا النطاقات — كل منها كوميت منفصل، والهويات تحتاج قرار المالك. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
70 lines
2.0 KiB
Dart
70 lines
2.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
import '../../constant/colors.dart';
|
|
import '../../constant/style.dart';
|
|
|
|
class MyTextForm extends StatelessWidget {
|
|
const MyTextForm({
|
|
super.key,
|
|
required this.controller,
|
|
required this.label,
|
|
required this.hint,
|
|
required this.type,
|
|
this.validator,
|
|
});
|
|
final TextEditingController controller;
|
|
final String label, hint;
|
|
final TextInputType type;
|
|
final String? Function(String?)? validator;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.only(bottom: 10),
|
|
child: SizedBox(
|
|
width: Get.width * .8,
|
|
child: TextFormField(
|
|
keyboardType: type,
|
|
cursorColor: AppColor.accentColor,
|
|
controller: controller,
|
|
decoration: InputDecoration(
|
|
focusedBorder: OutlineInputBorder(
|
|
borderSide: const BorderSide(
|
|
color: AppColor.primaryColor,
|
|
width: 2.0,
|
|
),
|
|
borderRadius: BorderRadius.circular(10),
|
|
),
|
|
focusColor: AppColor.accentColor,
|
|
fillColor: AppColor.accentColor,
|
|
border: const OutlineInputBorder(
|
|
borderRadius: BorderRadius.all(Radius.circular(12))),
|
|
labelText: label.tr,
|
|
hintText: hint.tr,
|
|
hintStyle: AppStyle.title,
|
|
labelStyle: AppStyle.title,
|
|
),
|
|
validator: validator ?? (value) {
|
|
if (value == null || value.isEmpty) {
|
|
return '${'Please enter'.tr} $label.'.tr;
|
|
}
|
|
|
|
if (type == TextInputType.emailAddress) {
|
|
if (!value.contains('@')) {
|
|
return 'Please enter a valid email.'.tr;
|
|
}
|
|
} else if (type == TextInputType.phone) {
|
|
if (value.length > 14) {
|
|
return 'Please enter a valid phone number.'.tr;
|
|
}
|
|
}
|
|
|
|
return null;
|
|
},
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|