flutter_cupertino_localizations 1.0.1

  • Readme
  • Changelog
  • Installing
  • 59

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 #

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.

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:


dependencies:
  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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
98
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
59
Learn more about scoring.

We analyzed this package on Nov 11, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6

Platforms

Detected platforms:

Low code quality prevents platform classification.

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

line 139 col 79: 9 required argument(s) expected, but 1 found.

line 149 col 65: Undefined name 'kSupportedLanguages'.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Low code quality prevents platform classification.

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.

Dependencies

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.15.8 0.16.0
meta 1.1.7 1.1.8
path 1.6.4
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8