Skip to content

Proposal to add margin to MaterialBanner constructor #118704

@HELL-i

Description

@HELL-i

Use case

I would like to put an outer margin on the material banner.

Line 296 - 297:
    Widget materialBanner = Container(
      margin: EdgeInsets.only(bottom: elevation > 0 ? 10.0 : 0.0),

For example:
 const MaterialBanner({
    super.key,
    required this.content,
    this.contentTextStyle,
    required this.actions,
    this.elevation,
--> this.margin

Proposal

The goal is to get the Material banner with outer margin to get the design like this:
Screenshot 2023-01-18 at 17 01 19

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions