From 0e6c6e4f764cf08cf1d43e8206dab36dc44f4d48 Mon Sep 17 00:00:00 2001 From: Mehmetyaz Date: Wed, 1 Jul 2026 21:21:00 +0300 Subject: [PATCH 1/3] Remove Flutter SDK dependency and use standard Dart packages --- analysis_options.yaml | 2 +- pubspec.yaml | 44 ++-------------------------- test/streaming_json_parser_test.dart | 2 +- 3 files changed, 4 insertions(+), 44 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index a5744c1..12e713a 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:flutter_lints/flutter.yaml +include: package:lints/recommended.yaml # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options diff --git a/pubspec.yaml b/pubspec.yaml index 345d39c..859b10f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,50 +5,10 @@ repository: https://github.com/Mkohm/streaming_json_parser environment: sdk: ">=3.3.4 <4.0.0" - flutter: ">=1.17.0" dependencies: - flutter: - sdk: flutter dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^4.0.0 + lints: ^3.0.0 + test: ^1.31.0 -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - - # To add assets to your package, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # - # For details regarding assets in packages, see - # https://flutter.dev/to/asset-from-package - # - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/to/resolution-aware-images - - # To add custom fonts to your package, add a fonts section here, - # 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: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts in packages, see - # https://flutter.dev/to/font-from-package diff --git a/test/streaming_json_parser_test.dart b/test/streaming_json_parser_test.dart index 84840bd..73b687f 100644 --- a/test/streaming_json_parser_test.dart +++ b/test/streaming_json_parser_test.dart @@ -1,4 +1,4 @@ -import 'package:flutter_test/flutter_test.dart'; +import 'package:test/test.dart'; import 'package:streaming_json_parser/streaming_json_parser.dart'; void main() { From fbb9707b528a03e190b7e7b1c351da36a4374163 Mon Sep 17 00:00:00 2001 From: Mehmetyaz Date: Wed, 1 Jul 2026 21:24:26 +0300 Subject: [PATCH 2/3] chore: remove Flutter SDK dependencies and use standard Dart package:test - Remove flutter environment SDK constraints and dependency. - Switch from package:flutter_test to package:test/test.dart for unit tests. - Switch package:flutter_lints to package:lints for analysis options. --- pubspec.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 859b10f..1f5c386 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,9 +6,6 @@ repository: https://github.com/Mkohm/streaming_json_parser environment: sdk: ">=3.3.4 <4.0.0" -dependencies: - dev_dependencies: lints: ^3.0.0 test: ^1.31.0 - From 7174cd94fda3d3eead12681f07b03da40225c6bb Mon Sep 17 00:00:00 2001 From: Mehmetyaz Date: Thu, 2 Jul 2026 15:52:16 +0300 Subject: [PATCH 3/3] style: apply linting fixes and adjust formatting in streaming JSON parser components --- lib/lexer.dart | 6 ++++-- lib/parser.dart | 5 ++++- lib/streaming_json_parser.dart | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/lexer.dart b/lib/lexer.dart index 8d13c0e..4fd762f 100644 --- a/lib/lexer.dart +++ b/lib/lexer.dart @@ -1,3 +1,5 @@ +// ignore_for_file: constant_identifier_names + part of 'streaming_json_parser.dart'; const String JSON_COMMA = ','; @@ -15,7 +17,7 @@ const List JSON_SYNTAX = [ JSON_LEFTBRACKET, JSON_RIGHTBRACKET, JSON_LEFTBRACE, - JSON_RIGHTBRACE + JSON_RIGHTBRACE, ]; const int FALSE_LEN = 'false'.length; @@ -35,7 +37,7 @@ Map lexString(String string) { if (c == JSON_QUOTE) { return { 'value': jsonString, - 'rest': string.substring(jsonString.length + 1) + 'rest': string.substring(jsonString.length + 1), }; } else { jsonString += c; diff --git a/lib/parser.dart b/lib/parser.dart index 1b46c3c..4d5894e 100644 --- a/lib/parser.dart +++ b/lib/parser.dart @@ -1,3 +1,5 @@ +// ignore_for_file: prefer_typing_uninitialized_variables + part of 'streaming_json_parser.dart'; List parseArray(List tokens) { @@ -56,7 +58,8 @@ Map parseObject(List tokens) { if (tokens[0] != JSON_COLON) { throw Exception( - 'Expected colon after key in object, got: ${tokens[0]}'); + 'Expected colon after key in object, got: ${tokens[0]}', + ); } var result = parseTokens(tokens.sublist(1)); diff --git a/lib/streaming_json_parser.dart b/lib/streaming_json_parser.dart index 9e998b3..e3435f0 100644 --- a/lib/streaming_json_parser.dart +++ b/lib/streaming_json_parser.dart @@ -1,3 +1,4 @@ +// ignore: unnecessary_library_name library streaming_json_parser; part 'lexer.dart';