Update: 2026-05-07 13:47:48
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
import 'package:get/get.dart';
|
||||
import '../../../core/storage/secure_storage.dart';
|
||||
import '../../../app/routes/app_pages.dart';
|
||||
|
||||
class OnboardingController extends GetxController {
|
||||
var currentPage = 0.obs;
|
||||
|
||||
final List<OnboardingModel> items = [
|
||||
OnboardingModel(
|
||||
title: 'مرحباً بك في مُصادَق',
|
||||
description:
|
||||
'أول منصة أردنية ذكية لأتمتة الفواتير الضريبية والربط مع جوفوترا بكل سهولة.',
|
||||
imageAsset: 'assets/images/onboarding_1.png',
|
||||
),
|
||||
OnboardingModel(
|
||||
title: 'مسح ضوئي ذكي',
|
||||
description:
|
||||
'التقط صورة للفاتورة وسيقوم الذكاء الاصطناعي باستخراج كافة البيانات الضريبية في ثوانٍ.',
|
||||
imageAsset: 'assets/images/onboarding_2.png',
|
||||
),
|
||||
OnboardingModel(
|
||||
title: 'مدفوعات فورية آمنة',
|
||||
description:
|
||||
'قم بشحن محفظتك وتفعيل اشتراكك عبر نظام كليك (CliQ) بكل سرعة وأمان.',
|
||||
imageAsset: 'assets/images/onboarding_3.png',
|
||||
),
|
||||
];
|
||||
|
||||
void onPageChanged(int index) {
|
||||
currentPage.value = index;
|
||||
}
|
||||
|
||||
Future<void> completeOnboarding() async {
|
||||
await SecureStorage().write('has_seen_onboarding', 'true');
|
||||
Get.offAllNamed(AppRoutes.PHONE_INPUT);
|
||||
}
|
||||
}
|
||||
|
||||
class OnboardingModel {
|
||||
final String title;
|
||||
final String description;
|
||||
final String imageAsset;
|
||||
|
||||
OnboardingModel({
|
||||
required this.title,
|
||||
required this.description,
|
||||
required this.imageAsset,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user