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
Revert "[web] Switch to doubles (#37336)"
This reverts commit 6976132.
  • Loading branch information
joshualitt authored Nov 14, 2022
commit 327eba81d85e0a77563f1626df50698dbaa68905
2 changes: 1 addition & 1 deletion lib/web_ui/lib/src/engine/assets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class AssetManager {
printWarning('Asset manifest does not exist at `$url` – ignoring.');
return Uint8List.fromList(utf8.encode('{}')).buffer.asByteData();
}
throw AssetManagerException(url, request.status!.toInt());
throw AssetManagerException(url, request.status!);
}

final String? constructorName = target == null ? 'null' :
Expand Down
2 changes: 1 addition & 1 deletion lib/web_ui/lib/src/engine/browser_detection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ OperatingSystem detectOperatingSystem({
// iDevices requesting a "desktop site" spoof their UA so it looks like a Mac.
// This checks if we're in a touch device, or on a real mac.
final int maxTouchPoints =
overrideMaxTouchPoints ?? domWindow.navigator.maxTouchPoints?.toInt() ?? 0;
overrideMaxTouchPoints ?? domWindow.navigator.maxTouchPoints ?? 0;
if (maxTouchPoints > 2) {
return OperatingSystem.iOs;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/web_ui/lib/src/engine/canvaskit/canvas.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class CkCanvas {

final SkCanvas skCanvas;

int? get saveCount => skCanvas.getSaveCount().toInt();
int? get saveCount => skCanvas.getSaveCount();

void clear(ui.Color color) {
skCanvas.clear(toSharedSkColor1(color));
Expand Down Expand Up @@ -272,7 +272,7 @@ class CkCanvas {
}

int save() {
return skCanvas.save().toInt();
return skCanvas.save();
}

void saveLayer(ui.Rect bounds, CkPaint? paint) {
Expand Down
Loading