Skip to content

Commit

Permalink
chore: Update Pub modules and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Aug 7, 2024
1 parent 77b1258 commit a82a63f
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import 'package:intl/src/intl_helpers.dart';

import 'messages_en.dart' as messages_en;

typedef LibraryLoader = Future<dynamic> Function();
typedef Future<dynamic> LibraryLoader();
Map<String, LibraryLoader> _deferredLibraries = {
'en': () => SynchronousFuture(null),
'en': () => new SynchronousFuture(null),
};

MessageLookupByLibrary? _findExact(String localeName) {
Expand All @@ -38,13 +38,13 @@ Future<bool> initializeMessages(String localeName) {
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
if (availableLocale == null) {
return SynchronousFuture(false);
return new SynchronousFuture(false);
}
var lib = _deferredLibraries[availableLocale];
lib == null ? SynchronousFuture(false) : lib();
initializeInternalMessageLookup(() => CompositeMessageLookup());
lib == null ? new SynchronousFuture(false) : lib();
initializeInternalMessageLookup(() => new CompositeMessageLookup());
messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
return SynchronousFuture(true);
return new SynchronousFuture(true);
}

bool _messagesExistFor(String locale) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';

final messages = MessageLookup();
final messages = new MessageLookup();

typedef MessageIfAbsent = String Function(
String messageStr, List<dynamic> args);
typedef String MessageIfAbsent(String messageStr, List<dynamic> args);

class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'en';
Expand Down
64 changes: 52 additions & 12 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: args
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
url: "https://pub.dev"
source: hosted
version: "2.4.2"
version: "2.5.0"
async:
dependency: "direct main"
description:
Expand Down Expand Up @@ -93,10 +93,10 @@ packages:
dependency: "direct dev"
description:
name: build_runner
sha256: "67d591d602906ef9201caf93452495ad1812bea2074f04e25dbd7c133785821b"
sha256: "1414d6d733a85d8ad2f1dfcb3ea7945759e35a123cb99ccfac75d0758f75edfa"
url: "https://pub.dev"
source: hosted
version: "2.4.7"
version: "2.4.10"
build_runner_core:
dependency: transitive
description:
Expand Down Expand Up @@ -271,18 +271,18 @@ packages:
dependency: transitive
description:
name: flutter_gen_core
sha256: "8b4ff1d45d125e576e26ea99d15e0419bb3c45b53696e022880866b78bb6b830"
sha256: d8e828ad015a8511624491b78ad8e3f86edb7993528b1613aefbb4ad95947795
url: "https://pub.dev"
source: hosted
version: "5.3.2"
version: "5.6.0"
flutter_gen_runner:
dependency: "direct dev"
description:
name: flutter_gen_runner
sha256: fd197f8c657e79313d53d3934de602ebe604ba722a84c88ae3a43cd90428c67a
sha256: "931b03f77c164df0a4815aac0efc619a6ac8ec4cada55025119fca4894dada90"
url: "https://pub.dev"
source: hosted
version: "5.3.2"
version: "5.6.0"
flutter_launcher_icons:
dependency: "direct dev"
description:
Expand All @@ -308,10 +308,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_native_splash
sha256: "141b20f15a2c4fe6e33c49257ca1bc114fc5c500b04fcbc8d75016bb86af672f"
sha256: aa06fec78de2190f3db4319dd60fdc8d12b2626e93ef9828633928c2dcaea840
url: "https://pub.dev"
source: hosted
version: "2.3.8"
version: "2.4.1"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -359,6 +359,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.1"
hashcodes:
dependency: transitive
description:
name: hashcodes
sha256: "80f9410a5b3c8e110c4b7604546034749259f5d6dcca63e0d3c17c9258f1a651"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
html:
dependency: transitive
description:
Expand Down Expand Up @@ -395,10 +403,18 @@ packages:
dependency: transitive
description:
name: image
sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271"
sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8"
url: "https://pub.dev"
source: hosted
version: "4.1.3"
version: "4.2.0"
image_size_getter:
dependency: transitive
description:
name: image_size_getter
sha256: f98c4246144e9b968899d2dfde69091e22a539bb64bc9b0bea51505fbb490e57
url: "https://pub.dev"
source: hosted
version: "2.1.3"
integration_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -539,6 +555,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.0"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
url: "https://pub.dev"
source: hosted
version: "1.0.1"
path_provider:
dependency: transitive
description:
Expand Down Expand Up @@ -840,6 +864,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.2"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81"
url: "https://pub.dev"
source: hosted
version: "1.1.11+1"
vector_math:
dependency: transitive
description:
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ dev_dependencies:
flutter_lints: ^4.0.0

# Code generation
build_runner: ^2.4.6
build_runner: 2.4.10
pubspec_generator: ^4.1.0-pre.1
flutter_gen_runner: ^5.3.2
flutter_gen_runner: ^5.6.0
flutter_launcher_icons: ^0.13.1
flutter_native_splash: ^2.3.8
flutter_native_splash: ^2.4.1

flutter:
generate: true
Expand Down

0 comments on commit a82a63f

Please sign in to comment.