Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion lib/stub_ui/lib/src/ui/canvas.dart
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ class Picture {
///
/// Although the image is returned synchronously, the picture is actually
/// rasterized the first time the image is drawn and then cached.
Image toImage(int width, int height) => null;
Future<Image> toImage(int width, int height) => null;

/// Release the resources used by this object. The object is no longer usable
/// after this method is called.
Expand Down
11 changes: 9 additions & 2 deletions web_sdk/test/api_conform_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@ void main() {
'${uiParam.identifier.name} is named, but not in lib/stub_ui/ui.dart.');
}
}
// check return type.
if (uiMethod.returnType?.toString() != webMethod.returnType?.toString()) {
// allow dynamic in web implementation.
if (webMethod.returnType?.toString() != 'dynamic') {
failed = true;
print('Warning: lib/ui/ui.dart $className.$methodName return type'
'${uiMethod.returnType?.toString()} is not the same as in lib/stub_ui/ui.dart.');
}
}
}
}
if (failed) {
Expand All @@ -158,8 +167,6 @@ void main() {
exit(0);
}

void _checkParameters() {}

// Collects all public classes defined by the part files of [unit].
void _collectPublicClasses(CompilationUnit unit,
Map<String, ClassDeclaration> destination, String root) {
Expand Down