diff --git a/packages/scanner/shared/pubspec.yaml b/packages/scanner/shared/pubspec.yaml index e51f4ae91cc..bfcb933c94a 100644 --- a/packages/scanner/shared/pubspec.yaml +++ b/packages/scanner/shared/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: flutter: sdk: flutter - flutter_svg: 1.1.6 + flutter_svg: 2.0.5 visibility_detector: 0.4.0+2 dev_dependencies: diff --git a/packages/smooth_app/lib/cards/category_cards/svg_async_asset.dart b/packages/smooth_app/lib/cards/category_cards/svg_async_asset.dart index 1e7656918df..41db5512f1b 100644 --- a/packages/smooth_app/lib/cards/category_cards/svg_async_asset.dart +++ b/packages/smooth_app/lib/cards/category_cards/svg_async_asset.dart @@ -1,3 +1,5 @@ +import 'dart:ui' as ui; + import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -51,7 +53,12 @@ class _SvgAsyncAssetState extends State { snapshot.data!, width: widget.assetCacheHelper.width, height: widget.assetCacheHelper.height, - color: widget.assetCacheHelper.color, + colorFilter: widget.assetCacheHelper.color == null + ? null + : ui.ColorFilter.mode( + widget.assetCacheHelper.color!, + ui.BlendMode.srcIn, + ), fit: BoxFit.contain, placeholderBuilder: (BuildContext context) => widget.assetCacheHelper.getEmptySpace(), diff --git a/packages/smooth_app/lib/cards/category_cards/svg_cache.dart b/packages/smooth_app/lib/cards/category_cards/svg_cache.dart index 4f6664ec3b3..511c89d52c1 100644 --- a/packages/smooth_app/lib/cards/category_cards/svg_cache.dart +++ b/packages/smooth_app/lib/cards/category_cards/svg_cache.dart @@ -1,3 +1,5 @@ +import 'dart:ui' as ui; + import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:smooth_app/cards/category_cards/abstract_cache.dart'; @@ -54,7 +56,9 @@ class SvgCache extends AbstractCache { } return SvgPicture.network( iconUrl!, - color: forcedColor, + colorFilter: forcedColor == null + ? null + : ui.ColorFilter.mode(forcedColor, ui.BlendMode.srcIn), width: width, height: height, fit: BoxFit.contain, diff --git a/packages/smooth_app/lib/cards/product_cards/smooth_product_card_thanks.dart b/packages/smooth_app/lib/cards/product_cards/smooth_product_card_thanks.dart index 9ba75790284..c302d43ff08 100644 --- a/packages/smooth_app/lib/cards/product_cards/smooth_product_card_thanks.dart +++ b/packages/smooth_app/lib/cards/product_cards/smooth_product_card_thanks.dart @@ -1,3 +1,5 @@ +import 'dart:ui' as ui; + import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -34,7 +36,10 @@ class SmoothProductCardThanks extends StatelessWidget { 'assets/misc/checkmark.svg', width: 36.0, height: 36.0, - color: Colors.greenAccent, + colorFilter: const ui.ColorFilter.mode( + Colors.greenAccent, + ui.BlendMode.srcIn, + ), package: AppHelper.APP_PACKAGE, ), ], diff --git a/packages/smooth_app/lib/pages/product/edit_product_page.dart b/packages/smooth_app/lib/pages/product/edit_product_page.dart index 682e7f07f45..e3eb7edf341 100644 --- a/packages/smooth_app/lib/pages/product/edit_product_page.dart +++ b/packages/smooth_app/lib/pages/product/edit_product_page.dart @@ -1,5 +1,7 @@ // ignore_for_file: use_build_context_synchronously +import 'dart:ui' as ui; + import 'package:auto_size_text/auto_size_text.dart'; import 'package:barcode_widget/barcode_widget.dart'; import 'package:flutter/material.dart'; @@ -406,7 +408,10 @@ class _SvgIcon extends StatelessWidget { assetName, height: DEFAULT_ICON_SIZE, width: DEFAULT_ICON_SIZE, - color: _iconColor(Theme.of(context)), + colorFilter: ui.ColorFilter.mode( + _iconColor(Theme.of(context)), + ui.BlendMode.srcIn, + ), package: AppHelper.APP_PACKAGE, ); diff --git a/packages/smooth_app/pubspec.lock b/packages/smooth_app/pubspec.lock index 9ad90dba2e9..4b2b5191264 100644 --- a/packages/smooth_app/pubspec.lock +++ b/packages/smooth_app/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "8880b4cfe7b5b17d57c052a5a3a8cc1d4f546261c7cc8fbd717bd53f48db0568" + sha256: "405666cd3cf0ee0a48d21ec67e65406aad2c726d9fa58840d3375e7bdcd32a07" url: "https://pub.dev" source: hosted - version: "59.0.0" + version: "60.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: a89627f49b0e70e068130a36571409726b04dab12da7e5625941d2c8ec278b96 + sha256: "1952250bd005bacb895a01bf1b4dc00e3ba1c526cf47dca54dfe24979c65f5b3" url: "https://pub.dev" source: hosted - version: "5.11.1" + version: "5.12.0" app_settings: dependency: "direct main" description: @@ -65,10 +65,10 @@ packages: dependency: transitive description: name: args - sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" assorted_layout_widgets: dependency: "direct main" description: @@ -177,10 +177,10 @@ packages: dependency: transitive description: name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.0" built_collection: dependency: transitive description: @@ -193,26 +193,26 @@ packages: dependency: transitive description: name: built_value - sha256: "31b7c748fd4b9adf8d25d72a4c4a59ef119f12876cf414f94f8af5131d5fa2b0" + sha256: "2f17434bd5d52a26762043d6b43bb53b3acd029b4d9071a329f46d67ef297e6d" url: "https://pub.dev" source: hosted - version: "8.4.4" + version: "8.5.0" camera: dependency: "direct main" description: name: camera - sha256: ad1c53c554a2f3e5708f3b01eb738d60b902bb61f7f4ad420c65c715e65a7379 + sha256: "309b823e61f15ff6b5b2e4c0ff2e1512ea661cad5355f71fc581e510ae5b26bb" url: "https://pub.dev" source: hosted - version: "0.10.3+2" + version: "0.10.5" camera_android: dependency: transitive description: name: camera_android - sha256: e0f9b7eea2d1f4d4f5460f178522f0d02c095d2ae00b01a77419ce61c4184bfe + sha256: "45313e6bd5e74ac369d5bef928ab81594b5494762ac5cb8f4f255c01daa77622" url: "https://pub.dev" source: hosted - version: "0.10.7" + version: "0.10.8" camera_avfoundation: dependency: transitive description: @@ -257,10 +257,10 @@ packages: dependency: transitive description: name: checked_yaml - sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" cli_util: dependency: transitive description: @@ -345,10 +345,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "6d691edde054969f0e0f26abb1b30834b5138b963793e56f69d3a9a4435e6352" + sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.1" data_importer: dependency: "direct main" description: @@ -415,10 +415,10 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.2" file: dependency: transitive description: @@ -510,10 +510,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "8ffe990dac54a4a5492747added38571a5ab474c8e5d196809ea08849c69b1bb" + sha256: "96af49aa6b57c10a312106ad6f71deed5a754029c24789bbf620ba784f0bd0b0" url: "https://pub.dev" source: hosted - version: "2.0.13" + version: "2.0.14" flutter_secure_storage: dependency: "direct main" description: @@ -566,10 +566,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2" + sha256: f991fdb1533c3caeee0cdc14b04f50f0c3916f0dbcbc05237ccbe4e3c6b93f3f url: "https://pub.dev" source: hosted - version: "1.1.6" + version: "2.0.5" flutter_test: dependency: "direct dev" description: flutter @@ -645,10 +645,10 @@ packages: dependency: transitive description: name: html - sha256: "79d498e6d6761925a34ee5ea8fa6dfef38607781d2fa91e37523474282af55cb" + sha256: "58e3491f7bf0b6a4ea5110c0c688877460d1a6366731155c4a4580e7ded773e8" url: "https://pub.dev" source: hosted - version: "0.15.2" + version: "0.15.3" http: dependency: "direct main" description: @@ -685,10 +685,10 @@ packages: dependency: transitive description: name: image_picker_android - sha256: "271e0448e82268b3fa1cb2a48e4a911cbc2135587123d7df8e7ca703c5b10da2" + sha256: "89ba2aa6904d8180ca44fd5f5014523f02319101904e3e571fbe792e395b77ed" url: "https://pub.dev" source: hosted - version: "0.8.6+11" + version: "0.8.6+14" image_picker_for_web: dependency: transitive description: @@ -701,10 +701,10 @@ packages: dependency: transitive description: name: image_picker_ios - sha256: a1546ff5861fc15812953d4733b520c3d371cec3d2859a001ff04c46c4d81883 + sha256: d779210bda268a03b57e923fb1e410f32f5c5e708ad256348bcbf1f44f558fd0 url: "https://pub.dev" source: hosted - version: "0.8.7+3" + version: "0.8.7+4" image_picker_platform_interface: dependency: transitive description: @@ -762,10 +762,10 @@ packages: dependency: transitive description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.8.1" latlong2: dependency: "direct main" description: @@ -899,7 +899,7 @@ packages: description: path: "." ref: HEAD - resolved-ref: "7d31d5cf5bd2cef6b8d06233d98da5047f721df3" + resolved-ref: "3462ba8ce07287bb2c46818660a0f03f00884804" url: "https://github.com/openfoodfacts/openfoodfacts_flutter_lints.git" source: git version: "1.0.0" @@ -935,14 +935,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.2" - path_drawing: - dependency: transitive - description: - name: path_drawing - sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 - url: "https://pub.dev" - source: hosted - version: "1.0.1" path_parsing: dependency: transitive description: @@ -971,10 +963,10 @@ packages: dependency: transitive description: name: path_provider_foundation - sha256: ad4c4d011830462633f03eb34445a45345673dfd4faf1ab0b4735fbd93b19183 + sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" path_provider_linux: dependency: transitive description: @@ -1123,10 +1115,10 @@ packages: dependency: transitive description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" qr: dependency: transitive description: @@ -1224,10 +1216,10 @@ packages: dependency: transitive description: name: shared_preferences_foundation - sha256: "0c1c16c56c9708aa9c361541a6f0e5cc6fc12a3232d866a687a7b7db30032b07" + sha256: e014107bb79d6d3297196f4f2d0db54b5d1f85b8ea8ff63b8e8b391a02700feb url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.2.2" shared_preferences_linux: dependency: transitive description: @@ -1277,10 +1269,10 @@ packages: dependency: transitive description: name: source_gen - sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298 + sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" url: "https://pub.dev" source: hosted - version: "1.2.7" + version: "1.3.2" source_span: dependency: transitive description: @@ -1413,10 +1405,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: "22f8db4a72be26e9e3a4aa3f194b1f7afbc76d20ec141f84be1d787db2155cbd" + sha256: "7aac14be5f4731b923cc697ae2d42043945076cd0dbb8806baecc92c1dc88891" url: "https://pub.dev" source: hosted - version: "6.0.31" + version: "6.0.33" url_launcher_ios: dependency: transitive description: @@ -1473,6 +1465,30 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.7" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: ea8d3fc7b2e0f35de38a7465063ecfcf03d8217f7962aa2a6717132cb5d43a79 + url: "https://pub.dev" + source: hosted + version: "1.1.5" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: a5eaa5d19e123ad4f61c3718ca1ed921c4e6254238d9145f82aa214955d9aced + url: "https://pub.dev" + source: hosted + version: "1.1.5" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "15edc42f7eaa478ce854eaf1fbb9062a899c0e4e56e775dd73b7f4709c97c4ca" + url: "https://pub.dev" + source: hosted + version: "1.1.5" vector_math: dependency: transitive description: @@ -1581,10 +1597,10 @@ packages: dependency: transitive description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: dart: ">=2.19.0 <3.0.0" - flutter: ">=3.3.0" + flutter: ">=3.7.0-0" diff --git a/packages/smooth_app/pubspec.yaml b/packages/smooth_app/pubspec.yaml index ad18b211f00..69ea9d0107d 100644 --- a/packages/smooth_app/pubspec.yaml +++ b/packages/smooth_app/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: carousel_slider: 4.2.1 cupertino_icons: 1.0.5 device_preview: 1.1.0 - flutter_svg: 1.1.6 + flutter_svg: 2.0.5 flutter_map: 2.2.0 flutter_widget_from_html_core: 0.8.3+1 fwfh_selectable_text: 0.8.3+1 @@ -80,7 +80,7 @@ dependencies: # We use two different scanning engines, # mobile scanner powered by ML Kit for the Play Store and Apple App Store, # but qr_code_scanner which uses the open source ZXing for F-Droid - camera: 0.10.3+2 + camera: 0.10.5 scanner_shared: path: ../scanner/shared