Skip to content

Type mismatches (AppBarTheme -> AppBarThemeData) in Flutter 3.35.1 #370

@Guymaster

Description

@Guymaster

Describe the bug
When building my application using flutter channel stable, it crashed.

.../AppData/Local/Pub/Cache/hosted/pub.dev/getwidget-6.0.0/lib/components/appbar/gf_appbar.dart:307:49: Error: A value of type 'AppBarThemeData' can't be assigned to a variable of type 'AppBarTheme'. - 'AppBarThemeData' is from 'package:flutter/src/material/app_bar_theme.dart' ('.../flutter/flutter/packages/flutter/lib/src/material/app_bar_theme.dart'). - 'AppBarTheme' is from 'package:flutter/src/material/app_bar_theme.dart' ('.../flutter/flutter/packages/flutter/lib/src/material/app_bar_theme.dart'). final AppBarTheme appBarTheme = AppBarTheme.of(context);

To Reproduce
Steps to reproduce the behavior:

  1. Upgrade to flutter 3.35
  2. Import GFAppBar somewhere
  3. Try to build your app

Additional context

Flutter 3.35.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 20f8274939 (2 days ago) • 2025-08-14 10:53:09 -0700
Engine • hash 6cd51c08a88e7bbe848a762c20ad3ecb8b063c0e (revision 1e9a811bf8) (3
days ago) • 2025-08-13 23:35:25.000Z
Tools • Dart 3.9.0 • DevTools 2.48.0

Applied the following change in my pub cache (gf_appbar.dart) and it worked

final AppBarThemeData appBarTheme = AppBarTheme.of(context);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions