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

Commit dce75ab

Browse files
committed
Revert "Refactor JSNumber.toDart and Object.toJS"
This reverts commit ca41476. Reason for reverting: Broke the roll into the framework.
1 parent 3d30145 commit dce75ab

File tree

10 files changed

+173
-168
lines changed

10 files changed

+173
-168
lines changed

lib/web_ui/lib/src/engine/canvaskit/canvaskit_api.dart

Lines changed: 72 additions & 72 deletions
Large diffs are not rendered by default.

lib/web_ui/lib/src/engine/canvaskit/image.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@ Future<Uint8List> readChunked(HttpFetchPayload payload, int contentLength, WebOn
205205
int position = 0;
206206
int cumulativeBytesLoaded = 0;
207207
await payload.read<JSUint8Array1>((JSUint8Array1 chunk) {
208-
cumulativeBytesLoaded += chunk.length.toDartInt;
208+
cumulativeBytesLoaded += chunk.length.toDart.toInt();
209209
chunkCallback(cumulativeBytesLoaded, contentLength);
210210
result.set(chunk, position.toJS);
211-
position += chunk.length.toDartInt;
211+
position += chunk.length.toDart.toInt();
212212
});
213213
return result.toDart;
214214
}

lib/web_ui/lib/src/engine/configuration.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ extension JsFlutterConfigurationExtension on JsFlutterConfiguration {
312312

313313
@JS('canvasKitMaximumSurfaces')
314314
external JSNumber? get _canvasKitMaximumSurfaces;
315-
double? get canvasKitMaximumSurfaces => _canvasKitMaximumSurfaces?.toDartDouble;
315+
double? get canvasKitMaximumSurfaces => _canvasKitMaximumSurfaces?.toDart;
316316

317317
@JS('debugShowSemanticsNodes')
318318
external JSBoolean? get _debugShowSemanticsNodes;

0 commit comments

Comments
 (0)