onGenerateTitle
MaterialApp({ title, color, theme, initialRoute, routes, locale, localizationsDelegates, supportedLocales, onGenerateTitle, home,..})
açıklama
Yerelleştirilmiş(yani dil listemizden) bir başlık üretmek için kullanılır
konum
MaterialApp({ title, color, theme, initialRoute, routes, locale, localizationsDelegates, supportedLocales, onGenerateTitle, home,..})
parametreler
MaterialApp({ title, color, theme, initialRoute, routes, locale, localizationsDelegates, supportedLocales, onGenerateTitle, home,..})
//localizasyon.........................................................................................
locale: Localizations.localeOf(context); //Başlangıç yerel ayarı.Eğer 'yerel' boşsa o zaman sistemin yerel değeri kullanılır.
localizationsDelegates: [
AppLocalizationsDelegate(), // bizim delegemiz
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate
],
supportedLocales: const [Locale('en', 'US'), Locale('es', 'ES'), Locale('tr', 'TR')],
onGenerateTitle: (BuildContext context) => AppLocalizations.of(context).title, // bizim localizasyon sınıfımız ve kullanımı