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,