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

The release version does not work #3

Closed
once10301 opened this issue Sep 29, 2018 · 4 comments
Closed

The release version does not work #3

once10301 opened this issue Sep 29, 2018 · 4 comments

Comments

@once10301
Copy link

if you use 'flutter run --release', this plugin does no work

@lizhuoyuan
Copy link
Collaborator

Thank you for your question, I will solve it as soon as possible.

@once10301
Copy link
Author

import 'package:flutter/material.dart';

class ScreenUtil {
double screenWidth;
double screenHeight;

ScreenUtil(BuildContext context) {
screenWidth = MediaQuery.of(context).size.width;
screenHeight = MediaQuery.of(context).size.height;
}

static int designWidth = 1920;
static int designHeight = 1080;

double get scaleWidth => screenWidth / designWidth;

double get scaleHeight => screenHeight / designHeight;

setWidth(int width) => width * scaleWidth;

setHeight(int height) => height * scaleHeight;
}

@lizhuoyuan
Copy link
Collaborator

Please add the latest version , I have modified the code and uploaded it.

@wuyong0087
Copy link

The latest version still not work in release version

lizhuoyuan pushed a commit that referenced this issue Oct 22, 2020
@sejun2 sejun2 mentioned this issue Sep 6, 2022
@azabcodes azabcodes mentioned this issue May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants