Code Monkey home page Code Monkey logo

Comments (15)

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

Dart:ui can't get screen data in release mode in time .
But if you have a good way to welcome sharing

from flutter_screenutil.

chavesgu avatar chavesgu commented on July 20, 2024

Dart:ui can't get screen data in release mode in time .
But if you have a good way to welcome sharing

I've tried, Dart:ui can get screen data in release mode,
Do you think it is async?

from flutter_screenutil.

chavesgu avatar chavesgu commented on July 20, 2024

Here's my environment
• Flutter version 1.5.4-hotfix.2
• Framework revision 7a4c33425d (9 weeks ago), 2019-04-29 11:05:24 -0700
• Engine revision 52c7a1e849
• Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

Maybe I should try again at 1.5.4, thank you for your suggestion.

...
After 30 minutes

I tried it again and found that it works.
Soon I will upload a version of 0.6.0 and mark it clearly in the update log, thanks

I seem to have found something wrong.

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

image

I don't know why my test was good before.

But , I tested it a few times and found that it didn't work.

from flutter_screenutil.

chavesgu avatar chavesgu commented on July 20, 2024

what's wrong?

from flutter_screenutil.

chavesgu avatar chavesgu commented on July 20, 2024

0E08BA9942731966DC5B6221F8A3E2B1

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

Sometimes it works, but sometimes it doesn't work.Do you think there is a problem with the code above?
image

from flutter_screenutil.

chavesgu avatar chavesgu commented on July 20, 2024

I think when your home page draw, window's width shouldn't be zero

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

It seems that it is asynchronous, so I am not going to use this method for the time being.

from flutter_screenutil.

chavesgu avatar chavesgu commented on July 20, 2024

But this method doesn't work at the root app class, it work at app's home class

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

My phone is rooted and it works fine, I don't know what your problem is.

from flutter_screenutil.

chavesgu avatar chavesgu commented on July 20, 2024

no other problem and you can try print width in root main method

from flutter_screenutil.

lizhuoyuan avatar lizhuoyuan commented on July 20, 2024

I guess what you mean is to get the screen data in MyApp? This is not possible, because it is initialized in the home, so the data can only be obtained after the initialization method in the home. If I am wrong, mostShow the code you want to implement

from flutter_screenutil.

chavesgu avatar chavesgu commented on July 20, 2024

all right, use context config your plugin, It doesn't affect my use

from flutter_screenutil.

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.