Skip to content

Commit

Permalink
JDW 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeiffer committed Sep 16, 2023
1 parent 4c579db commit 5b2fc3b
Show file tree
Hide file tree
Showing 20 changed files with 214 additions and 262 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ coverage/
coverage_badge.svg
test/.test_coverage.dart
output/
*.g.dart

# IntelliJ related
*.iml
Expand Down
82 changes: 82 additions & 0 deletions .pubignore
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
// ...
}
Expand Down
57 changes: 6 additions & 51 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 3 additions & 5 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -22,13 +20,13 @@ void main() async {
final navigatorKey = GlobalKey<NavigatorState>();

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(
Expand All @@ -42,7 +40,7 @@ void main() async {
}

class SvgWidgetPage extends StatelessWidget {
SvgWidgetPage({
const SvgWidgetPage({
Key? key,
required this.data,
}) : super(key: key);
Expand Down
2 changes: 2 additions & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 1 addition & 5 deletions lib/json_dynamic_widget_plugin_svg.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Loading

0 comments on commit 5b2fc3b

Please sign in to comment.