Skip to content

New controls, client actions, local auth, and review follow-ups - #102

Merged
AdamMusa merged 30 commits into
codex/engine-initializationfrom
claude/friendly-carson-eo0yib
Nov 7, 2026
Merged

AdamMusa merged 30 commits into
codex/engine-initializationfrom
claude/friendly-carson-eo0yib

Conversation

@AdamMusa

@AdamMusa AdamMusa commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Engine half of the work paired with the Ruby protocol in AdamMusa/ruflet (branch claude/friendly-carson-eo0yib). Every new wire type and keyword below is also declared on the Ruby side, and test/contract/ruflet_control_surface.json is regenerated from that branch.

New controls and features

  • Layout widgets: FractionallySizedBox, IntrinsicHeight, IntrinsicWidth, IgnorePointer, AbsorbPointer, and SliverPadding, a CustomScrollView sliver that pads a group of slivers. All are design-neutral.
  • Form: laid out like a Column inside a FocusTraversalGroup, so Tab moves through its fields in order. Validation itself runs in Ruby.
  • NestedScrollView: header slivers over a scrolling body, typically a tabbed one, with overlap absorbed and injected so a pinned bar never covers the body's first row.
  • Transitions: Fade, Rotation, Scale, Slide and Size. Each supports repeat, ping-pong (reverse), animating (pause), delay and on_animation_end, follows MediaQuery.disableAnimations, and retargets smoothly when patched.
  • Clips: ClipOval and ClipRSuperellipse.
  • Client actions (action): the Button and IconButton families and ListTile (shared core, both designs), plus Container, FloatingActionButton and TextSpan, run URL, clipboard, file-picker and share actions inside the tap, before click is sent. Results come back as action_result.
  • ruflet_local_auth: a new extension package, the LocalAuthentication service over local_auth 3.0.2. Methods: authenticate, can_check_biometrics, is_device_supported, get_available_biometrics, stop_authentication.
  • Page: get_device_info now maps the record by device type, and set_allowed_device_orientations answers UnsupportedError off mobile and rejects unknown names.
  • Props:
    • auto_scroll_animation on every scrollable control (ResponsiveRow and ExpansionPanelList also gained scrolling)
    • TextField on_paste_files (native: clipboard image; web: the paste event)
    • SearchBar on_tap_outside_view
    • Semantics identifier
    • Dropdown menu_border_radius

Review follow-ups (from merging #25–#100)

Verification (Flutter 3.41.2, the CI version)

  • flutter analyze lib test: no issues.
  • flutter test in packages/ruflet: 2,266 passed, 1 failed. The failure is test/utils/networking_test.dart "flutter.dev address is public", which needs DNS that the build sandbox lacks.
  • ruflet_local_auth: analyze clean, 12/12 tests.
  • test/architecture and test/core: 346/346 against the regenerated surface. sync_ruby_surface.rb --check and ruflet's sync_engine_service_types.rb --check both report current.

Follow-up outside this repo

For built clients to include ruflet_local_auth, ruflet-template must:

  1. re-run its engine sync;
  2. add ruflet_local_auth: path: ruflet_packages/ruflet_local_auth to its pubspec;
  3. import the package and register ruflet_local_auth.Extension() in main.dart, main.self.dart and main.server.dart.

Generated by Claude Code

claude added 30 commits November 2, 2026 19:27
…rbPointer and SliverPadding

Renderers for the Ruby controls added in ruflet (fractionally_sized_box,
intrinsic_height, intrinsic_width, ignore_pointer, absorb_pointer,
sliver_padding). All are design-neutral and import only widgets.dart.

- FractionallySizedBox: width_factor/height_factor/alignment over
  `content`. A negative factor is ignored (Flutter asserts on it), and a
  factor on an axis the parent leaves unbounded shows an ErrorControl
  that says how to bound it instead of failing in layout.
- IntrinsicHeight / IntrinsicWidth (step_width, step_height; negative
  steps ignored).
- IgnorePointer (`ignoring`) and AbsorbPointer (`absorbing`), both on
  unless Ruby turns them off; a patch toggles them.
- SliverPadding: a CustomScrollView sliver that pads a
  SliverMainAxisGroup of its `slivers:` (or block `controls`), each built
  like a CustomScrollView entry, so a box among them scrolls as a box.

The box controls go through LayoutControl like the other single-content
controls, so the common layout keywords apply. The renderer matrix picks
up the five new createWidget types on every platform.

Tests: test/widgets/ruby_layout_widgets_test.dart (geometry, pointer
pass-through/absorption with a Ruby patch, sliver padding with `slivers:`
and block children) on both designs: 22/22. Renderer matrix for the new
types: 35/35. test/architecture: 298/298. flutter analyze: no issues.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
…payload

The ListTile snapshots (#95) were recorded before the Switch moved onto
the shared control core (#84), whose parity table says both designs now
send the new value with `change`. With both merged, a Switch in an iOS
ListTile sends `change` true/false instead of null, so
ListTile/toggle_inputs.ios.json is updated for exactly those two
messages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Regenerated with `ruby tool/sync_ruby_surface.rb --ruby <ruflet>` from
ruflet main plus its pending branch: it now lists the Ruby controls that
landed since the last refresh (Stepper/Step, AboutDialog,
CustomScrollView and its slivers) and the new layout controls
(FractionallySizedBox, IntrinsicHeight, IntrinsicWidth, IgnorePointer,
AbsorbPointer, SliverPadding), the keywords Ruby added (DatePicker
`inline`, SegmentedButton `sliding`, the list `animate_changes` family),
and the `open_keywords` flag ruflet's export now carries for controls
that accept any key. The C3 contract tests pass against it (346/346 in
test/architecture and test/core) and `--check` reports it current.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
…signs

Follow-up to #91 (IconButton family on the shared control core):

- The iOS skin colours the icon with disabled_color while disabled and
  selected_icon_color while selected (also when there is no
  selected_icon), but the Material skin painted icon_color on the Icon
  regardless, so the same Ruby props showed red/grey on iOS and green on
  Android. The Material skin now applies the same rule; the colour still
  goes on the Icon itself, which is also why IconButton's own
  disabledColor never reached an icon Ruby coloured.
- isAppBarLeading turned a Material back arrow into the iOS chevron for
  all four IconButton types; before the move only IconButton did. The
  filled, tonal and outlined variants keep their glyph again.

ruby_icon_button_keys_test.dart now checks the colour rule on both
designs (5 cases each) and the chevron for all four types; six of these
fail without the fix. icon_button/app_bar snapshots, native_back_icon
and the control-core contract: 306/306.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Follow-up to #93 (sliding segmented control from Ruby's `sliding`
prop). Ruby's segmented_button accepts `sliding: true` alongside the
canonical `segments` and `selected`, but the iOS sliding renderer only
read the legacy `controls`/`selected_index` shape, so
`segmented_button([segment(...), segment(...)], selected: ["a"],
sliding: true)` showed "must have at minimum two visible controls"
instead of the control (before #93 iOS ignored `sliding` and rendered
it).

The sliding renderer now also takes `segments`: keyed by `value`, the
first `selected` value is the thumb, disabled segments are disabled
children, and a pick updates `selected` and fires `change` with the list
of selected values, as the segmented control does. The legacy path is
unchanged.

Also pins #98's inline date picker modes: Ruby sends date_picker_mode
in snake_case (date_and_time by default); with the shared snake_case
parseEnum (#63) the iOS wheel honors it, and the new cases keep it so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Follow-up to #81 (design-neutral control core). PropReader resolves every
theme-dependent value against RufletStyleTheme.of(context), and on iOS
that was the root scope the Cupertino app renderer computes once outside
any dialog. The pre-core Cupertino renderers resolved their state maps
against cupertinoStyleTheme(context) at the control, which sees the
CupertinoUserInterfaceLevel.elevated that CupertinoAlertDialog, action
sheets, modal popups and sheets install. So in dark mode a Switch
`thumb_color: {selected: "surface"}` or a Checkbox `fill_color` /
`border_side` / `label_style` inside a Ruby AlertDialog or BottomSheet
became 0xFF000000 instead of the elevated 0xFF1C1C1E.

RufletStyleThemeScope can now carry a design-supplied `localTheme` that
RufletStyleTheme.of consults for the reading context. The Cupertino app
renderer and CupertinoControlTheme install their scope through the new
cupertinoStyleThemeScope, which returns the theme for the reader's own
interface level when it differs from the scope's (each level resolved
once per scope). The kernel and style_theme.dart stay design-neutral, and
Material scopes set no localTheme, so Material is unchanged. Plain colours
read on an elevated surface now get the elevated shade too, so a
control's `active_track_color: "surface"` and `thumb_color` no longer
disagree (before #81 plain colours stayed on the root shade).

elevated_surface_colors_test.dart mounts through the real PlatformApp in
dark mode with one control of every migrated core (Switch, Checkbox,
Radio, Button, IconButton, ListTile, ProgressRing, AppBar) painting
"surface": base shade on the page, elevated in an AlertDialog and a
BottomSheet and under a control theme in a dialog, and the theme surface
in a Material dialog. The dialog and sheet cases fail without the fix
(every core gave 0xFF000000). The harness installs the same scope as the
app renderer. test/architecture: 298/298; dialog, sheet, Cupertino,
snapshot, theme and core widget tests: 1076/1076.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Follow-up to #67 (iOS TextField focus styling). With `filled: true`,
`fill_color` and `focused_bgcolor`, iOS showed focused_bgcolor while the
field had focus but Material kept fill_color, because
buildInputDecoration only fell back to focused_bgcolor when no
fill_color was set (`fillColor ?? (focused ? focusedBgcolor ?? bgcolor :
bgcolor)`, unchanged since the engine was extracted).

Both designs now follow one rule: while focused, `focused_bgcolor` (when
set) is the background; otherwise `fill_color`, then `bgcolor`. That is
what the keyword means (Flet documents it as the TextField's background
colour in the focused state, and Ruby passes it through unchanged on
TextField and CupertinoTextField), so a field-specific focus colour no
longer disappears because a resting fill is also set. The iOS renderer
already did this; the Material decoration (shared with the Material
DropdownM2) now does too. Without fill_color nothing changes.

ruby_text_field_focus_colors_test.dart checks fill_color at rest,
focused_bgcolor while focused and fill_color after blur on iOS and
Android; the Android case fails without the fix (it stayed 0xFF00FF00).
TextField, dropdown and form widget tests plus test/architecture:
418/418.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
…_auth

A new extension package, laid out like ruflet_secure_storage, registers
the LocalAuthentication service with createService. Its invoke methods
mirror Flet's flet-local-auth on local_auth 3.0.2 (the newest release
Flutter 3.41 resolves; local_auth_android stays on 2.0.8):

- authenticate(localized_reason, biometric_only, sensitive_transaction,
  persist_across_backgrounding, android/ios/macos_messages) -> bool
- can_check_biometrics, is_device_supported -> bool
- get_available_biometrics -> ["face", "fingerprint", ...]
- stop_authentication -> bool

LocalAuthException and PlatformException reach Ruby as the invoke error
"LocalAuthentication.<method> failed [<code>]: <message>", with the
snake_case local_auth code (or the platform's code) and a readable
message when the plugin gives none. A missing or blank reason is an
ArgumentError that never reaches the platform (iOS aborts on an empty
one), and unknown methods fail at once. On Linux and the web, which
local_auth does not implement, the service registers no listener, so the
core fails every invoke fast with its UnsupportedError.

Tests drive the service through Control.invokeMethod against a Dart fake
of LocalAuthPlatform.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Review of #74 found two Material ContextMenu gaps. Both are already
closed in the merged code; this pins the one that had no test.

- An items-only menu (Ruby's ContextMenu sends `items` and the
  per-trigger lists, never `actions`): #78 made the Material renderer
  fall back to `items` before `actions` for every trigger and for a
  programmatic open, and ruby_material_context_menu_items_test.dart
  covers the right-click case.
- `primary_trigger: "long_press"`: parseContextMenuTrigger goes through
  the shared parseEnum, which #63 made compare names without case or
  underscores, so Material accepts Ruby's spelling as iOS does. Nothing
  tested it on Material.

ruby_context_menu_trigger_items_test.dart now long-presses a menu with
`primary_trigger` "long_press" and "longPress" on iOS and Android: each
shows `primary_items` (not `secondary_items`) and selecting reports
b: primary, tr: longPress. With parseEnum as it was before #63 the
Android "long_press" case fails (no menu opens). Context menu tests and
test/architecture: 317/317.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Follow-up to #63 (snake_case curve names). parseCurve's table listed
every Flutter Curves constant except fastEaseInToSlowEaseOut, so
`curve: "fast_ease_in_to_slow_ease_out"` (or the camelCase name) printed
"unknown curve" and fell back to the default. It is in the table now.

enum_name_parsing_test.dart lists all 42 public Curves constants and
checks that each parses, by its snake_case and its Dart name, to that
very constant without a warning; this fails without the fix (the
warning for fast_ease_in_to_slow_ease_out). A second test reads the
Curves class from the Flutter SDK source this package resolves (via
.dart_tool/package_config.json) and requires the list to match it, so a
Flutter upgrade that adds a curve fails until parseCurve knows it.
test/architecture plus every test mentioning curves: 361/361.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Ruby now calls page.get_device_info and set_allowed_device_orientations
on the Page control (id 1), which already had Flet's handlers.

- get_device_info maps the device_info_plus record by its own type
  instead of by the running platform, so a record always gets its own
  platform's Flet field names. debugDeviceInfoSource lets tests supply
  the record; a test checks every record type against Flet's
  AndroidDeviceInfo/IosDeviceInfo/MacOsDeviceInfo/WindowsDeviceInfo/
  LinuxDeviceInfo/WebDeviceInfo fields.
- set_allowed_device_orientations answers UnsupportedError off native
  mobile (Flet raises there; it used to succeed silently), rejects an
  unknown orientation name instead of dropping it, de-duplicates, and
  keeps [] = system default and no list = every orientation.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Renderers for the Ruby controls added in ruflet (fade_transition,
rotation_transition, scale_transition, slide_transition,
size_transition, clip_oval, clip_rsuperellipse). All are design-neutral,
import only widgets.dart and go through LayoutControl, so the common
layout keywords apply.

The transitions share ExplicitTransition (controls/explicit_transition
.dart): one AnimationController per control drives Flutter's
FadeTransition / RotationTransition / ScaleTransition / SlideTransition /
SizeTransition between the control's `begin` and `end`, with `duration`
(ms, default 1000), `curve`, `repeat`, `reverse` (ping-pong while
repeating), `animating` (false pauses) and `delay` (before the first
run). Loops cost Ruby nothing per frame.

- A patch retargets without a jump: a new `end` animates a single run
  from the value shown to it; a new `begin` alone replays the run; a
  loop keeps its phase between the new values; `duration`/`curve` apply
  to the rest of the run; `repeat` off finishes at `end`.
- on_animation_end ("transition", distinct from the implicit animation
  names) fires once per completed single run, never for a loop.
- MediaQuery.disableAnimations: a run that would start shows its end
  state at once (and reports its end), loops do not run, a paused one
  stays paused. A zero-length loop shows its end state too.
- The controller and the delay timer are disposed with the widget, so a
  removed spinner leaves no ticker or timer behind.
- Opacity is clamped to 0..1 and a size factor to >= 0 (Flutter asserts).

ClipOval and ClipRSuperellipse (border_radius) clip their content,
anti-aliased unless clip_behavior says otherwise.

mountWire takes `settle: false` so a test can sample an animation from
its first frame (a loop never settles).

Tests: test/widgets/ruby_transition_widgets_test.dart on both designs
(values at t=0/middle/end, geometry, ping-pong, pause/resume, retarget,
replay, duration and loop patches, end events, reduced motion on mount
and at runtime, zero length, removal with no ticker or timer left, oval
hit testing and the superellipse clip): 42/42. Renderer matrix for the
new types: 35/35. Full suite: 2080 passed, 1 failed (networking_test
"flutter.dev address is public", no DNS). flutter analyze: no issues.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet 1.0.5's auto_scroll_animation, read by the shared ScrollableControl
so Column, Row, ListView, GridView, ReorderableListView (both
renderers), CustomScrollView and View all honor it: {duration, curve},
a duration in milliseconds or true (Flet's animation values); a zero
duration or false jumps to the end. Unset keeps the 1 second ease.

ResponsiveRow and ExpansionPanelList (Material and Cupertino) are
ScrollableControls in Flet; wrapInScrollableControl gives them Column's
scroll surface: scroll, auto_scroll, auto_scroll_animation, scroll_to and
on_scroll. Without scroll they lay out as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet 1.0.2's Semantics.identifier sets Flutter's Semantics.identifier, a
stable ID for accessibility tools and widget tests (Android resource-id,
iOS accessibilityIdentifier, web flt-semantics-identifier), on both
designs (Semantics has one shared renderer).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Renderer for Ruby's new `form` control (ruflet: form(controls) { fields }
with validator:/on_saved:/autovalidate_mode: on its fields). Validation,
reset and save run in Ruby, where the validators live: Ruby patches each
field's error prop (TextField `error`, Dropdown `error_text`, Checkbox
`error`) and sets the on_change/on_blur/on_submit flags it needs, so the
client needs no Flutter Form/FormField state and no new events. A
field's existing `submit` is what Ruby routes to the form's on_submit.

The Form renderer is design-neutral (widgets.dart only, not on the
control core): it reuses ColumnControl for the layout (spacing,
alignment, horizontal_alignment, scroll, tight, expanded children) and
wraps the column in a FocusTraversalGroup, so Tab moves through the
form's fields in order and finishes the form before fields beside it.
ColumnControl gains an optional contentWrapper applied inside
LayoutControl, which stays outermost so `expand`, margins and
positioning still reach the parent. createWidget registers "Form"
between FloatingActionButton and FormRow.

Tests: test/widgets/ruby_form_test.dart on both designs, 20/20: column
geometry with spacing and alignment, an expanded child, scrolling, the
layout keywords around the group, Tab order within the form and before
the fields beside it (without the group it is a, c, b, d), a field's
blur on Tab, submit on Enter, an `error` patch shown and cleared, a
`value` patch restoring typed text. Renderer matrix: Form renders on all
5 platforms with the default fixture. test/architecture 298/298. Full
`flutter test`: 2028 passed, 1 failed (utils/networking_test "flutter.dev
address is public", no DNS here). `flutter analyze lib test`: no issues.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet 1.0's DropdownM2.menu_border_radius rounds the open menu while
border_radius keeps rounding the field. Ruby's dropdown_m2 sends it on
the Dropdown wire, so every Dropdown renderer reads it:

- Material Dropdown: the menu style's shape (a rounded rectangle).
- Material DropdownM2 (the legacy wire): DropdownButton.borderRadius,
  falling back to the deprecated border_radius as before.
- Cupertino: the options sheet is clipped to the radius.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet 1.0's client action (`action`) for the engine. Browsers only allow
clipboard writes, new tabs, file pickers and the share sheet while they
handle the user's gesture, and Ruby's reply to a click arrives too late.
A control's `action` (one {service, method, args} map or a list, Flet's
wire format with the service named by its wire type) is now performed by
the client inside the tap callback, before `click` goes to Ruby:

- services/client_action.dart parses actions and starts each one
  synchronously, without awaiting the previous one: through the page's
  mounted service of that type when Ruby has one (a FilePicker then keeps
  the selection for page.upload), else through the same service code
  without a service control. Allowed: UrlLauncher.launch_url,
  Clipboard.set, FilePicker.pick_files, Share.share_text/share_uri/
  share_files. Each outcome ({index, service, method, result | error})
  is sent as the control's `action_result` event.
- The Clipboard, UrlLauncher and Share services' method switches and
  FilePicker's pick step are top-level functions now, shared by the
  services and the actions (behaviour unchanged).
- Shared core: ControlCore.runClientActions/hasClientActions in the
  kernel; Button (all five wire types, so cupertino buttons and the iOS
  dialog action), IconButton (all four) and ListTile specs declare
  `action` (PropConsumer.core) and the core event `action_result`, and
  their cores run the actions first in the click. A ListTile with only
  an action is tappable.
- Legacy renderers: Container (both designs, ink or not), the
  FloatingActionButton (both designs) and TextSpan run the actions in
  their tap handlers; an action alone makes them tappable.
- C7 parity scripts gain a "tap native with a client action" step
  (clipboard mocked), so both designs must report action_result alike.
- test/widgets/client_action_test.dart: on Android and iOS, tapping a
  Button, FilledTonalButton, IconButton, OutlinedIconButton, ListTile,
  Container (plain and ink), FloatingActionButton and TextSpan performs
  the clipboard copy before Ruby receives anything, then click and
  action_result arrive in that order; lists, launch_url, share_text,
  pick_files (results and upload through a mounted FilePicker), errors
  and disabled controls.

No snapshot changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Regenerated with `ruby tool/sync_ruby_surface.rb --ruby <ruflet
wp4-client-action>`: the action-control family now declares `action`
and `on_action_result` (49 entries), which keeps C3 green for the Button,
IconButton and ListTile specs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Renderer for ruflet's nested_scroll_view: header slivers (typically a
pinned SliverAppBar with a TabBar as its bottom) that collapse as the
body scrolls, the "collapsing app bar over tabs" layout. Design neutral
(widgets/rendering only); registered in createWidget after
NavigationRail.

- Header: the Ruby `header_slivers:` (or block `controls`) built with
  buildSlivers, so a SliverAppBar keeps its iOS flexible-space sibling,
  inside one SliverOverlapAbsorber. The absorber takes one sliver, and a
  SliverMainAxisGroup reports no scroll obstruction, so a small
  RenderSliverMainAxisGroup subclass groups them and reports the sum of
  their obstructions (the pinned extent).
- Body: a NestedScrollBody scope names the body scroll views: the body
  itself, or each TabBarView page, when it is a ListView, GridView,
  CustomScrollView or a Column/Row with `scroll`. Those renderers take
  the NestedScrollView's inner controller (so dragging them collapses
  the header first) and inject the overlap with a SliverOverlapInjector
  (ListView/GridView use their existing sliver path, Column/Row a
  CustomScrollView instead of SingleChildScrollView), so a pinned bar
  never hides the first row and later rows scroll under it. Any other
  body (or a TabBarView whose pages do not all scroll) is laid out below
  the pinned header. The body's leading safe-area padding is removed
  because a primary app bar already includes it.
- An iOS TabBarView (an IndexedStack) builds only its selected page in
  such a body, like the Material PageView, because every built page
  would scroll with the inner controller. Each body scroll view has a
  PageStorageKey, so a tab keeps its offset.
- Body scroll views with `scroll` show the thumb while scrolling, not
  always: two TabBarView pages share the inner controller mid-swipe,
  where an always-visible thumb asserts.
- `scroll_to`, `scroll`, `auto_scroll` and `on_scroll` use the outer
  controller: offset 0 expands the header and returns the body to top,
  -1 collapses it; on_scroll reports the header scroll.
- ScrollableControl now reads its controller on each build (own one
  created lazily), so a renderer can pass the inner controller.

Tests: test/widgets/ruby_nested_scroll_view_test.dart on both designs,
32/32: the header collapses as a tab list scrolls and stays pinned; the
first row starts below a collapsed header (scroll_to -1/0); tabs in the
body switch and each starts below the pinned header and keeps its
offset; on_scroll; ListView, GridView, CustomScrollView and Column
bodies; non-scrolling and mixed bodies; header without a pinned bar;
floating header slivers; scrollbars across a tab swipe; status bar inset
not doubled; large title; unbounded height error. Renderer matrix
fixture for NestedScrollView: 5/5. test/architecture: 298/298. flutter
analyze lib test: no issues. Full flutter test: 2040 passed, 1 failed
(utils/networking_test "flutter.dev address is public", no DNS here).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet's SearchBar.on_tap_outside_view: a tap outside the open search
view (on_tap_outside_bar stays the closed, focused bar's event).

- Material: the open view is a route whose dismiss barrier reports
  nothing, so while the view is open (viewOnOpen/viewOnClose) a global
  pointer route hit-tests each pointer-down against the view's content;
  one that misses it fires tap_outside_view. The barrier still closes
  the view.
- Cupertino: the inline view (open_view, or suggestions listed for the
  query) is a TapRegion around the field and its suggestions. While it is
  shown, an outside tap fires tap_outside_view instead of
  tap_outside_bar; it does not close the view (iOS has no barrier: Ruby
  can call close_view).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Flet 1.0.3's TextField.on_paste_files: pasted files arrive as a
paste_files event, {"files": [{"name", "mime_type", "bytes"}]} with the
contents as binary. PasteFilesScope wraps the Material and Cupertino
text fields (the same widget tree whether or not Ruby subscribed, so a
later on_paste_files keeps the field's state):

- Native: it overrides the field's PasteTextIntent action, so the
  keyboard paste shortcut (Ctrl/Cmd+V) still pastes text through the
  default action and then reports an image on the clipboard (pasteboard
  plugin), named image.<ext> and typed from its bytes. The selection
  toolbar's Paste button pastes text only.
- Web: a capture-phase document paste listener, active while the field
  has focus, reports clipboardData.files (any browser, no permission
  prompt) and keeps a paste that carries files from also inserting text.

Widget tests cover the native path on both designs (text plus image,
text only, image only, unsubscribed, subscribing later). The web
listener is analyzed and was compiled with dart2js/dart2wasm and run
against a fake DOM, not in a browser.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
… props

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ

# Conflicts:
#	packages/ruflet/lib/src/controls/cupertino_content_controls.dart
#	packages/ruflet/lib/src/controls/scrollable_control.dart
Regenerated with `ruby tool/sync_ruby_surface.rb --ruby <ruflet>` from
the ruflet branch that carries the matching Ruby work: Form,
NestedScrollView, the Fade/Rotation/Scale/Slide/Size transitions,
ClipOval, ClipRSuperellipse, the LocalAuthentication service, the
`action` keyword on the action-control family, auto_scroll_animation,
TextField on_paste_files, SearchBar on_tap_outside_view, Semantics
identifier and DropdownM2 menu_border_radius (460 entries, 238 wire
types). The control-core contract tests pass against it (346/346 in
test/architecture and test/core).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants