flutter_cupertino_localizations 1.0.1

  • Readme
  • Changelog
  • Installing
  • 54

flutter_cupertino_localizations #

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 DefaultCupertinoLocalizations.

CupertinoLocalizations 居然只提供英文的 DefaultCupertinoLocalizations,真特么的想说脏话。

Usage #

  locale: Locale('zh', 'CH'),
  localizationsDelegates: [
  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.

1.0.1 #

修改 datePicker 输出内容,增加“年月日”后缀

1.0.0 #

  • GlobalCupertinoLocalizations

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_cupertino_localizations: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ 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:

import 'package:flutter_cupertino_localizations/flutter_cupertino_localizations.dart';
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]
Learn more about scoring.

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

Fix lib/src/l10n/localizations.dart. (-100 points)

Analysis of 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'.

Fix lib/src/cupertino_localizations.dart. (-68.36 points)

Analysis of 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 main.dart, example.dart, and flutter_cupertino_localizations.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
flutter_localizations 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
intl 0.16.0 0.16.1
meta 1.1.8
path 1.6.4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8