Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/pigeon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.18

* Null safe required Dart 2.12.

## 0.1.17

* Split out test code generation for Dart into a separate file via the
Expand Down
4 changes: 2 additions & 2 deletions packages/pigeon/lib/dart_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'generator_tools.dart';

/// Options that control how Dart code will be generated.
class DartOptions {
/// Determines if the generated code has null safety annotations (Dart >2.10 required).
/// Determines if the generated code has null safety annotations (Dart >=2.12 required).
bool isNullSafe = false;
}

Expand Down Expand Up @@ -194,7 +194,7 @@ void generateDart(DartOptions opt, Root root, StringSink sink) {
indent.writeln(
'// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import',
);
indent.writeln('// @dart = ${opt.isNullSafe ? '2.10' : '2.8'}');
indent.writeln('// @dart = ${opt.isNullSafe ? '2.12' : '2.8'}');
indent.writeln('import \'dart:async\';');
indent.writeln(
'import \'dart:typed_data\' show Uint8List, Int32List, Int64List, Float64List;',
Expand Down