Flutter Localize Syncfusion Calender with GetX

283

Based on the provided information we have analyzed your requirement “How to add localization of syncfusion flutter calendar by using GetX“ and you can achieve your requirement by adding localizationsDelegates and supportedLocales in the GetMaterialApp. We have modified the shared sample based on your requirement.

Kindly find the sample by referring to the following link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/locale_with_getx-1984841410

Regards,

Muthulakshmi

Share:
283
Chris
Author by

Chris

Updated on January 04, 2023

Comments

  • Chris
    Chris over 1 year

    I am using the Syncfusion Calender in my app. The problem is that I would like to localize it but I can not make it work... I checked there documentation, but the given example is working with the normal MaterialApp. I am using GetX, also for Localization.

    How can I localize the calender with my GetXApp?

    This is my App:

    @override
      Widget build(BuildContext context) {
        return MultiProvider(
          providers: [
            ChangeNotifierProvider(
              create: (context) => DataProvider(),
            ),
          ],
          child: GetMaterialApp(
            title: 'Flutter Boilerplate',
            navigatorKey: Get.key,
            translationsKeys: AppTranslation.translationsKeys,
            locale: locale,
            fallbackLocale: fallbackLocale,
            theme: ThemeData(
              fontFamily: AppTextStyles.montserrat,
              primarySwatch: ColorService.createMaterialColor(
                AppColors.blue,
              ),
              backgroundColor: AppColors.white,
              scaffoldBackgroundColor: AppColors.white,
            ),
            initialRoute: Views.home,
            onGenerateRoute: AppRouter.generateRoute,
          ),
        );
      }
    

    Couldn't find anything on this... Every help is appreciated :)

  • Chris
    Chris about 2 years
    working as expected! Thanks for your help :)