feat : persian calendar and date picker
This commit is contained in:
@@ -42,15 +42,22 @@ class MyApp extends StatelessWidget {
|
||||
return GetMaterialApp(
|
||||
title: 'رصدیار',
|
||||
theme: ThemeData(
|
||||
fontFamily: 'yekan',
|
||||
colorScheme: ColorScheme.fromSeed(seedColor: AppColor.blueNormal),
|
||||
),
|
||||
initialRoute: AppPages.initRoutes,
|
||||
initialBinding: BindingsBuilder.put(() => UserService()),
|
||||
getPages: AppPages.pages,
|
||||
locale: Locale('fa'),
|
||||
locale: const Locale("fa", "IR"),
|
||||
supportedLocales: const [
|
||||
Locale("fa", "IR"),
|
||||
],
|
||||
localizationsDelegates: [
|
||||
PersianMaterialLocalizations.delegate,
|
||||
PersianCupertinoLocalizations.delegate,
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:inspection/inspection.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_core/presentation/widget/captcha/captcha_widget.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
|
||||
@@ -227,11 +225,19 @@ class AuthWithUseAndPassPage extends GetView<AuthWithUseAndPassLogic> {
|
||||
SizedBox(height: 23),
|
||||
RElevated(
|
||||
text: 'ورود',
|
||||
onPressed: () {
|
||||
onPressed: () async {
|
||||
Jalali? picked = await showPersianDatePicker(
|
||||
context: Get.context!,
|
||||
|
||||
initialDate: Jalali.now(),
|
||||
firstDate: Jalali(1385, 8),
|
||||
lastDate: Jalali(1450, 9),
|
||||
initialEntryMode: PersianDatePickerEntryMode.calendarOnly,
|
||||
initialDatePickerMode: PersianDatePickerMode.year,
|
||||
);
|
||||
|
||||
if (data.value.currentState?.validate() == true &&
|
||||
controller.captchaController.validate()) {
|
||||
Get.toNamed(InspectionRoutes.inspection);
|
||||
}
|
||||
controller.captchaController.validate()) {}
|
||||
},
|
||||
width: Get.width,
|
||||
height: 48,
|
||||
|
||||
Reference in New Issue
Block a user