[ci] Roll Flutter to 9b3b9cf0893d54a40c2b6f8bc6c666ee77a8afa6 (#3128)
* [ci] Roll Flutter to 9b3b9cf0893d54a40c2b6f8bc6c666ee77a8afa6
* Re-add removed line
diff --git a/.ci/flutter_master.version b/.ci/flutter_master.version
index dd5e807..04b248e 100644
--- a/.ci/flutter_master.version
+++ b/.ci/flutter_master.version
@@ -1 +1 @@
-27f8ebdaed7078f311d456befae1c6236ba65fd8
+9b3b9cf0893d54a40c2b6f8bc6c666ee77a8afa6
diff --git a/packages/flutter_markdown/CHANGELOG.md b/packages/flutter_markdown/CHANGELOG.md
index 477eb94..a43c71b 100644
--- a/packages/flutter_markdown/CHANGELOG.md
+++ b/packages/flutter_markdown/CHANGELOG.md
@@ -1,5 +1,6 @@
-## NEXT
+## 0.6.13+1
+* Adjusts code to account for nullability change in Flutter SDK.
* Updates the example to specify the import for `DropdownMenu`.
## 0.6.13
diff --git a/packages/flutter_markdown/lib/src/builder.dart b/packages/flutter_markdown/lib/src/builder.dart
index 293f12c..4e3c0c1 100644
--- a/packages/flutter_markdown/lib/src/builder.dart
+++ b/packages/flutter_markdown/lib/src/builder.dart
@@ -510,7 +510,7 @@
_mergeInlineChildren(current.children, align),
textAlign: align,
);
- _tables.single.rows.last.children!.add(child);
+ _ambiguate(_tables.single.rows.last.children)!.add(child);
} else if (tag == 'a') {
_linkHandlers.removeLast();
}
@@ -859,4 +859,10 @@
);
}
}
+
+ /// This allows a value of type T or T? to be treated as a value of type T?.
+ ///
+ /// We use this so that APIs that have become non-nullable can still be used
+ /// with `!` and `?` on the stable branch.
+ T? _ambiguate<T>(T? value) => value;
}
diff --git a/packages/flutter_markdown/pubspec.yaml b/packages/flutter_markdown/pubspec.yaml
index 8f1259f..1e4cbb1 100644
--- a/packages/flutter_markdown/pubspec.yaml
+++ b/packages/flutter_markdown/pubspec.yaml
@@ -4,7 +4,7 @@
formatted with simple Markdown tags.
repository: https://github.com/flutter/packages/tree/main/packages/flutter_markdown
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+flutter_markdown%22
-version: 0.6.13
+version: 0.6.13+1
environment:
sdk: ">=2.12.0 <3.0.0"
diff --git a/packages/flutter_markdown/test/utils.dart b/packages/flutter_markdown/test/utils.dart
index f28ef29..7052210 100644
--- a/packages/flutter_markdown/test/utils.dart
+++ b/packages/flutter_markdown/test/utils.dart
@@ -157,7 +157,7 @@
expect(table.children.length, rows);
for (int index = 0; index < rows; index++) {
- expect(table.children[index].children!.length, columns);
+ expect(_ambiguate(table.children[index].children)!.length, columns);
}
}
@@ -212,3 +212,9 @@
}
}
}
+
+/// This allows a value of type T or T? to be treated as a value of type T?.
+///
+/// We use this so that APIs that have become non-nullable can still be used
+/// with `!` and `?` on the stable branch.
+T? _ambiguate<T>(T? value) => value;