diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 5739bae..a17a4dd 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -43,7 +43,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - sdk: [3.0.0, dev] + sdk: [3.1.0, dev] steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c89c79..0fedf73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## 4.10.1-wip +* Require Dart `^3.1.0` + ## 4.10.0 * Add `Library.docs` to support emitting doc comments on libraries. diff --git a/analysis_options.yaml b/analysis_options.yaml index 23e98e8..589c326 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -13,19 +13,14 @@ linter: - avoid_unused_constructor_parameters - cancel_subscriptions - cascade_invocations - - comment_references - join_return_with_assignment - literal_only_boolean_expressions - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - package_api_docs - - prefer_const_constructors - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_locals - - prefer_relative_imports - - test_types_in_equals - unnecessary_await_in_return - use_string_buffers - - use_super_parameters diff --git a/lib/src/specs/class.dart b/lib/src/specs/class.dart index 6636d94..4c1915e 100644 --- a/lib/src/specs/class.dart +++ b/lib/src/specs/class.dart @@ -74,16 +74,11 @@ enum ClassModifier { final$, interface; - String get name { - switch (this) { - case ClassModifier.base: - return 'base'; - case ClassModifier.final$: - return 'final'; - case ClassModifier.interface: - return 'interface'; - } - } + String get name => switch (this) { + ClassModifier.base => 'base', + ClassModifier.final$ => 'final', + ClassModifier.interface => 'interface' + }; } abstract class ClassBuilder extends Object diff --git a/pubspec.yaml b/pubspec.yaml index edaf04a..23a7b9a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ description: A fluent, builder-based library for generating valid Dart code. repository: https://github.com/dart-lang/code_builder environment: - sdk: ^3.0.0 + sdk: ^3.1.0 dependencies: built_collection: ^5.0.0 @@ -17,7 +17,7 @@ dev_dependencies: build: ^2.0.0 build_runner: ^2.0.3 built_value_generator: ^8.0.0 - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 dart_style: ^2.3.4 source_gen: ^1.0.0 test: ^1.16.0