Skip to content

Tracking: region screenshot example without native MainFlutterWindow.swift code #85

Done

Description

@lijy91

Goal

Region screenshot (freeze the display, drag a selection in a full-display overlay, copy / save the crop) in examples/flutter_screen_capture_example should be built from nativeapi calls alone. The app's macos/Runner/MainFlutterWindow.swift should be the stock Flutter template, with no method channel and no NSWindow overrides.

Today (PR #75) the example needs about 140 lines of Swift for things Window / ScreenCapturer can't express yet.

Gaps

What already exists and the example can switch to directly: SetOpacity (the transparent-until-rendered reveal), SetVisibleOnAllWorkspaces / SetVisibleOnFullScreen (the overlay's collection behaviour), SetHasShadow, Focus, and Display position/size.

Done when

  • The gaps above are implemented and propagated through the C ABI and the bindings.
  • The example's region screenshot runs on macOS (Retina and 1× external display) with the stock MainFlutterWindow.swift and the same behaviour as now: the overlay covers the menu bar and Dock, and there is no flash or shrink animation (checked with a 60 fps recording).
  • The same Dart code path is checked on Windows.

Activity

  1. added a commit that references this issue on Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions