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
4 changes: 1 addition & 3 deletions lib/web_ui/lib/src/engine/clipboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ class ExecCommandPasteStrategy implements PasteFromClipboardStrategy {
@override
Future<String> getData() {
// TODO(nurhan): https://github.com/flutter/flutter/issues/48581
// TODO(nurhan): https://github.com/flutter/flutter/issues/48580
print('Paste is not implemented for this browser.');
throw UnimplementedError();
throw UnimplementedError('Paste is not implemented for this browser.');
}
}
16 changes: 8 additions & 8 deletions lib/web_ui/lib/src/engine/html/surface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -347,16 +347,16 @@ abstract class PersistedSurface implements ui.EngineLayer {
/// such as on the very first frame.
@mustCallSuper
void build() {
if (rootElement != null) {
try {
throw '';
} catch (_, stack) {
print(
'Attempted to build a $runtimeType, but it already has an HTML element ${rootElement!.tagName}.');
print(stack.toString().split('\n').take(20).join('\n'));
if (assertionsEnabled) {
final html.Element? existingElement = rootElement;
if (existingElement != null) {
throw PersistedSurfaceException(
this,
'Attempted to build a $runtimeType, but it already has an HTML '
'element ${existingElement.tagName}.',
);
}
}
assert(rootElement == null);
assert(debugAssertSurfaceState(this, PersistedSurfaceState.created));
rootElement = createElement();
assert(rootElement != null);
Expand Down