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,104 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:siro_rider/views/widgets/elevated_btn.dart';
|
||||
|
||||
import 'constant/colors.dart';
|
||||
import 'controller/auth/onboarding_controller.dart';
|
||||
import 'models/model/onboarding_model.dart';
|
||||
|
||||
class OnBoardingPage extends StatelessWidget {
|
||||
OnBoardingControllerImp onBoardingControllerImp =
|
||||
Get.put(OnBoardingControllerImp());
|
||||
|
||||
OnBoardingPage({super.key});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.secondaryColor,
|
||||
body: SafeArea(
|
||||
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
SizedBox(
|
||||
height: Get.height * .7,
|
||||
child: const CustomSliderOnBoarding(),
|
||||
),
|
||||
const CustomDotControllerOnBoarding(),
|
||||
// const Spacer(flex: 2),
|
||||
const SizedBox(height: 20),
|
||||
MyElevatedButton(
|
||||
onPressed: () => onBoardingControllerImp.next(),
|
||||
title: 'Next'.tr,
|
||||
)
|
||||
]),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
class CustomSliderOnBoarding extends GetView<OnBoardingControllerImp> {
|
||||
const CustomSliderOnBoarding({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PageView.builder(
|
||||
controller: controller.pageController,
|
||||
onPageChanged: (val) {
|
||||
controller.onPageChanged(val);
|
||||
},
|
||||
itemCount: onBoardingList.length,
|
||||
itemBuilder: (context, i) => Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
onBoardingList[i].image!,
|
||||
width: Get.width * 0.8,
|
||||
height: Get.width * 0.65,
|
||||
fit: BoxFit.contain,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(onBoardingList[i].title!,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 22,
|
||||
color: AppColor.primaryColor)),
|
||||
const SizedBox(height: 20),
|
||||
Container(
|
||||
width: Get.width * .8,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
onBoardingList[i].body!,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
height: 2,
|
||||
color: AppColor.accentColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14),
|
||||
)),
|
||||
// const SizedBox(height: 20),
|
||||
],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
class CustomDotControllerOnBoarding extends StatelessWidget {
|
||||
const CustomDotControllerOnBoarding({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GetBuilder<OnBoardingControllerImp>(
|
||||
builder: (controller) => Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
...List.generate(
|
||||
onBoardingList.length,
|
||||
(index) => AnimatedContainer(
|
||||
margin: const EdgeInsets.only(right: 5),
|
||||
duration: const Duration(milliseconds: 900),
|
||||
width: controller.currentPage == index ? 20 : 5,
|
||||
height: 6,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.primaryColor,
|
||||
borderRadius: BorderRadius.circular(10)),
|
||||
))
|
||||
],
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user