chore: استيراد أولي من سيرو (ecfe7568) — بلا أي تعديل
نسخة كاملة من مستودع سيرو عند 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>
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
import 'package:siro_driver/constant/box_name.dart';
|
||||
import 'package:siro_driver/main.dart';
|
||||
|
||||
class RechargeTier {
|
||||
final double amount;
|
||||
final double bonus;
|
||||
const RechargeTier(this.amount, this.bonus);
|
||||
|
||||
double get total => amount + bonus;
|
||||
}
|
||||
|
||||
class RechargeConfig {
|
||||
final String currencyCode;
|
||||
final List<RechargeTier> tiers;
|
||||
const RechargeConfig({required this.currencyCode, required this.tiers});
|
||||
|
||||
static const Map<String, RechargeConfig> _configs = {
|
||||
'Jordan': RechargeConfig(
|
||||
currencyCode: 'JOD',
|
||||
tiers: [
|
||||
RechargeTier(5, 0),
|
||||
RechargeTier(10, 0),
|
||||
RechargeTier(20, 0),
|
||||
RechargeTier(50, 0),
|
||||
],
|
||||
),
|
||||
'Egypt': RechargeConfig(
|
||||
currencyCode: 'EGP',
|
||||
tiers: [
|
||||
RechargeTier(100, 0),
|
||||
RechargeTier(200, 0),
|
||||
RechargeTier(400, 0),
|
||||
RechargeTier(1000, 0),
|
||||
],
|
||||
),
|
||||
'Syria': RechargeConfig(
|
||||
currencyCode: 'SYP',
|
||||
tiers: [
|
||||
RechargeTier(100, 0),
|
||||
RechargeTier(200, 0),
|
||||
RechargeTier(400, 0),
|
||||
RechargeTier(1000, 0),
|
||||
],
|
||||
),
|
||||
};
|
||||
|
||||
static RechargeConfig get current {
|
||||
final country = box.read(BoxName.countryCode) ?? 'Jordan';
|
||||
return _configs[country] ?? _configs['Jordan']!;
|
||||
}
|
||||
|
||||
static List<RechargeTier> get currentTiers => current.tiers;
|
||||
}
|
||||
Reference in New Issue
Block a user