Skip to content

关于夜间模式的支持? #15

@liyujiang-gzu

Description

@liyujiang-gzu

好多组件默认都把背景色写死了,以至于不能正常支持夜间模式。比如cell/index.dart的第44行为Colors.white,可考虑改为WeUi.getTheme(context).defaultBackgroundColor.withAlpha(50)以便支持夜间模式。
夜间模式/自定义色彩配置示例:

...
    return WeUi(
      theme: WeTheme(
        defaultBackgroundColor: _themeData.backgroundColor,
        defaultBorderColor: _themeData.dividerColor,
        primaryColor: _themeData.primaryColor,
        primaryColorDisabled: _themeData.primaryColor.withAlpha(50),
        warnColor: _themeData.errorColor,
        warnColorDisabled: _themeData.errorColor.withAlpha(50),
      ),
      config: WeConfig(
        toastSuccessDuration: 4500,
        notifyDuration: 5000,
      ),
      child: _buildMaterialApp(homeWidget),
    );
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions