provider localization for cupertino. just en and zh, because others is not finished yet. and there is no plan to do it, because I can't those languages.
You can use it to fixed the error:
The getter 'pasteButtonLabel' was called on null.
if you wan't use
MaterialApp( locale: Locale('zh', 'CH'), localizationsDelegates: [ GlobalCupertinoLocalizations.delegate, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, ], supportedLocales: [ const Locale('zh', 'CH'), const Locale('en', 'US'), ], ... }
Getting Started #
This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
修改 datePicker 输出内容，增加“年月日”后缀
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: flutter_cupertino_localizations: ^1.0.1
2. Install it
You can install packages from the command line:
$ pub get
$ flutter pub get
Alternatively, your editor might support
pub get or
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Apr 8, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.7.1
- pana: 0.13.6
- Flutter: 1.12.13+hotfix.8
Health issues and suggestions
lib/src/l10n/localizations.dart. (-100 points)
lib/src/l10n/localizations.dart failed with 85 errors, including:
line 22 col 7: Missing concrete implementation of 'getter CupertinoLocalizations.todayLabel'.
line 63 col 7: Missing concrete implementation of 'getter CupertinoLocalizations.todayLabel'.
line 110 col 7: Missing concrete implementation of 'getter CupertinoLocalizations.todayLabel'.
line 157 col 7: Missing concrete implementation of 'getter CupertinoLocalizations.todayLabel'.
line 204 col 7: Missing concrete implementation of 'getter CupertinoLocalizations.todayLabel'.
lib/src/cupertino_localizations.dart. (-68.36 points)
lib/src/cupertino_localizations.dart failed with 4 errors:
line 127 col 38: Undefined name 'kSupportedLanguages'.
line 139 col 56: The name 'getCupertinoTranslation' is defined in the libraries 'package:flutter_cupertino_localizations/src/l10n/localizations.dart' and 'package:flutter_localizations/src/l10n/generated_cupertino_localizations.dart (via package:flutter_localizations/flutter_localizations.dart)'.
line 139 col 79: 9 positional argument(s) expected, but 1 found.
line 149 col 65: Undefined name 'kSupportedLanguages'.
Maintenance issues and suggestions
No valid SDK. (-20 points)
The analysis could not detect a valid SDK that can use this package.
Package is getting outdated. (-26.30 points)
The package was last published 65 weeks ago.
The package description is too short. (-20 points)
Add more detail to the
description field of
pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
flutter_cupertino_localizations.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.