Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The app doesn't compile with Flutter 3.22.3 #3

Open
jfahrenkrug opened this issue Sep 5, 2024 · 0 comments
Open

The app doesn't compile with Flutter 3.22.3 #3

jfahrenkrug opened this issue Sep 5, 2024 · 0 comments

Comments

@jfahrenkrug
Copy link

When I checkout the app and the tutorial_step_0 branch, I get a bunch of compilation errors:

flutter_sdk_tutorial git:(tutorial_step_0) ✗ flutter run -d chrome
Downloading Web SDK...                                           2,456ms
Launching lib/main.dart on Chrome in debug mode...
Warning: In index.html:37: Local variable for "serviceWorkerVersion" is deprecated. Use "{{flutter_service_worker_version}}" template
token instead.
Warning: In index.html:46: "FlutterLoader.loadEntrypoint" is deprecated. Use "FlutterLoader.load" instead.
lib/main.dart:43:13: Error: No named parameter with the name 'backgroundColor'.
            backgroundColor: Colors.blueGrey[50],
            ^^^^^^^^^^^^^^^
../../../../flutter/packages/flutter/lib/src/material/theme_data.dart:268:11: Context: Found this candidate, but the arguments don't
match.
  factory ThemeData({
          ^
lib/widgets/message_left.dart:18:56: Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart'
 ('../../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText2'.
    TextStyle? fontStyle = Theme.of(context).textTheme.bodyText2;
                                                       ^^^^^^^^^
lib/widgets/message_left.dart:75:28: Error: The getter 'caption' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart'
 ('../../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'caption'.
                          .caption!
                           ^^^^^^^
lib/widgets/message_left.dart:96:54: Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart'
 ('../../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText2'.
                  style: Theme.of(context).textTheme.bodyText2!.apply(
                                                     ^^^^^^^^^
lib/widgets/message_right.dart:45:28: Error: The getter 'caption' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart'
 ('../../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'caption'.
                          .caption!
                           ^^^^^^^
lib/widgets/message_right.dart:66:54: Error: The getter 'bodyText2' isn't defined for the class 'TextTheme'.
 - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart'
 ('../../../../flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'bodyText2'.
                  style: Theme.of(context).textTheme.bodyText2!.apply(
                                                     ^^^^^^^^^
Waiting for connection from debug service on Chrome...             13.5s
Failed to compile application.

Maybe it has to do with a change from Material 2 to Material 3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant