小编李少颖*_*李少颖的帖子

如何将BottomAppBar背景色设为透明

我希望 BottomAppBar 是透明的并显示正在发生的情况\xef\xbc\x8cso 这是我的代码。

\n
class BottomTabNavigation extends StatefulWidget {\n  @override\n  _BottomTabNavigationState createState() => _BottomTabNavigationState();\n}\n\nclass _BottomTabNavigationState extends State<BottomTabNavigation>\n    with AutomaticKeepAliveClientMixin, SingleTickerProviderStateMixin {\n  PageController _pageController;\n  int _currentIndex = 0;\n\n  @override\n  void initState() {\n    super.initState();\n    _pageController = PageController(\n      initialPage: 0,\n    );\n  }\n\n  @override\n  void dispose() {\n    super.dispose();\n    _pageController.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    super.build(context);\n    return Container(\n      child: Stack(\n        fit: StackFit.expand,\n        children: [\n          Container(\n            color: Colors.transparent,\n          ),\n          _buildScaffold(),\n        ],\n      ),\n    );\n  }\n\n  Scaffold _buildScaffold() {\n    return Scaffold(\n      backgroundColor: Colors.transparent,\n      body: PageView(\n        controller: …
Run Code Online (Sandbox Code Playgroud)

transparent flutter bottomappbar

5
推荐指数
1
解决办法
1526
查看次数

标签 统计

bottomappbar ×1

flutter ×1

transparent ×1