Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d8092d99
Unverified
Commit
d8092d99
authored
Jan 22, 2020
by
Jenn Magder
Committed by
GitHub
Jan 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix YamlMap cast error (#49253)
parent
3800bb7b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
flutter_manifest.dart
packages/flutter_tools/lib/src/flutter_manifest.dart
+2
-1
flutter_manifest_test.dart
...utter_tools/test/general.shard/flutter_manifest_test.dart
+15
-0
No files found.
packages/flutter_tools/lib/src/flutter_manifest.dart
View file @
d8092d99
...
...
@@ -342,8 +342,9 @@ bool _validate(YamlMap manifest) {
}
if
(
kvp
.
value
is
!
YamlMap
)
{
errors
.
add
(
'Expected "
${kvp.key}
" section to be an object or null, but got
${kvp.value}
.'
);
}
}
else
{
_validateFlutter
(
kvp
.
value
as
YamlMap
,
errors
);
}
break
;
default
:
// additionalProperties are allowed.
...
...
packages/flutter_tools/test/general.shard/flutter_manifest_test.dart
View file @
d8092d99
...
...
@@ -641,6 +641,21 @@ flutter:
expect
(
assets
[
1
].
path
,
'lib/gallery/abc%3Fxyz'
);
expect
(
assets
[
2
].
path
,
'lib/gallery/aaa%20bbb'
);
});
testUsingContext
(
'Returns proper error when flutter is a list instead of a map'
,
()
async
{
const
String
manifest
=
'''
name: test
dependencies:
flutter:
sdk: flutter
flutter:
- uses-material-design: true
'''
;
final
FlutterManifest
flutterManifest
=
FlutterManifest
.
createFromString
(
manifest
);
expect
(
flutterManifest
,
null
);
expect
(
testLogger
.
errorText
,
contains
(
'Expected "flutter" section to be an object or null, but got [{uses-material-design: true}].'
));
});
});
group
(
'FlutterManifest with MemoryFileSystem'
,
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment