gpt4 book ai didi

flutter - 如何将 Flutter 同步日历与 jalali 日期一起使用

转载 作者:行者123 更新时间:2023-12-03 23:42:55 46 4
gpt4 key购买 nike

我正在尝试开发这样的日历 https://pub.dev/packages/syncfusion_flutter_calendar但我不知道如何将这个包用于 Jalali 日期(波斯日期)。

最佳答案

你可以创建你的自定义,我认为这是最好的方法
如您所见 here
目前无法使用波斯(jalali)日历与同步融合,
这是他们所说的
.

As of now, we don’t have support for converting the calendar to jalalicalendar. We have logged the feature request for the same. We willimplement it in any of our upcoming releases. We appreciate yourpatience until then


但是您可以通过本地化使其语言为波斯语(仅语言而不是日历时间)
MaterialApp(
//ignore: always_specify_types
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
// ... app-specific localization delegate[s] here
SfGlobalLocalizations.delegate
],
//ignore: always_specify_types
supportedLocales: const [
Locale('en'),
Locale('fa'),
// ... other locales the app supports
],
locale: const Locale('fa'),
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: MyHomePage(),
);
再次,它只是改变了语言

关于flutter - 如何将 Flutter 同步日历与 jalali 日期一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64697176/

46 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com