0

I am trying to include SyncFusion Flutter calendar in my Flutter app.

I need to change the locale for the calendar.

I have included following code just inside the MaterialApp widget

 child: MaterialApp(

      localizationsDelegates: [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        SfGlobalLocalizations.delegate,

      ],
      supportedLocales: [
        const Locale('en'),
        const Locale('zh'),
        const Locale('he'),
        const Locale('ru'),
        const Locale('fr', 'BE'),
        const Locale('fr', 'CA'),
        const Locale('ja'),
        const Locale('de'),
        const Locale('hi'),
        const Locale('ar'),
      ],
      locale: const Locale('zh'),

I have also included:

import 'package:syncfusion_localizations/syncfusion_localizations.dart';

But both lines below are marked as error:

Undefined name 'GlobalMaterialLocalizations



    

GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
mvasco
  • 4,965
  • 7
  • 59
  • 120
  • Be aware that the SyncFusion products in the Dart/Flutter pub are *not* open source. They are released under a commercial license that may subject you or your organization to a financial liability, and might affect downstream re-users of your code. – Randal Schwartz Jan 26 '23 at 19:02
  • @RandalSchwartz thank you for your advice, do you know any open source pub dev package that may help me to create a similar solution to my app? – mvasco Jan 27 '23 at 07:07
  • 1
    There are many calendar packages in the pub that are open source. – Randal Schwartz Jan 27 '23 at 20:36

0 Answers0