Skip to content

Icon position misplaced on Android #165130

@tototo23

Description

@tototo23

Steps to reproduce

Put an Icon() in an other widget, with small sizes.

Expected results

On every platefiorm the position should be the same

Actual results

Left side : on Windows, the Icon is supposed to be centered, and is centered.
Right side : on Android, the same code doesnt show the Icon in the center.

Image

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(MyHomePage());
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Expanded(
                  child: FittedBox(
                fit: BoxFit.fitWidth,
                alignment: Alignment.center,
                child: Container(
                    color: Colors.blueGrey,
                    width: 2,
                    height: 2,
                    child: Stack(
                      alignment: Alignment.center,
                      children: [
                        Icon(Icons.close, size: 1.0, color: Colors.red),
                        Container(
                          width: 0.2,
                          height: 0.2,
                          color: Colors.yellow,
                        ),
                      ],
                    )),
              ))
            ],
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Logs

Flutter Doctor output

Flutter 3.29.1

Worked well on my previous prod build with 3.27.1

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work liste: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions