iamshaunjp / iamshaunjp/flutter-masterclass

Lession 26: CardTheme needs CardThemeData

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
145
Forks
44
PR merge metrics
No merged PRs in 30d

Description

In Lesson 26 Shaun assigns the character card to the theme file like this:
```
cardTheme: CardTheme (
...
)
```
This is deprecated. The error you'll be seeing is something like this:
The argument type 'CardTheme' can't be assigned to the parameter type 'CardThemeData?'

As of the current Flutter version (Flutter 3.22+) this needs to be changed to the following to be working:
```
cardTheme: CardThemeData (
...
)
```

Change suggestion courtesy of ChatGPT.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.