Code Monkey home page Code Monkey logo

Comments (5)

jlnrrg avatar jlnrrg commented on July 21, 2024 5

From what I have gathered the captureFromWidget method uses the ui.window.physicalSize which is probably bc it also uses ui.window.
I am unsure, if this can be changed, but will try a thing or two.

This is what I've tested so far

  • wrapping the method and/or the widget in a seperate MediaQuery(child: child)
  • wrapping the method and/or the widget in a seperate Theme(child: child)
  • wrapping the widget widget in a Sizedbox(height: 100, width: 100, child: child)
  • editing the method myself

Edit: Once I started to work on the package myself, I quickly found out, that @SachinGanesh has already solved the problem (thx for this 👍).
Unfortunately the package on pub.dev has the same package version, even though the github version is more recent.
So @SachinGanesh please push the most recent version to pub.dev, so other developer do not have to waste 2h, when you already took the effort of implenting such feature ❤️.

P.S. For everyone wondering: the captureFromWidget now supports a targetSize

from screenshot.

kekko7072 avatar kekko7072 commented on July 21, 2024 1

Hey @jlnrrg I am using the captureFromWidget method but I can not find the targetSize option, I need to crate screenshot of specific height and with, I am currently running version screenshot: ^1.2.3

from screenshot.

bobatsar avatar bobatsar commented on July 21, 2024

Hey @jlnrrg did you find any way to calculate the targetSize automatically?
I have a list of items and don't know the exact size yet.

from screenshot.

jlnrrg avatar jlnrrg commented on July 21, 2024

@bobatsar I solved it by only using fixed sized components and then calculating the width and height based on the amount.
I know this does not answer your question unfortunately 😞

from screenshot.

ritheshSalyan avatar ritheshSalyan commented on July 21, 2024

Please use latest version of plugin to set target size. Closing this issue

from screenshot.

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.