Skip to content

Need more parameter control for AdaptiveTabBarView #37

@answer0732

Description

@answer0732

The only two parameters, selectedColor and unselectedColor, cannot adapt properly to Android and iOS.
On Android, if they are not set, the tab bar text becomes invisible in light mode.
However, if selectedColor is set (eg: black), the text on iOS becomes invisible.

I think more parameters are needed to control them separately.(Separate tab text color and tab background color.)

Image Image
    return AdaptiveScaffold(
      appBar: AdaptiveAppBar(
        useNativeToolbar: true,
        title: 'version.title'.tr(),
        appBar: AppBar(
          title: Text('version.title'.tr()),
          automaticallyImplyLeading: false,
        ),
      ),
      body: SafeArea(
        child: Padding(
          padding: EdgeInsets.only(
            top: PlatformInfo.isIOS26OrHigher() ? kToolbarHeight : 0,
          ),
          child: Material(
            color: Colors.transparent,
            child: AdaptiveTabBarView(
              backgroundColor: Colors.transparent,
              // The following parameters are not compatible with multiple platforms.
              // selectedColor
              // unselectedColor
              tabs: ['Android', 'IOS'],
              children: [
                _buildTabItem('Android'),
                _buildTabItem('IOS'),
              ],
            ),
          ),
        ),
      ),
    );

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions