New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GlobalCupertinoLocalizations class is included in two package #42827
Comments
same problem |
I get this error:
|
Well, seems like the GlobalCupertinoLocalizations package is no longer needed for Cupertino localizations. Errors related to missing implementations were fixed on this PR, however, the author stated that is no longer needed. So we should use the one from:
|
Hi @yuzhihang
This file will give you all required localization delegates to use in your app: import 'package:flutter_localizations/flutter_localizations.dart';
MaterialApp(
localizationsDelegates: [
// ... app-specific localization delegate[s] here
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [
const Locale('en'), // English
const Locale('he'), // Hebrew
const Locale.fromSubtags(languageCode: 'zh'), // Chinese *See Advanced Locales below*
// ... other locales the app supports
],
// ...
) Closing this as fixed. If you disagree please feel free to write a comment bellow and I will reopen it. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
in the Internationalizing Flutter apps tutorial
https://flutter.dev/docs/development/accessibility-and-localization/internationalization
two libs are imported
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_cupertino_localizations/flutter_cupertino_localizations.dart';
but they both have GlobalCupertinoLocalizations
flutter version
[✓] Flutter (Channel stable, v1.9.1+hotfix.4)
The text was updated successfully, but these errors were encountered: