Skip to content
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

控件BrnExpandableGroup的backgroundColor设定无效 #260

Closed
RalghRao opened this issue Jun 30, 2022 · 2 comments
Closed

控件BrnExpandableGroup的backgroundColor设定无效 #260

RalghRao opened this issue Jun 30, 2022 · 2 comments

Comments

@RalghRao
Copy link

RalghRao commented Jun 30, 2022

您好! 我不确定是不是因为我个人失误还是控件的问题导致背景色设定失效,如果是因为我个人原因导致的那很抱歉打扰了。
以下是我的代码:

return Scaffold(
      appBar: AppBar(title: Text(title)),
      body: const Center(
        child: Text('Home'),
      ),
      drawer: Drawer(
        // Add a ListView to the drawer. This ensures the user can scroll
        // through the options in the drawer if there isn't enough vertical
        // space to fit everything.
        backgroundColor: Colors.red,
        child: ListView(
          // Important: Remove any padding from the ListView.
          padding: EdgeInsets.zero,
          children: [
            const DrawerHeader(
              decoration: BoxDecoration(
                color: Colors.black,
                image: DecorationImage(
                  image: ExactAssetImage(
                      'images/logo_technology_financial.png'),
                  fit: BoxFit.fitWidth,
                ),
              ),
              child: Text(''),
            ),
           BrnExpandableGroup(
              title: "Dashboards",
              backgroundColor: const Color.fromARGB(255, 51, 51, 51),
              children: [
                ListTile(
                  title: const Text('Item 1'),
                  textColor: Colors.white,
                  contentPadding: const EdgeInsets.symmetric(horizontal: 32.0),
                  hoverColor: const Color.fromARGB(50, 255, 255, 255),
                  selectedColor: WitechfinThemeUtils.primary,
                  selectedTileColor: Colors.black,
                  onTap: () {
                    Navigator.pop(context);
                  },
                ),
                ListTile(
                  title: const Text('Item 2'),
                  textColor: Colors.white,
                  contentPadding: const EdgeInsets.symmetric(horizontal: 32.0),
                  hoverColor: const Color.fromARGB(50, 255, 255, 255),
                  selectedColor: WitechfinThemeUtils.primary,
                  selectedTileColor: Colors.black,
                  onTap: () {
                    Navigator.pop(context);
                  },
                ),
              ],
            ),
           BrnExpandableGroup(
              title: "Cost Management",
              backgroundColor: const Color.fromARGB(255, 51, 51, 51),
              children: [
                ListTile(
                  title: const Text('Cost Report'),
                  textColor: Colors.white,
                  contentPadding: const EdgeInsets.symmetric(horizontal: 32.0),
                  hoverColor: const Color.fromARGB(50, 255, 255, 255),
                  selectedColor: WitechfinThemeUtils.primary,
                  selectedTileColor: Colors.black,
                  onTap: () {
                    Navigator.pop(context);
                  },
                ),
                ListTile(
                  title: const Text('Cost Optimization'),
                  textColor: Colors.white,
                  contentPadding: const EdgeInsets.symmetric(horizontal: 32.0),
                  hoverColor: const Color.fromARGB(50, 255, 255, 255),
                  selectedColor: WitechfinThemeUtils.primary,
                  selectedTileColor: Colors.black,
                  onTap: () {
                    Navigator.pop(context);
                  },
                ),
              ],
            ),
          ],
        ),
      ),
    );

以下是我运行后的结果:
image

Bruno的版本是2.2.0

----补充----
机型是Windows的Edge
Flutter SDK是flutter_windows_3.0.3-stable

@violinday
Copy link
Collaborator

hi @RalghRao
感谢您的反馈,这个是已知问题 #246,已在 3.x 分支中修复。

@RalghRao
Copy link
Author

RalghRao commented Jul 1, 2022

好的,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants