Commit 7edd5c8d authored by Victor Choueiri's avatar Victor Choueiri Committed by Greg Spencer

Allow null flutter schema in pubspec (#15690)

parent 10fe2056
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
"properties": { "properties": {
"name": { "type": "string" }, "name": { "type": "string" },
"flutter": { "flutter": {
"type": "object", "oneOf": [
{ "type": "object" },
{ "type": "null" }
],
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"uses-material-design": { "type": "boolean" }, "uses-material-design": { "type": "boolean" },
......
...@@ -345,5 +345,17 @@ flutter: ...@@ -345,5 +345,17 @@ flutter:
final List<Font> fonts = flutterManifest.fonts; final List<Font> fonts = flutterManifest.fonts;
expect(fonts.length, 0); expect(fonts.length, 0);
}); });
test('allows a blank flutter section', () async {
const String manifest = '''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
''';
final FlutterManifest flutterManifest = await FlutterManifest.createFromString(manifest);
expect(flutterManifest.isEmpty, false);
});
}); });
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment