From bfd4e7418dc08d756d69ea8891151218e4dcaa22 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Date: Fri, 24 Jan 2020 16:43:27 +0100 Subject: [PATCH] [Gallery] Use new package flutter_localized_locales (#256) * Update to latest flutter_localized_countries * Update pubspec.lock * Use flutter_localized_locales package --- gallery/gallery/lib/main.dart | 2 +- gallery/gallery/lib/pages/settings.dart | 4 ++-- gallery/gallery/pubspec.lock | 14 ++++++-------- gallery/gallery/pubspec.yaml | 5 +---- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/gallery/gallery/lib/main.dart b/gallery/gallery/lib/main.dart index b0326591a..aa9752c32 100644 --- a/gallery/gallery/lib/main.dart +++ b/gallery/gallery/lib/main.dart @@ -7,7 +7,7 @@ import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart' show timeDilation; -import 'package:flutter_localized_countries/flutter_localized_countries.dart'; +import 'package:flutter_localized_locales/flutter_localized_locales.dart'; import 'package:gallery/constants.dart'; import 'package:gallery/data/gallery_options.dart'; import 'package:gallery/l10n/gallery_localizations.dart'; diff --git a/gallery/gallery/lib/pages/settings.dart b/gallery/gallery/lib/pages/settings.dart index 907579fe7..f204be80d 100644 --- a/gallery/gallery/lib/pages/settings.dart +++ b/gallery/gallery/lib/pages/settings.dart @@ -6,7 +6,7 @@ import 'dart:collection'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_localized_countries/flutter_localized_countries.dart'; +import 'package:flutter_localized_locales/flutter_localized_locales.dart'; import 'package:gallery/constants.dart'; import 'package:gallery/data/gallery_options.dart'; import 'package:gallery/l10n/gallery_localizations.dart'; @@ -58,7 +58,7 @@ class _SettingsPageState extends State { @override void initState() { super.initState(); - LocaleNamesLocalizationsDelegate().getLocaleNativeNames().then( + LocaleNamesLocalizationsDelegate().allNativeNames().then( (data) => setState( () { _localeNativeNames = data; diff --git a/gallery/gallery/pubspec.lock b/gallery/gallery/pubspec.lock index a25ae7398..4a10fe675 100644 --- a/gallery/gallery/pubspec.lock +++ b/gallery/gallery/pubspec.lock @@ -137,15 +137,13 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_localized_countries: + flutter_localized_locales: dependency: "direct main" description: - path: "." - ref: "76bfbf9654c3842d735181383f7ab86c312a2483" - resolved-ref: "76bfbf9654c3842d735181383f7ab86c312a2483" - url: "git://github.com/guidezpl/flutter-localized-countries.git" - source: git - version: "1.1.0" + name: flutter_localized_locales + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" flutter_test: dependency: "direct dev" description: flutter @@ -190,7 +188,7 @@ packages: name: intl url: "https://pub.dartlang.org" source: hosted - version: "0.16.1" + version: "0.16.0" intl_translation: dependency: "direct main" description: diff --git a/gallery/gallery/pubspec.yaml b/gallery/gallery/pubspec.yaml index 671cce23f..b655e92c5 100644 --- a/gallery/gallery/pubspec.yaml +++ b/gallery/gallery/pubspec.yaml @@ -13,6 +13,7 @@ dependencies: sdk: flutter intl: intl_translation: + flutter_localized_locales: duration: cupertino_icons: ^0.1.2 rally_assets: 1.0.0 @@ -21,10 +22,6 @@ dependencies: shrine_images: ^1.1.2 flare_flutter: ^1.6.5 url_launcher: ^5.1.6 - flutter_localized_countries: - git: - url: git://github.com/guidezpl/flutter-localized-countries.git - ref: 76bfbf9654c3842d735181383f7ab86c312a2483 shared_preferences: ^0.5.4+8 collection: ^1.14.0 flutter_gallery_assets: 0.1.9+2