From 5b2fc3b5dfd978f854cbfb5cc9e612971f8939b9 Mon Sep 17 00:00:00 2001 From: Jeff Peiffer Date: Sat, 16 Sep 2023 17:54:53 -0400 Subject: [PATCH] JDW 7.0.0 --- .github/workflows/pages.yml | 5 + .github/workflows/publisher.yml | 10 + .github/workflows/pull_request.yml | 10 +- .gitignore | 1 + .pubignore | 82 ++++++++ CHANGELOG.md | 5 + README.md | 2 +- analysis_options.yaml | 57 +----- example/lib/main.dart | 8 +- example/pubspec.yaml | 2 + lib/json_dynamic_widget_plugin_svg.dart | 6 +- lib/src/builder/svg_builder.dart | 180 ++++++------------ lib/src/decoder/svg_theme_decoder.dart | 4 +- ...son_dynamic_widget_plugin_svg_schemas.dart | 7 - lib/src/json_svg_plugin.dart | 18 -- lib/src/json_svg_plugin_registrar.dart | 8 + lib/src/schema/svg_schema.dart | 30 --- lib/src/schema/svg_theme_schema.dart | 1 - pubspec.yaml | 35 ++-- test/output_test.dart | 5 +- 20 files changed, 214 insertions(+), 262 deletions(-) create mode 100644 .pubignore delete mode 100644 lib/src/json_dynamic_widget_plugin_svg_schemas.dart delete mode 100644 lib/src/json_svg_plugin.dart create mode 100644 lib/src/json_svg_plugin_registrar.dart delete mode 100644 lib/src/schema/svg_schema.dart delete mode 100644 lib/src/schema/svg_theme_schema.dart diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 6e62084..f1ac77f 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -34,6 +34,11 @@ jobs: with: channel: 'stable' + - name: Run Codegen + run: | + flutter packages get + dart run build_runner build --delete-conflicting-outputs -v + - name: Validate uses: peiffer-innovations/actions-flutter-validate@v1 diff --git a/.github/workflows/publisher.yml b/.github/workflows/publisher.yml index 4e18176..975acaf 100644 --- a/.github/workflows/publisher.yml +++ b/.github/workflows/publisher.yml @@ -13,6 +13,16 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + + - name: Run Codegen + run: | + flutter packages get + dart run build_runner build --delete-conflicting-outputs -v + - name: Validate uses: peiffer-innovations/actions-flutter-validate@v1 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 84b1e33..f9810e8 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -11,9 +11,15 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: subosito/flutter-action@v2 + - name: Setup Flutter + uses: subosito/flutter-action@v2 with: - channel: 'stable' + channel: stable + + - name: Run Codegen + run: | + flutter packages get + dart run build_runner build --delete-conflicting-outputs -v - name: Validate uses: peiffer-innovations/actions-flutter-validate@v1 diff --git a/.gitignore b/.gitignore index 0974a46..c344e24 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ coverage/ coverage_badge.svg test/.test_coverage.dart output/ +*.g.dart # IntelliJ related *.iml diff --git a/.pubignore b/.pubignore new file mode 100644 index 0000000..44dca8e --- /dev/null +++ b/.pubignore @@ -0,0 +1,82 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +pubspec.lock +coverage/ +coverage_badge.svg +test/.test_coverage.dart +output/ +*.bak + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ +.settings/ +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +build/ + +# Android related +**/android/**/gradle-wrapper.jar +**/android/.gradle +/.settings/ +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Flutter.podspec +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/CHANGELOG.md b/CHANGELOG.md index 4720e66..4eaa555 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [4.0.0] - September 16th, 2023 + +* Updated to use [json_dynamic_widget](https://pub.dev/packages/json_dynamic_widget) version `7.0.0` and updated for code generation. + + ## [3.0.2+4] - July 11, 2023 * Automated dependency updates diff --git a/README.md b/README.md index b68a4fa..a662d4b 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ void main() { // Bind the plugin to the registry. This is necessary for the registry to // find the widget provided by the plugin - JsonSvgPlugin.bind(registry); + JsonSvgPluginRegistrar.registerDefaults(registry: registry); // ... } diff --git a/analysis_options.yaml b/analysis_options.yaml index e86e0b8..1958336 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,70 +1,25 @@ +include: package:flutter_lints/flutter.yaml + +analyzer: + exclude: + - '**/*.g.dart' + linter: rules: - always_declare_return_types - - always_require_non_null_named_parameters - - annotate_overrides - - avoid_empty_else - avoid_equals_and_hash_code_on_mutable_classes - avoid_escaping_inner_quotes - - avoid_init_to_null - - avoid_null_checks_in_equality_operators - - avoid_print - - avoid_relative_lib_imports - - avoid_return_types_on_setters - - avoid_shadowing_type_parameters - avoid_slow_async_io - - avoid_types_as_parameter_names - - avoid_unnecessary_containers - - avoid_unused_constructor_parameters - - camel_case_extensions - - camel_case_types - cancel_subscriptions - close_sinks - - curly_braces_in_flow_control_structures - directives_ordering - - empty_catches - empty_constructor_bodies - - implementation_imports - - library_names - - library_prefixes - - no_duplicate_case_values - - null_closures - omit_local_variable_types - - package_names - - prefer_adjacent_string_concatenation - - prefer_collection_literals - - prefer_conditional_assignment - - prefer_contains - - prefer_const_constructors - - prefer_final_fields - prefer_final_locals - - prefer_for_elements_to_map_fromIterable - - prefer_generic_function_type_aliases - - prefer_if_null_operators - - prefer_interpolation_to_compose_strings - - prefer_is_empty - - prefer_is_not_empty - - prefer_iterable_whereType - prefer_single_quotes - - prefer_spread_collections - - prefer_typing_uninitialized_variables - - prefer_void_to_null - - recursive_getters - - slash_for_doc_comments - sort_child_properties_last - sort_constructors_first - sort_pub_dependencies - sort_unnamed_constructors_first - - type_init_formals - unawaited_futures - - unnecessary_const - - unnecessary_getters_setters - - unnecessary_new - - unnecessary_null_in_if_null_operators - - unnecessary_this - - unrelated_type_equality_checks - use_full_hex_values_for_flutter_colors - - use_function_type_syntax_for_parameters - - use_rethrow_when_possible - - valid_regexps - - void_checks diff --git a/example/lib/main.dart b/example/lib/main.dart index 61c6ee9..b40d6dc 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,7 +1,5 @@ import 'dart:convert'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:json_dynamic_widget/json_dynamic_widget.dart'; import 'package:json_dynamic_widget_plugin_svg/json_dynamic_widget_plugin_svg.dart'; import 'package:logging/logging.dart'; @@ -22,13 +20,13 @@ void main() async { final navigatorKey = GlobalKey(); final registry = JsonWidgetRegistry.instance; - JsonSvgPlugin.bind(registry); + JsonSvgPluginRegistrar.registerDefaults(registry: registry); registry.navigatorKey = navigatorKey; final data = JsonWidgetData.fromDynamic( json.decode(await rootBundle.loadString('assets/pages/images.json')), - )!; + ); runApp( MaterialApp( @@ -42,7 +40,7 @@ void main() async { } class SvgWidgetPage extends StatelessWidget { - SvgWidgetPage({ + const SvgWidgetPage({ Key? key, required this.data, }) : super(key: key); diff --git a/example/pubspec.yaml b/example/pubspec.yaml index acb7a25..a5a478f 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -11,8 +11,10 @@ environment: dependencies: flutter: sdk: flutter + json_dynamic_widget: '^7.0.0+2' json_dynamic_widget_plugin_svg: path: ../ + logging: '^1.2.0' dev_dependencies: flutter_test: diff --git a/lib/json_dynamic_widget_plugin_svg.dart b/lib/json_dynamic_widget_plugin_svg.dart index cad6385..22fd154 100644 --- a/lib/json_dynamic_widget_plugin_svg.dart +++ b/lib/json_dynamic_widget_plugin_svg.dart @@ -2,8 +2,4 @@ export 'src/builder/svg_builder.dart'; // export 'src/decoder/svg_theme_decoder.dart'; // -export 'src/json_dynamic_widget_plugin_svg_schemas.dart'; -export 'src/json_svg_plugin.dart'; -// -export 'src/schema/svg_schema.dart'; -export 'src/schema/svg_theme_schema.dart'; +export 'src/json_svg_plugin_registrar.dart'; diff --git a/lib/src/builder/svg_builder.dart b/lib/src/builder/svg_builder.dart index ca1caa6..2c33160 100644 --- a/lib/src/builder/svg_builder.dart +++ b/lib/src/builder/svg_builder.dart @@ -1,166 +1,104 @@ import 'dart:convert'; -import 'package:child_builder/child_builder.dart'; -import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; -import 'package:json_class/json_class.dart'; import 'package:json_dynamic_widget/json_dynamic_widget.dart'; import 'package:json_dynamic_widget_plugin_svg/json_dynamic_widget_plugin_svg.dart'; -import 'package:json_theme/json_theme.dart'; import 'package:websafe_svg/websafe_svg.dart'; +part 'svg_builder.g.dart'; + /// Creates a SVG via the [WebsafeSvg] widget based on the JSON structure. -class SvgBuilder extends JsonWidgetBuilder { - SvgBuilder({ - required this.alignment, - required this.allowDrawingOutsideViewBox, +@jsonWidget +abstract class _SvgBuilder extends JsonWidgetBuilder { + const _SvgBuilder({ + super.args, + }); + + @JsonArgEncoder('theme') + static Map _encodeSvgTheme(SvgTheme value) => { + 'currentColor': ThemeEncoder.encodeColor(value.currentColor), + 'fontSize': value.fontSize, + 'xHeight': value.xHeight, + }; + + @JsonArgDecoder('theme') + SvgTheme _decodeSvgTheme({required dynamic value}) => + SvgThemeDecoder.decode(value) ?? const SvgTheme(); + + @JsonDefaultParam('theme', 'const SvgTheme()') + @override + _Svg buildCustom({ + ChildWidgetBuilder? childBuilder, + required BuildContext context, + required JsonWidgetData data, + Key? key, + }); +} + +class _Svg extends StatelessWidget { + _Svg({ + this.alignment = Alignment.center, + this.allowDrawingOutsideViewBox = false, required this.asset, - required this.clipBehavior, - required this.colorFilter, - required this.excludeFromSemantics, - required this.fit, + this.clipBehavior = Clip.hardEdge, + Color? color, + ColorFilter? colorFilter, + this.excludeFromSemantics = false, + this.fit = BoxFit.contain, required this.headers, required this.height, required this.image, required this.matchTextDirection, required this.package, required this.semanticsLabel, - required this.theme, + this.theme = const SvgTheme(), required this.url, required this.width, }) : assert((asset == null && url == null) || (asset == null && image == null) || (image == null && url == null)), assert(asset != null || image != null || url != null), - super(numSupportedChildren: kNumSupportedChildren); - - static const kNumSupportedChildren = 0; - static const kType = 'svg'; + colorFilter = color == null + ? colorFilter + : ColorFilter.mode( + color, + BlendMode.srcIn, + ); - final Alignment? alignment; + final Alignment alignment; final bool allowDrawingOutsideViewBox; final String? asset; final Clip clipBehavior; final ColorFilter? colorFilter; final bool excludeFromSemantics; - final BoxFit? fit; + final BoxFit fit; final Map? headers; final double? height; final String? image; final bool matchTextDirection; final String? package; final String? semanticsLabel; - final SvgTheme? theme; + final SvgTheme theme; final String? url; final double? width; - /// Builds the builder from a Map-like dynamic structure. This expects the - /// JSON format to be of the following structure: - /// - /// ```json - /// { - /// "alignment": "", - /// "allowDrawingOutsideViewBox": "", - /// "asset": "", - /// "clipBehavior": "", - /// "color": "" - /// "colorFilter": "", - /// "excludeFromSemantics": "", - /// "fit": "", - /// "headers": ">", - /// "height": "", - /// "image": "", - /// "matchTextDirection": "", - /// "package": "", - /// "semanticsLabel": "", - /// "theme": "", - /// "url": "", - /// "width": "" - /// } - /// ``` - /// - /// See also: - /// * [ThemeDecoder.decodeAlignment] - /// * [ThemeDecoder.decodeBoxFit] - /// * [ThemeDecoder.decodeClip] - static SvgBuilder fromDynamic( - dynamic map, { - JsonWidgetRegistry? registry, - }) { - if (map == null) { - throw Exception('[SvgBuilder]: map is null'); - } - - final color = ThemeDecoder.decodeColor( - map['color'], - validate: false, - ); - - return SvgBuilder( - alignment: ThemeDecoder.decodeAlignment( - map['alignment'], - validate: false, - ), - allowDrawingOutsideViewBox: - JsonClass.parseBool(map['allowDrawingOutsideViewBox']), - asset: map['asset'], - clipBehavior: - ThemeDecoder.decodeClip(map['clipBehabor']) ?? Clip.hardEdge, - colorFilter: color == null - ? ThemeDecoder.decodeColorFilter( - map['colorFilter'], - validate: false, - ) - : ColorFilter.mode( - color, - BlendMode.srcIn, - ), - excludeFromSemantics: JsonClass.parseBool(map['excludeFromSemantics']), - fit: ThemeDecoder.decodeBoxFit( - map['fit'], - validate: false, - ), - headers: map['headers'] == null - ? null - : Map.from(map['headers']), - height: JsonClass.parseDouble(map['height']), - image: map['image'], - matchTextDirection: JsonClass.parseBool(map['matchTextDirection']), - package: map['package'], - semanticsLabel: map['sementicsLabel'], - theme: SvgThemeDecoder.decode(map['theme']), - url: map['url'], - width: JsonClass.parseDouble(map['width']), - ); - } - /// Builds the widget from the give [data]. @override - Widget buildCustom({ - ChildWidgetBuilder? childBuilder, - required BuildContext context, - required JsonWidgetData data, - Key? key, - }) { - assert( - data.children?.isNotEmpty != true, - '[SvgBuilder] does not support children.', - ); - + Widget build(BuildContext context) { return asset != null ? WebsafeSvg.asset( asset!, - alignment: alignment ?? Alignment.center, - allowDrawingOutsideViewBox: false, + alignment: alignment, + allowDrawingOutsideViewBox: allowDrawingOutsideViewBox, clipBehavior: clipBehavior, colorFilter: colorFilter, excludeFromSemantics: excludeFromSemantics, - fit: fit ?? BoxFit.contain, + fit: fit, height: height, matchTextDirection: matchTextDirection, package: package, semanticsLabel: semanticsLabel, - theme: theme ?? const SvgTheme(), + theme: theme, width: width, ) : image != null @@ -168,23 +106,23 @@ class SvgBuilder extends JsonWidgetBuilder { base64.decode( image!, ), - alignment: alignment ?? Alignment.center, - allowDrawingOutsideViewBox: false, + alignment: alignment, + allowDrawingOutsideViewBox: allowDrawingOutsideViewBox, clipBehavior: clipBehavior, colorFilter: colorFilter, excludeFromSemantics: excludeFromSemantics, - fit: fit ?? BoxFit.contain, + fit: fit, height: height, matchTextDirection: matchTextDirection, semanticsLabel: semanticsLabel, - theme: theme ?? const SvgTheme(), + theme: theme, width: width, ) : WebsafeSvg.network( url!, - alignment: alignment ?? Alignment.center, + alignment: alignment, allowDrawingOutsideViewBox: false, - fit: fit ?? BoxFit.contain, + fit: fit, headers: headers, height: height, semanticsLabel: semanticsLabel, diff --git a/lib/src/decoder/svg_theme_decoder.dart b/lib/src/decoder/svg_theme_decoder.dart index ac281c2..e1de458 100644 --- a/lib/src/decoder/svg_theme_decoder.dart +++ b/lib/src/decoder/svg_theme_decoder.dart @@ -12,8 +12,8 @@ class SvgThemeDecoder { result = SvgTheme( currentColor: ThemeDecoder.decodeColor(map['currentColor']) ?? const Color(0xFF000000), - fontSize: JsonClass.parseDouble(map['fontSize']) ?? 14.0, - xHeight: JsonClass.parseDouble(map['xHeight']), + fontSize: JsonClass.maybeParseDouble(map['fontSize']) ?? 14.0, + xHeight: JsonClass.maybeParseDouble(map['xHeight']), ); } diff --git a/lib/src/json_dynamic_widget_plugin_svg_schemas.dart b/lib/src/json_dynamic_widget_plugin_svg_schemas.dart deleted file mode 100644 index 597a39c..0000000 --- a/lib/src/json_dynamic_widget_plugin_svg_schemas.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:json_dynamic_widget_plugin_svg/json_dynamic_widget_plugin_svg.dart'; - -class JsonDynamicWidgetPluginSvgSchemas { - static final all = { - SvgSchema.id: SvgSchema.schema, - }; -} diff --git a/lib/src/json_svg_plugin.dart b/lib/src/json_svg_plugin.dart deleted file mode 100644 index 89a7086..0000000 --- a/lib/src/json_svg_plugin.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:json_dynamic_widget/json_dynamic_widget.dart'; -import 'package:json_dynamic_widget_plugin_svg/json_dynamic_widget_plugin_svg.dart'; -import 'package:json_theme/json_theme_schemas.dart'; - -class JsonSvgPlugin { - static void bind(JsonWidgetRegistry registry) { - final schemaCache = SchemaCache(); - schemaCache.addSchema(SvgSchema.id, SvgSchema.schema); - - registry.registerCustomBuilder( - SvgBuilder.kType, - const JsonWidgetBuilderContainer( - builder: SvgBuilder.fromDynamic, - schemaId: SvgSchema.id, - ), - ); - } -} diff --git a/lib/src/json_svg_plugin_registrar.dart b/lib/src/json_svg_plugin_registrar.dart new file mode 100644 index 0000000..1bae546 --- /dev/null +++ b/lib/src/json_svg_plugin_registrar.dart @@ -0,0 +1,8 @@ +import 'package:json_dynamic_widget/json_dynamic_widget.dart'; +// ignore: unused_import +import 'package:json_dynamic_widget_plugin_svg/json_dynamic_widget_plugin_svg.dart'; + +part 'json_svg_plugin_registrar.g.dart'; + +@jsonWidgetRegistrar +abstract class _JsonSvgPluginRegistrar {} diff --git a/lib/src/schema/svg_schema.dart b/lib/src/schema/svg_schema.dart deleted file mode 100644 index 72b3461..0000000 --- a/lib/src/schema/svg_schema.dart +++ /dev/null @@ -1,30 +0,0 @@ -import 'package:json_theme/json_theme_schemas.dart'; - -class SvgSchema { - static const id = - 'https://peiffer-innovations.github.io/flutter_json_schemas/schemas/json_dynamic_widget_plugin_svg/svg.json'; - - static final schema = { - r'$schema': 'http://json-schema.org/draft-06/schema#', - r'$id': '$id', - r'$children': 0, - 'title': 'Svg', - 'type': 'object', - 'additionalProperties': false, - 'properties': { - 'alignment': SchemaHelper.objectSchema(AlignmentSchema.id), - 'asset': SchemaHelper.stringSchema, - 'color': SchemaHelper.objectSchema(ColorSchema.id), - 'colorBlendMode': SchemaHelper.objectSchema(BlendModeSchema.id), - 'colorFilter': SchemaHelper.stringSchema, - 'fit': SchemaHelper.objectSchema(BoxFitSchema.id), - 'headers': SchemaHelper.anySchema, - 'height': SchemaHelper.numberSchema, - 'image': SchemaHelper.stringSchema, - 'package': SchemaHelper.stringSchema, - 'semanticsLabel': SchemaHelper.stringSchema, - 'url': SchemaHelper.stringSchema, - 'width': SchemaHelper.numberSchema - }, - }; -} diff --git a/lib/src/schema/svg_theme_schema.dart b/lib/src/schema/svg_theme_schema.dart deleted file mode 100644 index 8b13789..0000000 --- a/lib/src/schema/svg_theme_schema.dart +++ /dev/null @@ -1 +0,0 @@ - diff --git a/pubspec.yaml b/pubspec.yaml index 2400ee8..52ca9c6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,39 +1,40 @@ name: 'json_dynamic_widget_plugin_svg' description: 'A plugin to the JSON Dynamic Widget to provide SVG support to the widgets' homepage: 'https://github.com/peiffer-innovations/json_dynamic_widget_plugin_svg' -version: '3.0.2+4' +version: '4.0.0' -environment: +environment: sdk: '>=3.0.0 <4.0.0' -analyzer: - exclude: +analyzer: + exclude: - 'lib/generated/**' - 'lib/**/*.g.dart' - -dependencies: +dependencies: child_builder: '^2.0.1' - flutter: + flutter: sdk: 'flutter' flutter_svg: '^2.0.7' - json_class: '^2.2.2+1' - json_dynamic_widget: '^6.0.6+6' - json_theme: '^6.0.2+3' + json_class: '^3.0.0+4' + json_dynamic_widget: '^7.0.0+2' + json_theme: '^6.2.6+1' logging: '^1.2.0' - meta: '^1.7.0' - uuid: '^3.0.7' + meta: '^1.9.1' + uuid: '^4.0.0' websafe_svg: '^3.0.1+1' -false_secrets: +false_secrets: - 'example/web/index.html' -dev_dependencies: - flutter_test: +dev_dependencies: + build_runner: '^2.3.3' + flutter_lints: '^2.0.3' + flutter_test: sdk: 'flutter' + json_dynamic_widget_codegen: '^1.0.0' - -ignore_updates: +ignore_updates: - 'archive' - 'async' - 'boolean_selector' diff --git a/test/output_test.dart b/test/output_test.dart index a91f100..14127d0 100644 --- a/test/output_test.dart +++ b/test/output_test.dart @@ -13,8 +13,9 @@ void main() { output.createSync(recursive: true); - final encoder = const JsonEncoder.withIndent(' '); - for (var schema in JsonDynamicWidgetPluginSvgSchemas.all.values) { + const encoder = JsonEncoder.withIndent(' '); + for (var schema + in JsonSvgPluginRegistrar.registerDefaults().schemas.values) { for (var i = 0; i < 3; i++) { try { final id = schema['\$id'].toString();