diff --git a/web_generator/lib/src/dart_main.dart b/web_generator/lib/src/dart_main.dart index 6f6f6797..5d97c07c 100644 --- a/web_generator/lib/src/dart_main.dart +++ b/web_generator/lib/src/dart_main.dart @@ -44,6 +44,6 @@ String _emitLibrary(code.Library library) { ); final source = library.accept(emitter); - return DartFormatter(experimentFlags: [inlineClassExperimentFlag]) + return DartFormatter(languageVersion: DartFormatter.latestLanguageVersion) .format(source.toString()); } diff --git a/web_generator/lib/src/util.dart b/web_generator/lib/src/util.dart index 3b2dd0ad..2c80fa6e 100644 --- a/web_generator/lib/src/util.dart +++ b/web_generator/lib/src/util.dart @@ -30,9 +30,6 @@ final List mozLicenseHeader = [ 'under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/.', ]; -// Needed for dart_style until 2.3.5 is published. -const String inlineClassExperimentFlag = 'inline-class'; - const String generatedFileDisclaimer = 'Generated from Web IDL definitions.'; extension StringExt on String { diff --git a/web_generator/pubspec.yaml b/web_generator/pubspec.yaml index 66fb95da..b3bc534c 100644 --- a/web_generator/pubspec.yaml +++ b/web_generator/pubspec.yaml @@ -15,7 +15,7 @@ dependencies: code_builder: ^4.10.0 collection: ^1.18.0 dart_flutter_team_lints: ^3.0.0 - dart_style: ^2.3.4 + dart_style: ^2.3.7 io: ^1.0.4 path: ^1.8.3 test: ^1.24.4