Skip to content

[Web]: Some commit after (v1.13.7) introduces web issue that affects some widget sizes #48498

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

Closed
egorbelibov opened this issue Jan 9, 2020 · 4 comments
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. platform-web Web applications specifically
Milestone

Comments

@egorbelibov
Copy link

egorbelibov commented Jan 9, 2020

I noticed the issue when I upgraded flutter this morning and toggled Chrome's Device Toolbar.

Some widget sizes (only on mobile (I think)) are completely off from what they should be. The weird thing is that it only happens for some of the widgets.

i.e.: The following button has a fixed width, but behaves differently on each version

  • (Latest Commit) - Flutter engine: 46adf73

not_working

  • (v1.13.7) - Flutter engine: eb13993

working

Target Platform: Web
Target OS version/browser: Version 79.0.3945.88
Devices: Mac

@VladyslavBondarenko
Copy link

Hi @egorbelibov
To better address this issue could you provide a code sample (to specify which widgets behaves incorrectly)?
Thank you

@VladyslavBondarenko VladyslavBondarenko added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jan 9, 2020
@egorbelibov
Copy link
Author

@VladyslavBondarenko
Yes, of course.

Also, I think I found out what's causing it.
Looks like this happens whenever a borderRadius is added to any widget.

Runnable Code Sample

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: TestPage(),
    );
  }
}

class TestPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            TroublesomeContainer(),
          ],
        ),
      ),
    );
  }
}

/// ISSUE present in this container.
class TroublesomeContainer extends StatelessWidget {
  Widget build(BuildContext context) {
    return _renderButton(context);
  }

  Widget _renderButton(BuildContext context) {
    return Container(
      height: 50,
      width: 300,
      decoration: BoxDecoration(
        color: Color(0xFF000000),
        // ISSUE seems like it's caused by `borderRadius` param (any border radius value)
        borderRadius: BorderRadius.all(Radius.circular(5)),
      ),
    );
  }
}

Screenshots

  • When you add any borderRadius to Container this is what you get:

image

  • And when you take it out:

image

It's very weird 🧐

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jan 9, 2020
@VladyslavBondarenko VladyslavBondarenko added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. c: regression It was better in the past than it is now platform-web Web applications specifically labels Jan 9, 2020
@ferhatb
Copy link
Contributor

ferhatb commented Jan 9, 2020

Issue is fixed in flutter/engine#15327. Will be available as soon as new engine rolls into flutter master.

@VladyslavBondarenko VladyslavBondarenko removed the c: regression It was better in the past than it is now label Jan 9, 2020
@ferhatb ferhatb added this to the January 2020 milestone Jan 9, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. platform-web Web applications specifically
Projects
None yet
Development

No branches or pull requests

3 participants