Skip to content

Commit

Permalink
Updated dependencies in pubspec.yaml for flutter_bloc, dart_openai, d…
Browse files Browse the repository at this point in the history
…io, envied, feedback, flutter_bloc, logger, openfoodfacts, package_info_plus, shared_preferences, build_runner, envied_generator, flutter_lints, and package_info_plus. Also added error handling in the Resources class in components/interface_adapters.

Signed-off-by: Dmytro Turskyi <[email protected]>
  • Loading branch information
Turskyi committed Apr 20, 2024
1 parent 069934c commit 5757142
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 61 deletions.
3 changes: 3 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ GeneratedPluginRegistrant.java
key.properties
**/*.keystore
**/*.jks
/keystore
/keystore/
/app/google-services.json
14 changes: 12 additions & 2 deletions components/interface_adapters/lib/src/ui/res/resources.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ class Resources extends InheritedWidget {
/// This method asserts that the result is not `null`, as we expect the
/// [Resources] widget to be always present in the [EthicalScannerApp].
/// If the [Resources] widget is not found, a runtime exception is thrown.
static Resources of(BuildContext context) =>
context.dependOnInheritedWidgetOfExactType<Resources>()!;
static Resources of(BuildContext context) {
Resources? resources =
context.dependOnInheritedWidgetOfExactType<Resources>();
if (resources != null) {
return resources;
} else {
throw Exception(
'You should wrap your app with `Resources InheritedWidget` and pass '
'the root app widget to the child parameter.',
);
}
}
}
2 changes: 1 addition & 1 deletion components/interface_adapters/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies:
mobile_scanner: ^4.0.0

# For launching a URL. Supports web, phone, SMS, and email schemes.
package_info_plus: ^5.0.1
package_info_plus: ^7.0.0
path_provider: ^2.1.2
url_launcher: ^6.2.5

Expand Down
88 changes: 48 additions & 40 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ packages:
dependency: "direct main"
description:
name: bloc
sha256: f53a110e3b48dcd78136c10daa5d51512443cea5e1348c9d80a320095fa2db9e
sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e"
url: "https://pub.dev"
source: hosted
version: "8.1.3"
version: "8.1.4"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -93,10 +93,10 @@ packages:
dependency: "direct dev"
description:
name: build_runner
sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21"
sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22"
url: "https://pub.dev"
source: hosted
version: "2.4.8"
version: "2.4.9"
build_runner_core:
dependency: transitive
description:
Expand Down Expand Up @@ -221,10 +221,10 @@ packages:
dependency: transitive
description:
name: cross_file
sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e
sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32"
url: "https://pub.dev"
source: hosted
version: "0.3.3+8"
version: "0.3.4+1"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -261,10 +261,10 @@ packages:
dependency: "direct main"
description:
name: dio
sha256: "49af28382aefc53562459104f64d16b9dfd1e8ef68c862d5af436cc8356ce5a8"
sha256: "11e40df547d418cc0c4900a9318b26304e665da6fa4755399a9ff9efd09034b5"
url: "https://pub.dev"
source: hosted
version: "5.4.1"
version: "5.4.3+1"
entities:
dependency: "direct main"
description:
Expand All @@ -276,18 +276,26 @@ packages:
dependency: "direct main"
description:
name: envied
sha256: dab29e21452c3d57ec10889d96b06b4a006b01375d4df10b33c9704800c208c4
sha256: bbff9c76120e4dc5e2e36a46690cf0a26feb65e7765633f4e8d916bcd173a450
url: "https://pub.dev"
source: hosted
version: "0.5.3"
version: "0.5.4+1"
envied_generator:
dependency: "direct dev"
description:
name: envied_generator
sha256: b8655d5cb39b4d1d449a79ff6f1367b252c23955ff17ec7c03aacdff938598bd
sha256: "517b70de08d13dcd40e97b4e5347e216a0b1c75c99e704f3c85c0474a392d14a"
url: "https://pub.dev"
source: hosted
version: "0.5.4+1"
equatable:
dependency: transitive
description:
name: equatable
sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2
url: "https://pub.dev"
source: hosted
version: "0.5.3"
version: "2.0.5"
fake_async:
dependency: transitive
description:
Expand All @@ -300,10 +308,10 @@ packages:
dependency: "direct main"
description:
name: feedback
sha256: "3cb138a56a3f3914dd38471479c351ce6df377abb29c5ebe4042be5481fee271"
sha256: "26769f73de6215add72074d24e4a23542e4c02a8fd1a873e7c93da5dc9c1d362"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
version: "3.1.0"
fetch_api:
dependency: transitive
description:
Expand Down Expand Up @@ -353,10 +361,10 @@ packages:
dependency: "direct main"
description:
name: flutter_bloc
sha256: "87325da1ac757fcc4813e6b34ed5dd61169973871fdf181d6c2109dd6935ece1"
sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2
url: "https://pub.dev"
source: hosted
version: "8.1.4"
version: "8.1.5"
flutter_email_sender:
dependency: transitive
description:
Expand All @@ -369,10 +377,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.0.2"
flutter_localizations:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -440,10 +448,10 @@ packages:
dependency: transitive
description:
name: http
sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.1"
http_multi_server:
dependency: transitive
description:
Expand Down Expand Up @@ -543,10 +551,10 @@ packages:
dependency: "direct main"
description:
name: logger
sha256: "6bbb9d6f7056729537a4309bda2e74e18e5d9f14302489cc1e93f33b3fe32cac"
sha256: "8c94b8c219e7e50194efc8771cd0e9f10807d8d3e219af473d89b06cc2ee4e04"
url: "https://pub.dev"
source: hosted
version: "2.0.2+1"
version: "2.2.0"
logging:
dependency: transitive
description:
Expand Down Expand Up @@ -623,10 +631,10 @@ packages:
dependency: "direct main"
description:
name: openfoodfacts
sha256: "3f60e195c47398bdfddf04944fb9a2b41255d6cc281d5494ad1002843351b569"
sha256: f445d30e0f87c94c03670134ae2222885f9ab3846e0e325ef68424c3dd31bce8
url: "https://pub.dev"
source: hosted
version: "3.4.0"
version: "3.6.0"
package_config:
dependency: transitive
description:
Expand All @@ -639,18 +647,18 @@ packages:
dependency: "direct main"
description:
name: package_info_plus
sha256: "88bc797f44a94814f2213db1c9bd5badebafdfb8290ca9f78d4b9ee2a3db4d79"
sha256: "2c582551839386fa7ddbc7770658be7c0f87f388a4bff72066478f597c34d17f"
url: "https://pub.dev"
source: hosted
version: "5.0.1"
version: "7.0.0"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6"
sha256: f49918f3433a3146047372f9d4f1f847511f2acd5cd030e1f44fe5a50036b70e
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "3.0.0"
path:
dependency: "direct main"
description:
Expand Down Expand Up @@ -791,10 +799,10 @@ packages:
dependency: "direct main"
description:
name: shared_preferences
sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02"
sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.2.3"
shared_preferences_android:
dependency: transitive
description:
Expand Down Expand Up @@ -831,10 +839,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_web
sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21"
sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a"
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.3.0"
shared_preferences_windows:
dependency: transitive
description:
Expand Down Expand Up @@ -1068,10 +1076,10 @@ packages:
dependency: transitive
description:
name: url_launcher_web
sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b
sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a"
url: "https://pub.dev"
source: hosted
version: "2.2.3"
version: "2.3.1"
url_launcher_windows:
dependency: transitive
description:
Expand Down Expand Up @@ -1123,18 +1131,18 @@ packages:
dependency: transitive
description:
name: web
sha256: "4188706108906f002b3a293509234588823c8c979dc83304e229ff400c996b05"
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev"
source: hosted
version: "0.4.2"
version: "0.5.1"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
sha256: "939ab60734a4f8fa95feacb55804fa278de28bdeef38e616dc08e44a84adea23"
sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42"
url: "https://pub.dev"
source: hosted
version: "2.4.3"
version: "2.4.5"
webkit_inspection_protocol:
dependency: transitive
description:
Expand Down Expand Up @@ -1168,5 +1176,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.3.0-279.1.beta <4.0.0"
flutter: ">=3.16.6"
dart: ">=3.3.0 <4.0.0"
flutter: ">=3.19.0"
38 changes: 20 additions & 18 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# In Android, build-name is used as versionName while build-number is used as
# `versionCode`.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as
# CFBundleVersion.
Expand All @@ -23,8 +24,8 @@ version: 0.1.0+10
environment:
sdk: '>=3.2.3 <4.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# Dependencies specify other packages that your package needs to work.
# To automatically upgrade your package dependencies to the latest versions,
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
Expand All @@ -39,25 +40,26 @@ dependencies:
# the `flutter_bloc` package handles the UI and presentation layer. You can think of the bloc
# package as the engine, and the `flutter_bloc` package as the car body. You need both to make a
# functional car 🚗.
bloc: ^8.1.3
bloc: ^8.1.4
camera: ^0.10.5+9
collection: ^1.18.0
# Dart SDK for openAI Apis (GPT-3 & DALL-E), integrate easily the power of OpenAI's
# Dart SDK for openAI Apis (GPT-3 & DALL-E), easily integrate the power of
# OpenAI's
# state-of-the-art AI models into their Dart applications.
dart_openai: ^5.0.0
dio: ^5.4.1
dart_openai: ^5.1.0
dio: ^5.4.3+1
entities:
path: ./components/domain/entities

# Explicitly reads environment variables into a dart file from a .env file for more security and
# faster start up times.
envied: ^0.5.3
feedback: ^3.0.0
envied: ^0.5.4+1
feedback: ^3.0.1
flutter:
sdk: flutter

# Built to be used with the `bloc` state management package.
flutter_bloc: ^8.1.4
flutter_bloc: ^8.1.5

# Localization / internationalization (i18n) library.
flutter_translate: ^4.0.4
Expand All @@ -66,30 +68,30 @@ dependencies:
path: ./components/interface_adapters

json_annotation: ^4.8.1
logger: ^2.0.2+1
openfoodfacts: ^3.4.0
logger: ^2.2.0
openfoodfacts: ^3.5.0

package_info_plus: ^5.0.1
package_info_plus: ^7.0.0
path: any
retrofit: ^4.1.0
retrofit_generator: ^8.1.0
shared_preferences: ^2.2.2
shared_preferences: ^2.2.3
use_cases:
path: ./components/domain/use_cases

dev_dependencies:
# A build system for Dart code generation and modular compilation.
build_runner: ^2.4.8
build_runner: ^2.4.9

# Generator for the Envied package. See https://pub.dev/packages/envied.
envied_generator: ^0.5.3
envied_generator: ^0.5.4+1

# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^3.0.1
flutter_lints: ^3.0.2
flutter_test:
sdk: flutter

Expand Down Expand Up @@ -124,7 +126,7 @@ flutter:
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# example,
# fonts:
# - family: Trajan Pro
# fonts:
Expand Down

0 comments on commit 5757142

Please sign in to comment.