Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] How do I get a screenshot? #539

Open
bombicod opened this issue Jan 15, 2025 · 1 comment
Open

[FEATURE] How do I get a screenshot? #539

bombicod opened this issue Jan 15, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@bombicod
Copy link

Feature Description

Please note that this code does not work. opreviewcontainer.currentContext?.findRenderObject()

Describe alternatives you've considered

No response

Additional context

No response

@bombicod bombicod added the enhancement New feature or request label Jan 15, 2025
@Heidi0039
Copy link

Heidi0039 commented Feb 11, 2025

I am using a third party dependency to take a screenshot of the native MapView on iOS. Maybe this helps?
This is not a screenshot of the Map itself, but of the entire App-Screen.
Thats the only way I found, that doesn't require messing with the native SDK/Framework implementation and grabbing the native View myself.

Pubspec dependency:
ff_native_screenshot: ^1.0.0

Usage:

import 'package:ff_native_screenshot/ff_native_screenshot.dart';

Future<Uint8List?> captureWidget() async {
    try {
      return await FfNativeScreenshot().takeScreenshot();
    } catch (e) {
      Debug.warn("Failed to take screenshot: ${e.toString()}", force: true);
    }
    return null;
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants