Skip to content

Commit

Permalink
Release 1.1.3 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Frezyx committed Aug 24, 2023
1 parent bd09820 commit 492c902
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 74 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.1.3
- Remove self linter with **flutter_lints**
- Fix linter issues
- Format files

## 1.1.2
- Update sdk version to **'>=2.15.0 <4.0.0'**

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

```yaml
dependencies:
flutter_json_view: ^1.1.2
flutter_json_view: ^1.1.3
```

### Add import package
Expand Down
62 changes: 1 addition & 61 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,61 +1 @@
# Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
#
# Google internally enforced rules. See README.md for more information,
# including a list of lints that are intentionally _not_ enforced.

linter:
rules:
- always_declare_return_types
- always_require_non_null_named_parameters
- annotate_overrides
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
- avoid_relative_lib_imports
- avoid_return_types_on_setters
- avoid_shadowing_type_parameters
- avoid_single_cascade_in_expression_statements
- avoid_types_as_parameter_names
- await_only_futures
- camel_case_extensions
- curly_braces_in_flow_control_structures
- empty_catches
- empty_constructor_bodies
- library_names
- library_prefixes
- no_duplicate_case_values
- null_closures
- omit_local_variable_types
- prefer_adjacent_string_concatenation
- prefer_collection_literals
- prefer_conditional_assignment
- prefer_contains
- prefer_equal_for_default_values
- prefer_final_fields
- prefer_for_elements_to_map_fromIterable
- prefer_generic_function_type_aliases
- prefer_if_null_operators
- prefer_inlined_adds
- prefer_is_empty
- prefer_is_not_empty
- prefer_iterable_whereType
- prefer_single_quotes
- prefer_spread_collections
- recursive_getters
- slash_for_doc_comments
- sort_child_properties_last
- type_init_formals
- unawaited_futures
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_getters_setters
- unnecessary_new
- unnecessary_null_in_if_null_operators
- unnecessary_this
- unrelated_type_equality_checks
- unsafe_html
- use_full_hex_values_for_flutter_colors
- use_function_type_syntax_for_parameters
- use_rethrow_when_possible
- valid_regexps
include: package:flutter_lints/flutter.yaml
2 changes: 1 addition & 1 deletion lib/src/builders/primitive_builders/list_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class JsonListBuilder extends StatefulWidget {
final JsonViewTheme jsonViewTheme;

@override
_JsonListBuilderState createState() => _JsonListBuilderState();
State<JsonListBuilder> createState() => _JsonListBuilderState();
}

class _JsonListBuilderState extends State<JsonListBuilder> {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/builders/primitive_builders/map_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class JsonMapBuilder extends StatefulWidget {
final JsonViewTheme jsonViewTheme;

@override
_JsonMapBuilderState createState() => _JsonMapBuilderState();
State<JsonMapBuilder> createState() => _JsonMapBuilderState();
}

class _JsonMapBuilderState extends State<JsonMapBuilder> {
Expand Down
11 changes: 8 additions & 3 deletions lib/src/builders/primitive_builders/primitive_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import 'package:flutter_json_view/src/theme/json_view_theme.dart';
import 'package:flutter_json_view/src/widgets/widgets.dart';

class PrimitiveBuilder extends StatelessWidget {
const PrimitiveBuilder(this.jsonObj, {required JsonViewTheme jsonViewTheme})
: _jsonViewTheme = jsonViewTheme;
const PrimitiveBuilder(
this.jsonObj, {
Key? key,
required JsonViewTheme jsonViewTheme,
}) : _jsonViewTheme = jsonViewTheme,
super(key: key);

final dynamic jsonObj;
final JsonViewTheme _jsonViewTheme;
Expand Down Expand Up @@ -36,6 +40,7 @@ class PrimitiveBuilder extends StatelessWidget {
textStyle: _jsonViewTheme.boolStyle,
);
}
return _jsonViewTheme.errorBuilder?.call(context, jsonObj) ?? const Text('error');
return _jsonViewTheme.errorBuilder?.call(context, jsonObj) ??
const Text('error');
}
}
6 changes: 3 additions & 3 deletions lib/src/flutter_json_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ class JsonView extends StatefulWidget {
static PrimitiveJsonItemBuilder? primitiveJsonItemBuilder;

@override
_JsonViewState createState() => _JsonViewState();
State<JsonView> createState() => _JsonViewState();
}

class _JsonViewState extends State<JsonView> {
@override
Widget build(BuildContext context) {
final viewType = widget._builder.jsonViewTheme.viewType;
Widget jsonView = SizedBox();
Widget jsonView = const SizedBox();
switch (viewType) {
case JsonViewType.base:
final jsonData = widget._mapData != null
Expand All @@ -91,7 +91,7 @@ class _JsonViewState extends State<JsonView> {
}
return Container(
width: double.infinity,
padding: EdgeInsets.all(10),
padding: const EdgeInsets.all(10),
color: widget._builder.jsonViewTheme.backgroundColor,
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/base_json_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class _BaseJsonViewState extends State<BaseJsonView> {
style: widget.jsonViewTheme.defaultTextStyle,
);
}
return SizedBox();
return const SizedBox();
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/json_loader_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class JsonLoaderItem extends StatefulWidget {
final JsonViewTheme jsonViewTheme;

@override
_JsonLoaderItemState createState() => _JsonLoaderItemState();
State<JsonLoaderItem> createState() => _JsonLoaderItemState();
}

class _JsonLoaderItemState extends State<JsonLoaderItem> {
Expand Down
18 changes: 17 additions & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_lints:
dependency: "direct main"
description:
name: flutter_lints
sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -67,6 +75,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.7"
lints:
dependency: transitive
description:
name: lints
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -161,5 +177,5 @@ packages:
source: hosted
version: "2.1.4"
sdks:
dart: ">=3.0.0-0 <4.0.0"
dart: ">=3.0.0 <4.0.0"
flutter: ">=1.17.0"
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_json_view
description: Displaying json models in a Flutter widget with customization.
version: 1.1.2
version: 1.1.3
homepage: https://github.com/Frezyx/flutter_json_view

topics:
Expand All @@ -17,6 +17,7 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_lints: ^2.0.0

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 492c902

Please sign in to comment.