0

Today upgrade my flutter sdk for 2.8 and my widget break

Flutter sdk 2.5: The material bannner overleap my UI My UI in Flutter sdk 2.5

Flutter sdk 2.8: Material banner displace my UI My UI in flutter sdk 2.8

Flutter doctor

Running flutter doctor... Doctor summary (to see all details, run flutter doctor -v):

  1. [✓] Flutter (Channel stable, 2.8.0, on Linux Mint 20.2 5.4.0-89-generic, locale es_PY.UTF-8)

  2. [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc4)

  3. [✓] Chrome - develop for the web

  4. [✓] Android Studio (version 4.2)

  5. [✓] VS Code (version 1.62.3)

  6. [✓] Connected device (2 available)

No issues found!

Example Code

Code in gist

OBS: sorry for my code

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Dec 15 '21 at 05:06

1 Answers1

0

Try to give an elevation to the banner. According to a change made in September 2021

/// If this property is null, then [MaterialBannerThemeData.elevation] of
   /// [ThemeData.bannerTheme] is used, if that is also null, the default value is 0.
/// If the elevation is 0, the [Scaffold]'s body will be pushed down by the
/// MaterialBanner when used with [ScaffoldMessenger].

The change is here.

Michele Volpato
  • 700
  • 6
  • 14