小部件未在android中显示,但在ios中显示

时间:2019-02-10 09:58:25

标签: flutter

我有一个用flutter编写的页面,当我在iOS上渲染它时,它可以正确显示,但是在android上,其中一个小部件没有显示。谁能帮我找出原因?

一切对我来说都很正常。

这是小部件

This is the link to the widget code

这就是我叫它的地方

  Widget build(BuildContext context) {
    return Container(
        decoration: const BoxDecoration(
          image: const DecorationImage(
            fit: BoxFit.fill,
            image: const AssetImage("assets/images/background.png"),
          ),
        ),
        child: SafeArea(
          child: Column(
            children: <Widget>[
              Padding(
                padding: const EdgeInsets.all(100.0),
                child: SizedBox(
                  child: Image.asset("assets/images/logo.png"),
                  height: 120,
                ),
              ),
              Expanded(
                child: Align(
                  alignment: Alignment.bottomRight,
                  child: Padding(
                    padding: const EdgeInsets.fromLTRB(0,0,0,200.0),
                    child: LumiaFab(),
                  ),
                ),
              ),
              Column(
                children: <Widget>[
                  Padding(
                    padding: const EdgeInsets.fromLTRB(0, 0, 0, 80),
                    child: FlatButton(
                      padding: EdgeInsets.fromLTRB(100,10, 100, 10),
                      shape: RoundedRectangleBorder(
                        borderRadius: BorderRadius.all(
                          Radius.circular(10),
                        ),
                      ),
                      color: Colors.white,
                      child: Padding(
                        padding: const EdgeInsets.all(8.0),
                        child: Text(
                          "Login or Sign Up",
                          style: TextStyle(
                            color: Color(0xFF009245),
                            fontSize: 14.0,
                          ),
                        ),
                      ),
                      onPressed: () {},
                    ),
                  ),
                ],
              )
            ],
          ),
        ));

This is what it should look like, and it's how it looks on ios.

This is what it looks like on android. Notice the floating icon button isn't there anymore.

1 个答案:

答案 0 :(得分:0)

原来FittedBox有一个错误,所以我删除了它。然后晶圆厂的利润率底部使它隐藏在不像iphoneX一样长的手机的堆栈中。