Skip to content

Add surfaceTintColor to NavigationBar #102627

@TahaTesser

Description

@TahaTesser

part of #91605

NavigationBar is using ElevationOverlay.colorWithOverlay blend when surfaceTintColor wasn't added.
surfaceTintColor is now available in the ColorScheme and recently added to Card widget.

// With Material 3, the NavigationBar uses an overlay blend for the
// default color regardless of light/dark mode. This should be handled
// in the Material widget based off of elevation, but for now we will do
// it here in the defaults.
@override Color? get backgroundColor => ElevationOverlay.colorWithOverlay(_colors.surface, _colors.primary, 3.0);

Solution

Add surfaceTintColor to NavigationBar for Material 3.

Metadata

Metadata

Assignees

Labels

f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions