Code Monkey home page Code Monkey logo

Comments (6)

pchampio avatar pchampio commented on May 10, 2024

I guess we could try glReadPixels which captures the OpenGL window into a memory buffer. (Need to format the data to jpg manually).

This is the role of the embedder to perform those low-level tasks. I am not against having this by default into the embedder.
(I prefer the issue over the readme's todo list)

from go-flutter.

pchampio avatar pchampio commented on May 10, 2024

What about https://stackoverflow.com/questions/51117958/how-to-take-a-screenshot-of-the-current-widget-flutter/51118088 ?

from go-flutter.

 avatar commented on May 10, 2024

this looks like a good mvp approach for now to get things going. Its also pure dart and so runs anywhere. That will get us a raster image and from there we can decide what to do with it.

EDIT.
In the back of my mind have been usign the golang and dart PDF generation stuff and so far the golang stuff is way ahead.
SO once we get the image, we can them pump in into a PDF template for both mobile and desktop to produce a PDF with the image inside.
Then its bespoke code for each platform to print it.

Thats my current thinking.
But until you have cemented in the Plugin API, its hard to see how i can use the golag PDF on both mobile and desktop. Just so you know... Hopefully your thiking about reuse of golang code across both mobile and desktop ?

from go-flutter.

pchampio avatar pchampio commented on May 10, 2024

"Hopefully your thinking about reuse of golang code across both mobile and desktop ?"

If you want to reuse golang's code across both mobile and desktop, you will have to write a go-flutter-desktop-embedder's plugin which will proxy your plugin's request/response to something like https://github.com/adieu/flutter_go.

from go-flutter.

 avatar commented on May 10, 2024

Thanks for the heads up

I think I can easily deal with that.

This project is awesome

from go-flutter.

pchampio avatar pchampio commented on May 10, 2024

There is even a pub plugin for screenshot (no platform message needed)
Closing for cleanup.

from go-flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.