waft-widgets 0.4.0

Widget framework and widgets for Waft
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
# waft-widgets/src
Flutter home: packages/flutter/lib/src/widgets
Ported against: ed2132410ee94b5a590cb7f67cee7a6ea9101a60

## Identical
- widgets/constants.rs → constants.dart
- widgets/expansible.rs → expansible.dart
- widgets/sliver_persistent_header.rs → sliver_persistent_header.dart
- widgets/shared_app_data.rs → shared_app_data.dart
- widgets/annotated_region.rs → annotated_region.dart
- widgets/scroll_activity.rs → scroll_activity.dart
- widgets/scroll_notification_observer.rs → scroll_notification_observer.dart
- widgets/autofill.rs → autofill.dart
- widgets/spell_check.rs → spell_check.dart
- view.rs → view.dart
- widgets/notification_listener.rs → notification_listener.dart
- widgets/safe_area.rs → safe_area.dart
- widgets/value_listenable_builder.rs → value_listenable_builder.dart
- widgets/sliver.rs → sliver.dart
- widgets/navigation_toolbar.rs → navigation_toolbar.dart
- widgets/standard_component_type.rs → standard_component_type.dart
- widgets/title.rs → title.dart
- widgets/scroll_simulation.rs → scroll_simulation.dart
- widgets/scroll_metrics.rs → scroll_metrics.dart
- widgets/primary_scroll_controller.rs → primary_scroll_controller.dart
- widgets/scroll_controller.rs → scroll_controller.dart
- widgets/single_child_scroll_view.rs → single_child_scroll_view.dart
- widgets/pages.rs → pages.dart
- widgets/pop_scope.rs → pop_scope.dart
- widgets/modal_barrier.rs → modal_barrier.dart
- widgets/navigator_pop_handler.rs → navigator_pop_handler.dart
- widgets/text.rs → text.dart (+ `RichText` from basic.dart)
- widgets/status_transitions.rs → status_transitions.dart
- widgets/text_editing_intents.rs → text_editing_intents.dart
- widgets/text.rs → text.dart (+ `RichText` from basic.dart)
- widgets/preferred_size.rs → preferred_size.dart
- widgets/context_menu_button_item.rs → context_menu_button_item.dart
- widgets/text_selection_toolbar_anchors.rs → text_selection_toolbar_anchors.dart
- widgets/desktop_text_selection_toolbar_layout_delegate.rs → desktop_text_selection_toolbar_layout_delegate.dart
- widgets/text_selection_toolbar_layout_delegate.rs → text_selection_toolbar_layout_delegate.dart
- widgets/animated_size.rs → animated_size.dart

## framework/ → framework.dart

- Change: a `State` is destroyed with its element at unmount, and `mounted` is the only safe call on a retained handle afterwards.
  Reason: language — no garbage collector keeps Dart's disposed `State` alive; the arena frees the slot.
  Affect: Dart's `if (mounted) setState(..)` guard from a timer or listener still works, but reading `widget` or `context` on an unmounted state panics with a stale-handle message instead of returning the last widget.

- Change: a panic in `build` unwinds; there is no `ErrorWidget` and no `FlutterError.reportError`, and a failed `of` lookup panics with its message in every build.
  Reason: language — no catchable exception for ordinary control flow.
  Affect: a failing build takes the frame down instead of painting the red error box, and a failed lookup reports the same in release as in debug.

- Change: a `ParentDataWidget` names the parent-data types it accepts, and `Positioned` accepts an overlay theater's parent data as well as a `Stack`'s.
  Reason: language — no subtyping between parent-data types, so Dart's `is StackParentData` test cannot pass for a subclass.
  Affect: a `ParentDataWidget` over a render object whose Dart parent data is a subclass of the expected one is rejected unless the widget names that type too.

## binding.rs → binding.dart

- Change: `WidgetsBinding`'s lifecycle and exit handlers do not catch a panicking observer.
  Reason: language — no `FlutterError.reportError` hook to catch and continue.
  Affect: one failing observer unwinds the lifecycle change or the exit request, and the observers after it hear nothing.

- Change: `WidgetsBindingObserver::did_change_drag` and the `DropListener` hear what is dragged from outside the application, from `EmbedderClient::drag_report`, and the listener's `on_dropped` hands over the dropped items as a paste hands over its own; Flutter has no drop in its framework and leaves it to plugins.
  Reason: platform — the host reports the drag at the window, and the binding's observers are where window-level events reach the tree.
  Affect: any observer hears every drag over any view, an `on_dropped` callback starts each read it wants before it returns, as the HTML spec's drag data store is protected until the drop, and with a host that reports no position the whole view is the target.

- Change: `WidgetsBinding` follows the platform's caption settings itself and tells its observers each change through `WidgetsBindingObserver::did_change_caption_style`, which Flutter has no counterpart of.
  Reason: platform — the caption settings tell their changes by a future of their own, where the other system settings reach the binding through the dispatcher.
  Affect: every observer hears each change of the user's caption style, for as long as the app runs.

- Change: `run_app` builds its content in every view the platform gives the app, and where it gives none at start, as on a desktop, asks for a window through a `WindowController` configured as `run_app_with` says and panics if the platform refuses, where Flutter's `runApp` draws into the implicit view.
  Reason: platform — there is no implicit view: the platform gives the app its views or makes them on request.
  Affect: an app given several views shows its content in each, with its own state; a request to close the app's last view asks to quit, as Cmd-Q does; an app embedded where views come later starts with `run_widget` over a `MultiViewApp`, as Flutter's web multi-view apps start with `runWidget`.

- Change: `WidgetsBinding::handle_clipboard_event` hands the host's copy, cut and paste to the primary focus as `CopySelectionTextIntent` and `PasteTextIntent`, with the event as the clipboard while they run.
  Reason: platform — a host that owns the user's copy and paste, as a browser does, sends them as events, where Flutter's web engine has the browser paste into its own hidden text field.
  Affect: the browser's or an Edit menu's Copy, Cut and Paste act on whatever widget has the focus, a selectable text included.

- Change: `WidgetsBinding::handle_edit_command` hands the system Edit menu's undo, redo, select all and delete to the primary focus as `UndoTextIntent`, `RedoTextIntent`, `SelectAllTextIntent` and a forward `DeleteCharacterIntent`; Flutter's macOS embedder sends the field its selectors through the text input channel instead.
  Reason: platform — the host sends Edit's items as commands for the focused view, as it sends copy, cut and paste.
  Affect: Edit's items act on whatever widget has the focus and handles the intent, and on nothing when none does.

- Change: the binding hears every tray icon's events and hands each to the listener set for its icon (`add_tray_icon_listener`); Flutter has no tray.
  Reason: platform — the host reports a tray icon's events through one client hook, and several icons, each a `PlatformTrayIcon` or one the app added itself, hear their own.
  Affect: an app that adds an icon itself hears it through a listener, since the binding owns the hook.

- Change: the binding makes its `DefaultPlatformMenuDelegate` over the app, which sets menus on the platform's `MenuBar` and hears its choices through `EmbedderClient::menu_selected`, where Flutter's binding makes one over `SystemChannels.menu`.
  Reason: platform — there are no method channels; the host trait is the channel.
  Affect: a `PlatformMenuBar` sets nothing on a host without a menu bar, where Flutter's channel call fails unheard.

- Change: `WidgetsBindingObserver` hears a view added or removed by its id (`did_add_view`, `did_remove_view`) and a request to close one (`did_request_view_close`), where Flutter tells only `didChangeMetrics` and a listener compares `platformDispatcher.views` with what it had.
  Reason: platform — the host reports each view's arrival, departure and close request by view, and every view the app has arrives this way.
  Affect: the observers hear only the views no `WindowController` asked for, and a close request stops at the first observer that answers `true`.

- Change: each element marked dirty outside a build pass asks for a frame of its own view, or of every view for one above every `View`, where Flutter asks once for the first.
  Reason: platform — another view may be hidden and get no frames, while each frame builds every dirty element.
  Affect: a `setState` in one window gives that window a frame and is built at the first frame of any window.

## multi_view_app.rs → `MultiViewApp` of Flutter web's embedding guide

- Change: `MultiViewApp` is a framework widget, where Flutter shows it as a sample in its web embedding guide, and it answers close requests on its views.
  Reason: platform — there is no implicit view, so every app that is given views builds them this way.
  Affect: it builds only the views the platform gave, never one the app asked for, a window's or one on a layer; an app's root is a `MultiViewApp`, its own `Window`s, or both in a `ViewCollection`.

## windowing.rs → _window.dart (`WindowController`, `WindowControllerDelegate`)

- Change: `WindowController::new` asks the platform for a window and gets its view when the view arrives, where Flutter's controller makes the window within its constructor; a close request goes to its handler, or closes it, as Flutter's delegate does by default.
  Reason: platform — the host makes a window on its own loop, and the view arrives later, carrying the request's id.
  Affect: a controller has no view at first, and its listeners hear the view arrive and go; one closed before its view arrives closes the window as it arrives, unseen, and its listeners hear its request end with no view.

- Change: a window controller answers whether its window is minimized and whether it is occluded, and its listeners hear each time the host says either changed or the window moved, where Flutter's controller asks the platform whether its window is minimized, has no answer for a covered one, and is notified by each platform's own windowing, on Windows at every resize and activation too.
  Reason: platform — the host hears a window's changes and reports them by view, and a resize already reaches the app as the view's metrics.
  Affect: a controller with no window answers no to both, its listeners hear the window minimized, covered, shown again or moved but not resized, and the window of a view no controller asked for changes unheard.

- Change: `ViewRequest` is a view the app asked for, a window's, which a `WindowController` holds and adds a window's closing to, or one on a composition layer of the app's own (`ViewRequest::on_layer`), whose one state is pending, arrived with its view, refused or ended, and whose listeners hear each change, where Flutter's framework has no object for a view its embedder adds.
  Reason: platform — the host adds a view on a layer on its own loop, as it makes a window, so either view arrives later carrying its request's id.
  Affect: an app has a view on its layer once the request's listeners hear it arrive, gives it its size and sight and removes it through the platform's view embedder, and no `MultiViewApp` builds it; `on_layer` answers no request where the platform has no view embedder; a request ends when its view goes or its window is closed before the view came, so nothing waits for a view that will not come.

- Change: `WidgetsBinding::windowing_owner` is one `WindowingOwner` that keeps the requests and the window controllers by their ids and hears every view event first, claiming the views the app asked for, where Flutter's is an abstract factory with an implementation per platform, which `createWindowingOwner` and a setter replace.
  Reason: platform — the host makes the windows behind `Platform::request_view` and the views behind `ViewEmbedder::add_view`, so what differs between platforms is the host's, and the owner only matches arriving views to requests.
  Affect: no app or test installs a windowing owner of its own; a test stands in for windows and for views on layers through its platform's `request_view` and its view embedder.

## widgets/composition_layer_view.rs → platform views (`AndroidView`, `UiKitView`, `Texture`)

- Change: one `CompositionLayerView` widget shows a composition layer on every platform, where Flutter has a widget per platform and `Texture`.
  Reason: platform — a layer is a rectangle and its content on every compositor, and only the buffer's type differs, which the layer carries.
  Affect: the widget takes no input and reports no size, so an app wraps it in a `Listener` and tells the producer the size itself.

## widgets/video_frame_view.rs → `Texture`

- Change: `VideoFrameView::new(reader)` draws the frames of a `VideoFrameReader` the app made and gave a player or a camera session, where Flutter's `Texture(textureId:)` draws a texture a plugin registered.
  Reason: platform — the reader is the frame source, as Android's `TextureView` draws its `SurfaceTexture`, beside `CompositionLayerView` as `TextureView` is beside `SurfaceView`.
  Affect: a video drawn by the framework clips, turns, fades and takes effects like anything painted, where a `PlayerView` has the system show it on a layer, the cheaper way and the only one for protected or HDR video.

## media/ → the `video_player` package's `VideoPlayerController` and `VideoPlayer`, and the `camera` package's `CameraController`, `CameraPreview` and `availableCameras`

- Change: `Player` is a listenable over the host's player, made from a URL and loading by itself, with no `initialize` and no copied value, and `PlayerView::new(player)` shows it, where Flutter's `VideoPlayerController` is initialized and `VideoPlayer` takes the controller.
  Reason: platform — the host's player is the system's, which loads by itself and reports its state, and a host without players answers none.
  Affect: an app calls `play` on a new player, `Player::new` answers `None` where the platform has no players, a URL the system cannot play reports a failure, and a `PlayerView` takes the video's size in logical pixels, or none until it is known.

- Change: `open_camera` opens a camera, asking the user the first time, and `CameraSession::start` starts it in one of its formats with all its outputs at once, answering once it runs or is interrupted, a listenable that tells the format it runs in and whether it runs, is interrupted or ended, and `CameraPreview::new(session)` shows its preview, where Flutter's `CameraController` initializes a camera with a resolution preset and takes pictures and videos itself.
  Reason: platform — the host's session is the system's, which configures all its outputs together, and a platform without cameras answers none.
  Affect: `open_camera` answers `None` where the platform has no cameras, an app gives the preview's layer, a frame reader, a photo size and recordings as the session starts, a photo arrives as encoded bytes and a recording at the app's path.

- Change: `available_cameras_changed` answers a future that resolves at the next change of what `available_cameras` answers, such as a camera plugged in or out, where Flutter's `availableCameras` tells no change.
  Reason: platform — the host's cameras tell when their list changes, as every system tells an app.
  Affect: an app lists the cameras again each time one comes or goes, asking for a new future after each, and gets `None` where the platform has no cameras.

- Change: a `PlayerView` makes a composition layer of its own and puts its player's picture there as it is mounted, which the system draws into, and nowhere as it is unmounted, unless another view took it since, and a `CameraPreview` places the layer its session started with; the frames of whichever view it is in place the layer.
  Reason: platform — the picture is drawn by the system into a layer that is the composition layer's content, which no frame of the framework's touches, and a camera's outputs are given as it starts.
  Affect: a player shows on the view built for it last and nowhere once its views are gone, a camera's preview shows where its `CameraPreview` is, and nothing shows where the host has no compositor.

- Change: a `Player` lists its media's tracks in its state, selects an audio track and a text track or none, and tells the media's metadata and the cues to show now, and a `PlayerView` draws those cues over the video with a `SubtitleView`, as Media3's `PlayerView` does, where Flutter's `VideoPlayer` shows no subtitles and an app puts a `ClosedCaption` of a caption file it parsed over it.
  Reason: platform — the system draws no subtitles: the host's player hands out the cues of the media's own text tracks, as the media styles them.
  Affect: a `PlayerView` shows the subtitles of the text track selected, in the user's caption style, with no code of the app's, and an app that draws the frames itself puts a `SubtitleView` of `Player::cues` over its video.

- Change: `Player::position` reads the host's player's position at each call and a `Player`'s listeners hear it only when it jumps, at every change its host tells, where Flutter's `VideoPlayerValue.position` is a copy its controller refreshes on a timer and tells at each refresh.
  Reason: platform — the host's player is read when the app needs its position and tells only its jumps, as every system's player does.
  Affect: a widget that shows the position while the player plays reads it at each frame, ticking with a `Ticker` from its state's ticker provider while the state says it plays, and a `Player`'s listeners also hear a change that left its state, metadata and cues as they were.

## media/subtitle_view.rs, media/subtitle_painter.rs → Media3's `SubtitleView`, `CanvasSubtitleOutput` and `SubtitlePainter` (androidx/media at 8c6678b, Apache 2.0)

- Change: `SubtitleView` always draws in the user's caption style, which it reads from the ambient `MediaQuery`, merged into each cue setting by setting, a setting that applies always over the media's styling and one that applies where the media says nothing beneath it, colours and their opacities on their own, where Media3's draws in the style an app sets, the user's only after `setUserDefaultStyle`, which it reads once, with every embedded style over it or, with `setApplyEmbeddedStyles(false)`, none.
  Reason: platform — the user's caption style is a system setting beside the cues, and Apple's settings each say whether they apply always or only where the media says nothing, which Chromium's and WebKit's cue style sheets honour.
  Affect: an app sets no caption style, text size or embedded-style switch on the view, the user's style changes the subtitles shown at once, a platform without caption settings shows the media's own style, and the runs of one cue can have different edges.

- Change: `SubtitleView` rounds the box behind a cue by the style's corner radius, draws a kind of font the style names in the family Chromium draws it in, and draws an edge whose colour neither the media nor the style says in black, where Media3's style has no corner radius or kind of font and its default edge colour is white.
  Reason: platform — Apple's style gives a corner radius and an edge with no colour, which Chromium and WebKit draw black, and Windows gives a kind of font rather than a family.
  Affect: subtitles on a Mac show the rounded box and the black edges the user set, and small capitals are drawn in their family's own letters, since a run takes no font features.

## widgets/banner.rs → banner.dart

- Change: `BannerPainter` answers no `repaint` listenable, where Dart repaints on `PaintingBinding.systemFonts`.
  Reason: platform — the binding raises no system-font change yet.
  Affect: a banner does not repaint when the system fonts change.

## widgets/basic.rs → basic.dart (+ `WidgetBuilder` from framework.dart, `Spacer` from spacer.dart, `IndexedStack` from indexed_stack.dart)

- Change: a Dart constructor assert runs on the setter that can violate it, or, when it needs several fields, when the element creates or updates the render object; every widget in this crate with such asserts follows this.
  Reason: language — a struct literal has no constructor body, and a fluent setter cannot see the arguments a later setter will supply.
  Affect: an invalid combination panics during build rather than where the widget is written, and a single-field assert fires at its setter, so a chain Dart's constructor would accept (`Positioned::fill(..).width(..)`) panics at `.width`.

- Change: the semantics flags (`Opacity.alwaysIncludeSemantics`, the deprecated `ignoringSemantics`) and `Transform.filterQuality` are absent, here and in the transitions and implicit animations built on these widgets.
  Reason: platform — accessibility is deferred, and `RenderTransform` carries no filter quality.
  Affect: a transformed subtree is always applied by re-rendering the child, never rasterised through an image filter.

- `BackdropFilter`'s blend modes and anisotropic sigmas follow rendering's `RenderBackdropFilter` entry.

## widgets/container.rs → container.dart

- Change: `Container.color` and `decoration`'s mutual exclusion is asserted by whichever of the two setters runs second; the margin, padding and constraints asserts run on their own setters (basic.rs's assert entry).
  Reason: language — a struct literal has no constructor body.
  Affect: `.color(..).decoration(..)` panics at `.decoration` with Dart's message, in either order.

## widgets/ticker_provider.rs → ticker_provider.dart

- Change: `TickerMode::get_notifier` returns a fresh wrapper on every call, and its fallback is a fresh constant listenable.
  Reason: language — a `dyn` value has no identity of its own, and foundation's erased `Listenable` value is deferred (this is its trigger).
  Affect: two notifiers for one `TickerMode` never compare equal, so the ticker mixins drop and re-add their listener on every `activate`.

- Change: a ticker vended by `TickerProviderStateMixin` stays in the state's set after it is disposed.
  Reason: language — Dart's `_WidgetTicker` subclasses `Ticker` to unregister itself, and `dispose` here is an inherent method on a concrete arena struct.
  Affect: a state that churns animation controllers holds one handle per dead ticker until it is itself disposed, and muting a disposed ticker does nothing.

## widgets/transitions.rs → transitions.dart

- Change: the tweens this crate declares are `Clone` values built without the `App`, where `waft-animation`'s are arena objects.
  Reason: language — orphan rule: an `Animatable` impl on a handle to a tween would name only foreign types.
  Affect: `drive` drives a clone, so writing `begin` or `end` afterwards does not reach the running animation as it does on a Dart `Tween`.

- `SizeTransition`'s constructor asserts run on its setters, the mutually exclusive `axis_alignment` / `alignment` on whichever runs second; see basic.rs's assert entry.
- `MatrixTransition` (so `ScaleTransition` and `RotationTransition`) has no `filterQuality` and `FadeTransition` no `alwaysIncludeSemantics`; see basic.rs's `Transform` entry.

## widgets/icon_theme_data.rs → icon_theme_data.dart, widgets/icon_theme.rs → icon_theme.dart

- Change: a `CupertinoIconThemeData` is an `IconThemeData` carrying a `resolve` override, which `copy_with` and `merge` keep and `lerp` drops.
  Reason: language — `IconTheme.data` is a value, not a subclassable object.
  Affect: a lerped cupertino icon theme resolves like a plain one, where Dart's subclass keeps resolving as itself.

## widgets/icon.rs → icon.dart

- Change: `Icon` has no `semanticLabel`, and its build returns the sized glyph without Dart's `Semantics` wrappers.
  Reason: platform — accessibility is deferred.
  Affect: nothing announces the icon; the render tree is one node shallower on each side.

## widgets/gesture_detector.rs → gesture_detector.dart

- Change: `replaceGestureRecognizers`'s `FlutterError` is a `debug_assert!`.
  Reason: language — no catchable exception; diagnostics deferred.
  Affect: calling it outside layout panics in debug and proceeds in release.

## widgets/media_query.rs → media_query.dart

- Change: `MediaQueryData::from_view` reads the platform's brightness, its system context menu and the user's caption style, and leaves the accessibility, text-scaling, gesture-inset and corner-radius fields at their defaults.
  Reason: platform — `Platform` exposes `platform_brightness`, `system_context_menu` and `caption_settings` only, and `ViewMetrics` has no gesture insets or corner radii.
  Affect: those fields are only non-default when an ambient `MediaQuery` supplies `platform_data`.

- Change: `MediaQueryData` carries the user's caption style, which `MediaQuery::from_view` takes again at each change, where Flutter's carries no caption style.
  Reason: platform — the caption style is a system accessibility setting, as bold text and the text scale are, and the systems that keep one tell when the user changes it.
  Affect: a widget that reads `MediaQuery::caption_style_of` is built again when the user changes their caption style, which is `None` where the platform keeps no caption settings.

## widgets/image.rs → image.dart

- Change: `ImageState` keeps a failed load to itself, where Dart also hands the failure to `FlutterError.onError`.
  Reason: language — there is no isolate-wide error hook to report it to.
  Affect: a failed image leaves an empty box and nothing in the log, and a caller that wants to react reads the failure off the state.

- Change: `create_local_image_configuration` leaves `bundle` and `locale` unset.
  Reason: platform — `DefaultAssetBundle` and `Localizations` wait.
  Affect: an `ImageProvider` keyed by bundle or locale resolves against `None`.

## widgets/widget_state.rs → widget_state.dart

- Change: `WidgetStateMapper::resolve` panics with Dart's `ArgumentError` message when no key is satisfied, for every value type.
  Reason: language — Dart's `null as T` is a runtime test of `T`'s nullability, which a Rust generic cannot make without specialization.
  Affect: a mapper over an `Option` panics on an unmatched set instead of resolving null, unless the map ends with a `WidgetState::any()` entry.

- Change: `WidgetStateColor` is an `AnyColor` whose plain value is its empty-state resolution, read back with `color.extension::<WidgetStateColor>()`.
  Reason: language — painting's `Color` is a value, not a subclassable object.
  Affect: a map-built colour read as a plain `Color` gives its empty-state resolution where Dart throws, and panics only when no key matches the empty set.

- Change: `clickable()`, `adaptive_clickable()` and `textable()` return a fresh `WidgetStateMouseCursor` per call.
  Reason: language — no `static const` object holding an `Rc`.
  Affect: two such cursors are never equal, so a `MouseRegion` handed one per build re-annotates every build where Dart's canonical `const` compares equal; map-built cursors compare by map equality.

## framework: notifications → framework.dart (`Notification`, `NotifiableElementMixin`, `_NotificationNode`)

- Change: `NotificationListener<T>` matches one concrete notification type, or a family such as `dyn ScrollNotification` that a notification declares itself part of.
  Reason: language — Dart's `notification is T` covers subclasses, and a trait family has no `TypeId` a downcast can name.
  Affect: a listener sees only that exact type or a declared family, where Dart's also catches every subclass.

## widgets/page_storage.rs → page_storage.dart

- Change: `PageStorageBucket` stores erased values and `PageStorageKey` carries no type argument.
  Reason: language — an erased key cannot be recognised as a generic type.
  Affect: reading state back under a type other than the one written yields `None` rather than the stored value.

## widgets/scroll_delegate.rs → scroll_delegate.dart

- Change: `SliverChildListDelegate::should_rebuild` compares the two child lists pairwise (length, then `Rc::ptr_eq`).
  Reason: language — Dart compares the two `List` references, and a `Vec` has no identity.
  Affect: a delegate rebuilt from a fresh list of the same widget references does not rebuild its children, where Dart's list-identity check would.

## widgets/viewport.rs → viewport.dart

- `Viewport`'s center and cache-extent asserts run on whichever of the setters they need runs second; see basic.rs's assert entry.

## widgets/default_text_editing_shortcuts.rs → default_text_editing_shortcuts.dart

- Change: the shortcut tables are functions that build a fresh `ShortcutMap` per call, and so is `intent_for_macos_selector`.
  Reason: language — an `Rc` value cannot be a `const`, and the target platform is a property of the host-supplied `Platform`.
  Affect: the `ShortcutManager` re-indexes on every rebuild of this widget instead of seeing an unchanged const map.

- Change: the keys a platform is said to handle itself are only stood aside for when the host says it turns editing keys into edits.
  Reason: platform — Dart stands aside for every macOS and iOS host because its embedders for those two are the only ones it has; a host that reports plain key presses interprets nothing, so standing aside would leave those keys to nobody.
  Affect: over such a host a field's backspace, delete and arrow keys edit the text instead of doing nothing, on macOS and iOS as everywhere else.

- Change: where the host says the system's menus send Edit's cut, copy and paste, a field stands aside for those keys, the clipboard entries of the web's table, with Control and with Command, and acts on the `clipboard_event` the menu sends; Dart does so on the web only.
  Reason: platform — such a menu takes the key once the framework leaves it, and its command is the system's own, which a host may require for a paste.
  Affect: on macOS with the standard Edit menu, ⌘C, ⌘X and ⌘V reach a field through the menu, which flashes, and select all stays the field's.

## widgets/app.rs → app.dart

- `WidgetsApp`'s constructor asserts run when the widget is inflated, so a contradictory configuration panics at mount; see basic.rs's assert entry.

- Change: `WidgetsApp::default_shortcuts` and `default_actions` build a fresh value per call, with new action objects.
  Reason: language — an `Rc` or an arena handle cannot be a `const`, and Dart's `defaultActions` is one mutable map of shared action objects.
  Affect: modifying the returned map changes only the app it is passed to, where Dart's global map is shared by every `WidgetsApp`.

- Change: the default navigation-notification handler stops the notification without telling the host, so `WidgetsApp` keeps no lifecycle state for it.
  Reason: platform — `EmbedderClient::pop_route` answers the host on the spot, so it needs no notice in advance.
  Affect: an `on_navigation_notification` of your own still runs in place of the default.

## widgets/scroll_context.rs → scroll_context.dart

- Change: a scroll context hands its positions one shared `Rc<dyn ScrollContext>`, compared by pointer where Dart compares `this`.
  Reason: language — an `Rc` has no `==` by object identity.
  Affect: a context that mints a fresh `Rc` per position fails `absorb`'s identity check.

## widgets/scroll_physics.rs → scroll_physics.dart

- Change: the deprecated `tolerance` getter is not ported.
  Reason: platform — it reads the implicit view's device pixel ratio, and there is no implicit view.
  Affect: call `tolerance_for(metrics)`, as Flutter asks.

## widgets/scroll_notification.rs → scroll_notification.dart

- Change: the five scroll notifications answer `is ScrollNotification` through a declared family slot, and none of them is a `LayoutChangedNotification`.
  Reason: language — no inheritance, so a listener matches an exact type or a declared family.
  Affect: a `NotificationListener<LayoutChangedNotification>` does not see scroll notifications, where Dart's does.

## widgets/scroll_position.rs → scroll_position.dart

- Change: everything that reads a position's metrics — the physics, a `ScrollMetricsNotification`, `ScrollIncrementDetails` — is handed a `copy_with` snapshot instead of the position itself.
  Reason: language — the axis direction and device pixel ratio are live reads of the `ScrollContext`, which needs the arena the `&self` `ScrollMetrics` trait does not have.
  Affect: a `ScrollPhysics` sees the metrics as they were at the call, not the live position Dart lets it re-read.

- Change: the semantic-action bookkeeping and the `notifyListeners` override that ran it are gone.
  Reason: platform — `ScrollContext.setSemanticsActions` is deferred (accessibility).
  Affect: nothing schedules a semantics update when the offset or the dimensions change.

## widgets/scroll_position_with_single_context.rs → scroll_position_with_single_context.dart

- Change: `absorb` tests the other position by downcasting to its own leaf type rather than for the `ScrollPositionWithSingleContext` base.
  Reason: language — the arena answers only the type a handle was created with.
  Affect: absorbing a position of a different leaf type goes idle and keeps its own scroll direction and drag, where Dart hands both over.

## widgets/scroll_configuration.rs → scroll_configuration.dart

- Change: `build_overscroll_indicator` returns the child on every platform.
  Reason: platform — `GlowingOverscrollIndicator` is not ported (`## Deferred`).
  Affect: a scroll view has no overscroll glow, so its tree is one node shallower.

## widgets/scrollable.rs → scrollable.dart, widgets/scrollable_helpers.rs → scrollable_helpers.dart

- Change: `build` wraps the viewport in `Listener` → `RawGestureDetector` → `IgnorePointer` only: the semantics wrappers and the selection handler are gone.
  Reason: platform — accessibility and selection are deferred (`## Deferred`).
  Affect: a scrollable exposes no scroll actions to a screen reader and cannot be selected across; its tree is three nodes shallower.

- Change: a pointer scroll signal is resolved through gestures' `PointerSignalResolver`, but the host is not told the event was handled.
  Reason: platform — `PointerEvent.respond` is omitted on signal events (waft-gestures records it).
  Affect: an embedder that would scroll the page itself is not told the scrollable took the event.

## widgets/scroll_view.rs → scroll_view.dart

- Change: the physics a primary scroll view implies is substituted in `build`, not stored on the widget.
  Reason: language — a fluent setter cannot see the `primary`, `controller` and direction a later setter will supply.
  Affect: `view.physics` reads `None` where Dart's field already holds the implied `AlwaysScrollableScrollPhysics`; the `Scrollable` is given the same physics either way.

- Change: `ListView`'s and `GridView`'s `children` and `add*` arguments are setters, whichever of them runs last rebuilding the delegate out of all of them, and `ListView::builder(..)`, `separated(..)`, `GridView::builder(..)`, `count(..)` and `extent(..)` are separate values that convert to the widget, `count` and `extent` holding their grid delegate's arguments.
  Reason: language — a fluent setter cannot see the arguments a later setter will supply, and the delegate is built from four of them.
  Affect: any order of those four setters lands on the delegate Dart's constructor builds, and all four panic on a builder-, separated- or custom-constructed view; the scroll view's own arguments are set on the converted widget.

## widgets/focus_manager.rs → focus_manager.dart

- Change: the manager takes key events one at a time from `HardwareKeyboard`; there is no `KeyMessage`, no `RawKeyEvent` and no `FocusNode.onKey`.
  Reason: platform — services' raw key path and `KeyEventManager.keyMessageHandler` are deferred (`waft-services/src/PORTING.md`).
  Affect: a node handles keys through `on_key_event` only, and the Android virtual-keyboard check that suppresses a highlight change does not run.

- Change: `size`, `offset` and `rect` read the context's render object as a `RenderBox` and use its size where Dart reads `semanticBounds`.
  Reason: platform — `semanticBounds` waits with semantics; on a box it is exactly that rectangle.
  Affect: a focus node whose context hosts something other than a `RenderBox` panics instead of returning that object's paint bounds.

## widgets/focus_scope.rs → focus_scope.dart

- Change: `Focus.includeSemantics` is carried but nothing reads it, and the debug focus border is absent.
  Reason: platform — accessibility is deferred; diagnostics wait.
  Affect: a focusable widget exposes no semantics focusable / focused flags and cannot be focused by a semantics action.

## widgets/actions.rs → actions.dart

- Change: Dart's `const ActionDispatcher()` is `PlainActionDispatcher`, a fresh object per call.
  Reason: language — no `const` object holding an `Rc`, and a trait and a struct cannot share a name.
  Affect: two dispatchers are never equal, so an `Actions` widget that sets one rebuilds its dependents on every update.

- Change: `FocusableActionDetector.includeFocusSemantics` is carried but nothing reads it.
  Reason: platform — accessibility is deferred.
  Affect: a detector exposes no semantics focusable / focused flags.

## widgets/shortcuts.rs → shortcuts.dart

- Change: shortcuts are an insertion-ordered list of activator and intent pairs, not a map; `CallbackShortcuts.bindings` has the same shape.
  Reason: language — an erased `ShortcutActivator` has no content hash to key a map with.
  Affect: two entries with equal activators both stay where Dart's map keeps only the last, and reordering the list counts as a change.

## widgets/restoration.rs → restoration.dart, widgets/restoration_properties.rs → restoration_properties.dart

- Change: the root bucket is read within the call, so what Dart runs from the future's continuation runs inline.
  Reason: platform — the host's `Restoration` capability answers within the call (waft-services' `root_bucket`).
  Affect: the first frame is never held back and a `RootRestorationScope` hands its child a bucket on its very first build, where Dart renders an empty container first.

- Change: `RestorableEnum` and `RestorableEnumN` serialize a value with its `Debug` output where Dart uses the enum's name, and keep duplicate `values`.
  Reason: language — a Rust enum has no reflected variant name.
  Affect: a hand-written `Debug` decides what is written to the restoration data, so a stored value is only restored while that output stays the variant name.

## widgets/overlay.rs → overlay.dart

- Change: the theater does not suppress the `markNeedsLayout` that adopting or dropping an overlay child performs, and the deferred layout box always re-schedules its subtree.
  Reason: language — a Rust impl cannot call the trait body it overrides, so neither the outstanding-update counter nor the dirty flag can be maintained.
  Affect: showing or hiding an `OverlayPortal` child relays out the whole `Overlay`, and the overlay child's subtree is laid out again whenever the `Overlay` or the `OverlayPortal` lays out; the resulting tree is the same, the work is not.

- Change: the theater's and the deferred layout box's children are collected into a `Vec` before each layout, paint and hit-test walk.
  Reason: language — a lazy iterator would borrow the `App` for the whole walk, and the body of the walk needs `&mut App`.
  Affect: an overlay child added or removed during the `Overlay`'s own layout is picked up on the next layout pass, not the current one.

## widgets/navigator.rs → navigator.dart

- Change: `Route::will_pop` and `NavigatorState::maybe_pop` answer within the call, where Dart returns a future.
  Reason: language — the only asynchrony in Dart's deprecated `willPop` is the callback loop deferred with `WillPopScope` (`## Deferred`).
  Affect: a pop is decided before the call returns, so nothing can hold the decision open; when the callback loop is ported, both become `CompleterFuture`s.

- Change: a route result is the erased `Option<Rc<dyn Any>>`; `Route`, `Page` and `TransitionDelegate` carry no result type.
  Reason: language — the navigator holds routes of mixed result types in one history, and a type-erased handle cannot carry a per-route type parameter.
  Affect: a popped result is downcast when it comes back and a mismatched type is simply `None`, where Dart's `T` is settled when the code is compiled.

## widgets/routes.rs → routes.dart

- Change: `RouteObserver` takes a `RoutePredicate` where Dart takes the type argument `R`.
  Reason: language — a Rust type parameter cannot answer "is this erased route an `R`" without a witness.
  Affect: which routes an observer is told about is whatever predicate it was given, not a route class.

- Change: `RawDialogRoute.buildPage` returns the page builder's widget directly, and there is no `anchorPoint`.
  Reason: platform — the `Semantics` and `DisplayFeatureSubScreen` wrappers Dart adds are deferred, and `anchorPoint` exists only to feed the latter.
  Affect: a dialog is not confined to the display-feature sub-screen closest to an anchor point.

- Change: `AnyTransitionRoute` carries `underlying_animation` beside `animation`, for the animation a route runs on rather than whatever a subclass answers with.
  Reason: language — Dart keeps the animation in a private field and offers a getter over it, and a `ModalRoute` overrides that getter with a proxy that reads complete while the route is offstage. Where the route behind measures the one ahead, Dart reaches past the override to the field, which library privacy lets it do; an erased route here is reached through a vtable, so the field needs an edge of its own, as `controller_value` already has.
  Affect: a route behind follows the next route's own animation and stays where it is while that route is offstage to be measured, instead of flashing the end of the transition before it plays.

## widgets/implicit_animations.rs → implicit_animations.dart

- Change: this file's tweens are value tweens in transitions.rs's shape, and the ones over a nullable Dart value animate an `Option` whose endpoints flatten, so an unset endpoint and one set to `None` are the same thing.
  Reason: language — the same orphan rule; Dart's `BorderRadius??` flattens where `Option<Option<_>>` does not, and `_constructTweens`' `tween.end ?? tween.begin` depends on that.
  Affect: a tween with an unset `begin` returns `None` at `t == 0` rather than panicking, and `Matrix4Tween` interpolates the host's f32 matrices, so a `decompose` / `compose` round trip is exact only to f32.

- Change: `ImplicitlyAnimatedWidgetState::dispose` runs `for_each_tween` once more to free each slot's tween; Dart's leaves its tweens alone.
  Reason: language — no garbage collector: a tween a slot's constructor made would hold its arena slot for the life of the `App`.
  Affect: a tween handle a state made is stale once the state is disposed, and a slot that `for_each_tween` skips (Dart's `_AnimatedAlignState` skips one when its factor is null) is never freed.

- `AnimatedScale` and `AnimatedRotation` have no `filterQuality`, and `AnimatedOpacity` no `alwaysIncludeSemantics`; see basic.rs's `Transform` entry.
- `AnimatedContainer`'s colour / decoration exclusion and its other constructor asserts run on the setters, as container.rs records; `width` and `height` fold into `constraints` on assignment, as `Container`'s do.

## widgets/visibility.rs → indexed_stack.dart (`Visibility`)

Flutter folded `visibility.dart` into `indexed_stack.dart`; this file keeps the old name, and the shared scope lives in basic.rs with the rest of `IndexedStack`.

- `Visibility`'s five `maintain*` asserts run on the widget's first build, so any order of the setter chain is accepted; see basic.rs's assert entry.

- Change: `maintain_semantics` is carried but nothing reads it.
  Reason: platform — accessibility is deferred.
  Affect: a hidden child is never reported to accessibility tools, `maintain_semantics` or not.

## widgets/draggable_scrollable_sheet.rs → draggable_scrollable_sheet.dart

- Change: `_replaceExtent` compares the old and new `snap_sizes` by value.
  Reason: language — Dart's `List` `==` is identity, and a `Vec` has none.
  Affect: rebuilding a snapping sheet with a fresh list of the same sizes does not schedule the post-frame snap Dart schedules.

## widgets/editable_text.rs → editable_text.dart

- Change: an app private command arrives with its action string only; the argument map Flutter sends is dropped.
  Reason: platform — the host's `perform_private_command` carries no map.
  Affect: a private command handler cannot read the arguments the platform sent with it.

- Change: `want_keep_alive` reads a focus flag the focus listener updates instead of walking the node.
  Reason: language — `FocusNode::has_focus` needs `&mut App`, which the getter does not have.
  Affect: keep-alive follows the last focus change the state handled, so it lags a change no listener has run for yet.

- Change: `EditableText` cannot tell whether its selection controls are handle-controls, so the default `toolbar_options` follow the read-only / obscured table in every case.
  Reason: language — an erased `TextSelectionControls` cannot be tested for the mixin.
  Affect: handle-controls no longer force an empty toolbar unless `toolbar_options` is set.

- Change: the selection's glyph heights are measured from its first and last Unicode scalar, not its grapheme clusters.
  Reason: language — there is no `characters` package.
  Affect: a selection that starts or ends inside a multi-scalar cluster (an emoji ZWJ sequence) sizes from that scalar's box, or falls back to `preferredLineHeight`.

- Change: a paste whose clipboard read finishes after the field left the tree is dropped, where Dart goes on with it.
  Reason: language — a disposed state's handle cannot be read.
  Affect: a field that closes while the clipboard is being read pastes nothing.

## widgets/undo_history.rs → undo_history.dart

- Change: `UndoHistory`'s `value` is any `ValueListenable<T>` handle, where Dart takes a `ValueNotifier<T>`.
  Reason: language — without subclassing, a `TextEditingController` is no `ValueNotifier`; both are value listenables.
  Affect: an `UndoHistory` can also track another value listenable, such as an animation.

## widgets/platform_menu_bar.rs → platform_menu_bar.dart

- Change: `PlatformMenuItem` is a trait with `PlainPlatformMenuItem` as Dart's concrete class, its shared bodies on `PlatformMenuItemBase`, and `to_menu_entries` builds `MenuEntry` values where Dart's `toChannelRepresentation` builds maps.
  Reason: language — no class inheritance; and platform — the menu crosses to the host as a value, not a channel message.
  Affect: a subclass of `PlatformMenuItem` implements the trait, and the delegate hands the host values it can check.

- Change: an item also has a `check` and an `icon`, which a native menu draws; Dart's `PlatformMenuItem` has neither.
  Reason: platform — AppKit, Win32 and the DBus menu draw check marks and icons, which only a menu the framework draws could draw otherwise.
  Affect: a checkbox or radio item shows its state in the system's menu.

- Change: `PlatformProvidedMenuItemType` adds `Undo`, `Redo`, `Cut`, `Copy`, `Paste`, `SelectAll` and `Delete`, and its speaking items map to no item of the host's.
  Reason: platform — the system knows its Edit menu by these, and the host sends them to the focused view (`ProvidedItem`); no host provides speech.
  Affect: an app gets the system's Edit menu with dictation and emoji on macOS, and `has_menu` answers no for the speaking items.

- Change: a tooltip is not carried, and `onOpen` and `onClose` are never called.
  Reason: platform — no host's menu interface says a menu opened or closed, and AppKit's menus show no tooltip the host sets.
  Affect: a menu's open and close callbacks stay silent, and a tooltip shows nowhere.

- Change: a provided item's label is the host's, in English, and its enabled state is the value's alone, where AppKit validates items through the responder chain.
  Reason: platform — the host builds each menu whole from the value and leaves deciding to the app.
  Affect: macOS's Enter Full Screen keeps its title in full screen, and an Edit item stays enabled with nothing to copy.

## widgets/platform_tray_icon.rs → no Flutter counterpart: `PlatformMenuBar`'s form, SwiftUI's `MenuBarExtra`'s lifetime, Electron's `Tray.setContextMenu`'s trigger

- Change: `PlatformTrayIcon` is an icon in the system's tray with an image, a tooltip, a menu of the items `PlatformMenuBar` takes and callbacks for a click and a double click, which Flutter does not have; it takes `PlatformMenuBar`'s form, a widget with no look of its own that hands the host a value on each change and dispatches a choice to the item's callback or intent, by ids of each icon's own.
  Reason: platform — a desktop app's tray icon is part of what it shows, and a value rebuilt from state is how this framework hands the host its menus.
  Affect: an app shows a tray icon by putting the widget in its tree, and several may be there at once.

- Change: the icon is there while the widget is in the tree, as SwiftUI's `MenuBarExtra` is while it is in its scene: added when the widget is mounted, once the host answers it, removed when it is unmounted, and updated by a rebuild.
  Reason: platform — the host's icon is a resource the widget owns, as a ticker or a focus node is a state's.
  Affect: an icon the system refuses, or one answered after the widget left the tree, shows nowhere.

- Change: the menu shows on each system's own trigger, as Electron's `Tray.setContextMenu` shows it: handed to the system where the icon offers a menu the system opens by itself (macOS, Linux), opened at the icon on `ContextMenuRequested` elsewhere (Windows).
  Reason: platform — each system decides when a tray's menu opens, and the framework, not the host, keeps the convention.
  Affect: the same widget gives a macOS click, a Linux desktop's trigger and a Windows right click the menu; an app that wants another trigger uses the icon's capabilities directly.

## widgets/system_context_menu.rs → system_context_menu.dart

- Change: custom item callback ids are a process-wide counter string, not Dart's `hashCode`.
  Reason: language — the item data is an enum, not an object with an identity hash.
  Affect: the host sees incrementing ids such as `"1"` rather than an object hash.

## widgets/text_selection.rs → text_selection.dart

- Change: a `ClipboardStatusNotifier` with listeners also updates each time the host says the clipboard changed.
  Reason: platform — Flutter's engines never say the clipboard changed; a host that can tell, says so.
  Affect: a toolbar's Paste button follows a copy made in another app without the app having to resume first.

- Change: `show_toolbar` uses `context_menu_builder` whenever it is set, and only otherwise the deprecated `build_toolbar` path.
  Reason: language — an erased `TextSelectionControls` cannot be asked whether it is handle-controls.
  Affect: old-style controls combined with a context-menu builder show the builder, where Dart would still call `buildToolbar`.

- Change: each overlay owns its context-menu and spell-check `OverlayEntry`; there is no `ContextMenuController` singleton.
  Reason: language — Dart's static `_shownInstance` is isolate-global.
  Affect: two `SelectionOverlay`s can show two menus at once.

- Change: the selection handles' glyph heights are measured from the first and last Unicode scalar, not the grapheme clusters.
  Reason: language — there is no `characters` package.
  Affect: a selection that starts or ends inside a multi-scalar cluster (an emoji ZWJ sequence) sizes from that scalar's box, or falls back to `preferredLineHeight`.

## widgets/feedback.rs → feedback.dart

- Change: `for_tap` is a no-op; `for_long_press` calls only `HapticFeedback` (`vibrate` on Android/Fuchsia, `heavy_impact` on iOS).
  Reason: platform — `SystemSound` and semantics events are not on the host surface.
  Affect: a tap plays no click; iOS long-press has no click sound.

## widgets/tap_region.rs → tap_region.dart

- Change: `RenderTapRegionSurface` records the hit path on its own hit-test entry target instead of an `Expando` keyed by entry identity.
  Reason: language — `BoxHitTestResult` is a borrow of `HitTestResult` and `BoxHitTestEntry` is a value; neither can be an `Expando` key holding the path.
  Affect: the surface appears in the hit-test path as that target rather than as a `BoxHitTestEntry`.

- Change: `RenderTapRegion` registers after `perform_layout` and unregisters in `did_detach`, where Dart overrides `layout` and `dispose`.
  Reason: language — `layout` and `dispose` are not virtuals a leaf can wrap.
  Affect: a region stops being registered as soon as it detaches, not only when its slot is destroyed, and the next layout registers it again.

## widgets/magnifier.rs → magnifier.dart

- Change: `MagnifierController::show` inserts the builder as-is, where Dart wraps it in an `InheritedTheme` capture from the originating context.
  Reason: language — `InheritedTheme`'s `wrap` and `capture` are not ported.
  Affect: a magnifier in the root overlay does not inherit themes from the context that showed it.

## widgets/drag_target.rs → drag_target.dart

- Change: a drag payload is an `Rc<T>` and a target accepts a draggable by matching that concrete Rust type.
  Reason: language — Rust has no runtime subtype relation to test a payload against a target's type.
  Affect: a draggable and a target pair up only on the same type, so a shared payload model has to be one type (an enum), where Dart also matches subtypes.

- Change: an active drag retains its source state, entered targets and feedback avatar in the arena until it ends.
  Reason: language — no garbage collector, and the pointer callbacks outlive the widgets that started the drag.
  Affect: a drag continues after its source widget is removed, and the retained objects are released when it completes or is cancelled.

## widgets/widget_span.rs → widget_span.dart

- Change: `WidgetSpan::extract_from_inline_span` wraps each inline widget in its parent-data and scaling widgets only, without Dart's `Semantics` tagged with the placeholder's index.
  Reason: platform — the `Semantics` wrappers Dart adds are deferred, as on `RawDialogRoute`.
  Affect: an inline widget contributes no semantics node of its own.

## widgets/table.rs → table.dart

- Change: `Table`'s constructor checks (a baseline alignment has a `text_baseline`, the rows have the same number of cells, no row is empty) run when the table creates or updates its render object.
  Reason: language — Rust has no named arguments, so the table is built by setters that each see one argument, and none sees them all.
  Affect: in a debug build, a malformed table panics when it is mounted or rebuilt, not where it is written.

## window.rs → _window.dart

- Change: `Window` and `WindowScope` carry a `WindowController` of one kind, a regular window made from a configuration, where Flutter has a controller for each archetype; there is no `WindowManager` or registry, and a `Window` does not rebuild on its own when the window's size changes.
  Reason: platform — the host makes windows from one configuration, and a size change reaches the tree through the view's metrics.
  Affect: an app lists its `Window`s in a `ViewCollection` itself and reads the controller from `WindowScope::of`; size and position come from the controller's window's frame, not a listenable.

## Deferred

- media/subtitle_painter.rs: Media3's `BidiUtils` wrapping of each right-to-left line of a cue before it is laid out. Trigger: the first right-to-left subtitles.
- image.rs: `Image.network` and `Image.file`. Trigger: an HTTP client; a file system.
- image.rs: `Image.asset`'s bundle lookup, and the bundle `createLocalImageConfiguration` would carry, without which `AssetImage` cannot resolve from a widget. Trigger: `DefaultAssetBundle`.
- image.rs: the frame, loading and error builders, and `gaplessPlayback`. Trigger: a caller that wants to show something while an image loads or after it fails.
- image.rs: `precacheImage`. Trigger: a caller that warms an image before showing it.
- image.rs: `color` / `colorBlendMode`, `centerSlice` and `filterQuality`. Trigger: painting's colour filters; an image drawn as a resizable frame; a caller that needs to choose how an image is sampled.
- image.rs: `excludeFromSemantics` and the semantics label. Trigger: accessibility.
- focus_manager.rs: `FocusNode.onKey` and the Android IME key check. Trigger: services' raw key path.
- focus_manager.rs, focus_scope.rs: the focus semantics actions and the `Semantics` wrapper `Focus.includeSemantics` controls. Trigger: accessibility.
- focus_manager.rs, focus_scope.rs: focus-tree diagnostics and the debug focus border. Trigger: diagnostics.
- focus_scope.rs: `_FocusInheritedScope` keeps the copy of the inherited-notifier element it grew before inherited_notifier.rs was ported. Trigger: the next change to that element.
- A disposed arena object keeps its slot — `dispose` does Dart's work and frees nothing — across the focus, scroll, draggable-sheet, restoration, action, shortcut, traversal and route objects. Trigger: an arena-slot lifetime for disposed foundation objects.
- framework/: `ErrorWidget` with its exception reporting, and the build-time diagnostics and duplicate-key checks, `Table`'s checks for duplicate row and cell keys among them. Trigger: diagnostics.
- table.rs: the `Semantics(role: cell)` wrapper `TableCell.build` adds. Trigger: accessibility (do not stub).
- framework/: `reassemble`. Trigger: hot reload.
- framework/: `ObjectKey`, `GlobalObjectKey`. Trigger: a widget keyed by object identity.
- binding.rs: the observer callbacks no host reports (memory pressure, predictive back, pushed routes and route information, the text scale, accessibility features), `scheduleWarmUpFrame`. Trigger: a host that reports those events.
- platform_menu_bar.rs: `PlatformMenuItem.onOpen` and `onClose`, and the tooltip. Trigger: a host that reports a menu opened or closed.
- binding.rs: first-frame-rasterized reporting and the push/pop route handlers. Trigger: `SchedulerBinding.addTimingsCallback`; navigation.
- view.rs: `LookupBoundary` around a `ViewAnchor`'s view, and the view's semantics owner callbacks. Trigger: `LookupBoundary`; accessibility.
- `LookupBoundary` in the `View`, `Overlay` and theater-marker lookups, which look straight up the tree. Trigger: `LookupBoundary` in framework.
- `debugCheckHasDirectionality` in the widgets that resolve a directional value. Trigger: diagnostics.
- `InheritedTheme` capture on `DefaultTextStyle`, `DefaultTextHeightBehavior` and `IconTheme`, and `DefaultTextStyle.merge`. Trigger: `InheritedTheme`; `Builder`.
- text.rs: selection, `locale`, `strutStyle`, the semantics labels, and the deprecated `textScaleFactor`. Trigger: `SelectionContainer`; `Locale` / `StrutStyle`.
- basic.rs: `ListBody`, `Flow`, `PositionedDirectional`, `PhysicalModel`, `PhysicalShape`, `RotatedBox`, `IgnoreBaseline`, `ShaderMask`, `RawImage`, `WidgetToRenderBoxAdapter`. Trigger: each one's render object.
- basic.rs: the key-wrapping helpers, `StatefulBuilder`, `DefaultAssetBundle`. Trigger: a key over object identity; a caller; asset bundles.
- basic.rs: the semantics widgets and the semantics flags on the pointer and opacity widgets. Trigger: accessibility (do not stub).
- `Transform.filterQuality`, and with it the transitions and implicit animations that pass it on. Trigger: `RenderTransform.filterQuality`.
- basic.rs: the inspector-only transform labels and the onstage-child debug walks. Trigger: diagnostics.
- icon.rs: `Icon.semanticLabel` and the semantics wrappers `Icon.build` returns. Trigger: accessibility (do not stub).
- icon.rs: icon diagnostics. Trigger: diagnostics.
- visibility.rs: `SliverVisibility`. Trigger: `SliverOpacity`, `SliverIgnorePointer` and `SliverOffstage`.
- visibility.rs: what `Visibility.maintainSemantics` controls. Trigger: accessibility (do not stub).
- visibility.rs: `Visibility` diagnostics. Trigger: diagnostics.
- image.rs: `Image`, `precacheImage`, the image-loading state, and the asset-bundle input of `create_local_image_configuration`. Trigger: the image cache; asset bundles.
- ticker_provider.rs: the ticker unregistration Dart's `_WidgetTicker` does, and `TickerMode.merge`. Trigger: a dispose hook on scheduler's `Ticker`; `Builder`.
- transitions.rs: `SliverFadeTransition`, and with it implicit_animations.rs's `SliverAnimatedOpacity`. Trigger: slivers.
- transitions.rs, implicit_animations.rs: diagnostics. Trigger: diagnostics.
- icon_theme: `IconThemeData.hashCode` (no `Hash` over `f64`). Trigger: a map keyed by `IconThemeData`.
- gesture_detector.rs: the semantics gesture handling, and the double-tap and force-press callbacks. Trigger: accessibility (do not stub); `DoubleTapGestureRecognizer`; a caller of the force-press callbacks.
- media_query.rs: `DisplayFeature`, `SystemTextScaler`, the platform sources for the accessibility flags, 24-hour format, text style overrides, corner radii and gesture insets, and the media-query debug checks. Trigger: observers in binding.rs; those members on `Platform` / `ViewMetrics`; diagnostics.
- widget_state.rs: `WidgetStateBorderSide`, `WidgetStateOutlinedBorder`, `WidgetStateTextStyle`, `WidgetStatePropertyAll`, `WidgetStatesController` as a `ValueListenable`, and hashing. Trigger: the first theme or input decoration that needs them; theme-data hashing.
- localizations.rs: the semantics wrapper `_LocalizationsState.build` adds, and the localization debug checks. Trigger: semantics; diagnostics.
- banner.rs: repaint on `PaintingBinding.systemFonts`. Trigger: a host reporting system font changes.
- app.rs: `WidgetsApp.router` and every router field it fills, with their branches of `_updateRouting` and `build`. Trigger: `router.dart`.
- app.rs: the state's route-push and route-pop handlers. Trigger: the binding's route events.
- app.rs: the escape-key handler that dismisses tooltips. Trigger: `raw_tooltip.dart`.
- app.rs: the performance overlay, semantics debugger and widget inspector the three carried debug flags would show. Trigger: `performance_overlay.dart`; accessibility (do not stub); `widget_inspector.dart`.
- default_text_editing_shortcuts.rs: the Control-key editing bindings macOS supplies from its own key tables (Control-A, Control-E, Control-K, Control-D), which Dart's macOS map leaves to the host. Trigger: nothing else supplies them over a host that reports plain key presses.
- editable_text.rs: scribble and stylus support, the spell-check fetch, the magnifier overlay, `StrutStyle`, the floating cursor, `insertContent`, and the semantics wrappers. Trigger: `StrutStyle`; `UndoManagerClient`; `RenderEditable.setFloatingCursor`; accessibility.
- app_lifecycle_listener.rs: diagnostics. Trigger: diagnostics.
- text_selection.rs: the selection handle overlay and the empty selection controls; handle entries do not yet follow a composited transform. Trigger: those types; `EditableText`.
- text_selection.rs: the toolbar wrapper's outer tap region. Trigger: `SelectableRegion`.
- feedback.rs: the system sound in `for_tap` and iOS `for_long_press`, and the semantic events they send. Trigger: services' `SystemSound`; accessibility (do not stub).
- text_selection.rs: the Android stylus path and the `Scribe` availability check in `onTapDown`. Trigger: host `Scribe`.
- magnifier.rs: the decorative magnifier widgets and their render objects. Trigger: those widgets.
- tap_region.rs: the surface's semantics listeners and semantics action handling. Trigger: accessibility (do not stub).
- automatic_keep_alive.rs: diagnostics. Trigger: diagnostics.
- layout_builder.rs: `SliverLayoutBuilder` with the abstract generic builders, and the error widget on a builder panic. Trigger: slivers; diagnostics.
- sliver.rs: `SliverOpacity`, `SliverIgnorePointer`, `SliverOffstage`, `SliverConstrainedCrossAxis`, `SliverCrossAxisExpanded`, `SliverCrossAxisGroup` and `SliverMainAxisGroup`. Trigger: each one's render sliver.
- sliver.rs: `SliverEnsureSemantics` and the adaptor element's onstage-child debug walk. Trigger: accessibility (do not stub); diagnostics.
- Two-dimensional scrolling: the two-dimensional viewport, its scrollable and scopes, its child delegates, `DiagonalDragBehavior`, and sliver.rs's `KeepAlive` under such a viewport. Trigger: `two_dimensional_viewport.dart`.
- scroll_delegate.rs: the keep-alive and semantic-index wrappers the delegates add, and the delegate description's exception branch. Trigger: wiring `AutomaticKeepAlive`; `selection_container.dart`; accessibility (do not stub); diagnostics.
- viewport.rs: the viewport diagnostics and the onstage-child debug walk. Trigger: diagnostics.
- Scroll semantics: `ScrollContext.setSemanticsActions`, scrollable.rs's semantics widget and its render object with `excludeFromSemantics` and `semanticChildCount`, and scroll_position.rs's semantic action bookkeeping. Trigger: accessibility (do not stub).
- scrollable.rs: the selection handler and container delegate around a scrollable. Trigger: `SelectionContainer` / `SelectionRegistrar`.
- scroll_configuration.rs: the `GlowingOverscrollIndicator` `build_overscroll_indicator` would build, with `OverscrollIndicatorNotification`; `PageScrollPhysics`. Trigger: `overscroll_indicator.dart`; `page_view.dart`.
- scrollable.rs, scroll_configuration.rs, primary_scroll_controller.rs: diagnostics, and `ScrollableDetails.hashCode` (no `Hash` over an erased physics). Trigger: diagnostics; a map keyed by scrollable details.
- scroll_view.rs: `ListView.prototypeItem` and its branch of the child layout. Trigger: `sliver_prototype_extent_list.dart`.
- scroll_view.rs: the scroll view diagnostics. Trigger: diagnostics.
- single_child_scroll_view.rs: the semantics clip and the approximate paint clip (deferred crate-wide in rendering's PORTING.md), and its diagnostics. Trigger: accessibility (do not stub); the inspector; diagnostics.
- scrollbar.rs: the painter's semantics and the structured error reports, which are plain assert messages here. Trigger: accessibility (do not stub); diagnostics.
- radio_group.rs: the radio-group semantics wrapper. Trigger: accessibility (do not stub).
- radio_group.rs: the post-frame check that at most one radio carries the group value. Trigger: diagnostics, and a post-frame callback usable from a state that may run without a binding.
- shortcuts.rs: the deprecated `isActivatedBy`, the duplicate-shortcut check, and `Shortcuts.includeSemantics`. Trigger: content equality on `ShortcutActivator`; diagnostics; accessibility.
- actions.rs, shortcuts.rs, focus_traversal.rs: diagnostics on the actions, intents, activators, managers, policies and orders. Trigger: diagnostics.
- navigator.rs, routes.rs, pop_scope.rs: the members Dart deprecates in favour of the pop-with-result and mark-for-complete ones. Trigger: never — port them only if Flutter un-deprecates them.
- navigator.rs: restoring the focused semantic node after a pop. Trigger: accessibility (do not stub).
- navigator.rs: the navigator diagnostics and the error reports around route generation. Trigger: diagnostics.
- routes.rs: the latency performance mode a transition requests from the engine. Trigger: scheduler's `requestPerformanceMode`.
- routes.rs: `ModalRoute`'s deprecated scoped will-pop callbacks, whose list everything else reads as always empty. Trigger: an async `WillPopCallback`, which needs an event loop — Flutter's own replacement `PopScope` is ported.
- routes.rs: the semantics wrappers around the modal barrier and the modal scope, and what `semanticsDismissible` controls. Trigger: accessibility (do not stub).
- routes.rs: `RawDialogRoute.anchorPoint` with the display-feature sub-screen and semantics wrappers, so `showGeneralDialog` has no `anchorPoint`. Trigger: `display_feature_sub_screen.dart`, which needs `MediaQuery.displayFeatures`; accessibility.
- modal_barrier.rs: the barrier's semantics widgets and clipper, and the platform gate on dismissing a barrier. Trigger: accessibility (do not stub).
- modal_barrier.rs: the alert sound when a non-dismissible barrier is tapped. Trigger: services' `SystemSound`.
- overlay.rs: the theater's intrinsics, dry layout and baselines, and the deferred layout box's dry baseline. Trigger: intrinsics and baselines through a theater child.
- overlay.rs: the overlay diagnostics, including the stack trace an invalidated entry location records (a flag stands in). Trigger: diagnostics.
- overlay.rs: the overlay's semantics wrappers, child identifiers and semantics updates. Trigger: accessibility (do not stub).
- overlay.rs: the theater's clip layer handle and the entry location's compositing-bits update. Trigger: layer handles and compositing bits in `waft-rendering`.
- overlay.rs: the deferred-child gates on the theater's `markNeedsLayout` and the layout box's dirty flag. Trigger: a public `RenderBox` super-hook for `markNeedsLayout` and a readable dirty flag in `waft-rendering`.
- heroes.rs: the hero diagnostics and the structured report behind the duplicate-tag check (a `debug_assert!` carrying Dart's message meanwhile). Trigger: diagnostics.
- implicit_animations.rs: `AnimatedPhysicalModel`; its tween slots are ready. Trigger: `PhysicalModel` (basic.rs).