gpt4 book ai didi

flutter - 为什么我的Flutter应用程序中的FAB很大?

转载 作者:行者123 更新时间:2023-12-03 03:01:49 25 4
gpt4 key购买 nike

我试图在我的PhotoViewer(计划)中添加一些标记作为 float
按钮,以便以后使用!但是IDK为什么按钮显示出来
如此之大以至于一定如此!

class _MyHomePageState extends State<MyHomePage> {[enter image description here][1]
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: plan(),
floatingActionButton: FloatingActionButton(child: Icon(Icons.add), onPressed: () {}),
);
}

Widget plan() {
return PhotoView.customChild(
child: Stack(
children: widgets(),
),
childSize: const Size(250.0, 220.0),
minScale: PhotoViewComputedScale.contained,
maxScale: PhotoViewComputedScale.covered * 1.8,
initialScale: PhotoViewComputedScale.contained * 0.5,
);
}

List<Widget> widgets() {
return [
Container(
decoration: new BoxDecoration(
image: new DecorationImage(
image: new AssetImage("data_repo/img/bg1.jpg"),
fit: BoxFit.cover,
),
),
),
Center(
child: FloatingActionButton(child: Icon(Icons.add), onPressed: () {}),
),
];
}
}

最佳答案

如果要使用较小的FAB,则可以将mini属性设置为true,并将其更改。

Here some information

希望能帮助到你。

关于flutter - 为什么我的Flutter应用程序中的FAB很大?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55126106/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com