Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Reland "Refactor JSNumber.toDart and Object.toJS" #43363

Merged
merged 1 commit into from
Jul 12, 2023
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
144 changes: 72 additions & 72 deletions lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/web_ui/lib/src/engine/canvaskit/image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ Future<Uint8List> readChunked(HttpFetchPayload payload, int contentLength, WebOn
int position = 0;
int cumulativeBytesLoaded = 0;
await payload.read<JSUint8Array1>((JSUint8Array1 chunk) {
cumulativeBytesLoaded += chunk.length.toDart.toInt();
cumulativeBytesLoaded += chunk.length.toDartInt;
chunkCallback(cumulativeBytesLoaded, contentLength);
result.set(chunk, position.toJS);
position += chunk.length.toDart.toInt();
position += chunk.length.toDartInt;
});
return result.toDart;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/lib/src/engine/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ extension JsFlutterConfigurationExtension on JsFlutterConfiguration {

@JS('canvasKitMaximumSurfaces')
external JSNumber? get _canvasKitMaximumSurfaces;
double? get canvasKitMaximumSurfaces => _canvasKitMaximumSurfaces?.toDart;
double? get canvasKitMaximumSurfaces => _canvasKitMaximumSurfaces?.toDartDouble;

@JS('debugShowSemanticsNodes')
external JSBoolean? get _debugShowSemanticsNodes;
Expand Down
Loading