When we run our flutter app we have an error that stop all, and the error don’t say us where it comes from :
Error: The getter 'title' isn't defined for the class 'TextTheme'.
vertical_stack_header_dialog.dart:61
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('../../flutter/packages/flutter/lib/src/material/text_theme.dart').
text_theme.dart:1
Try correcting the name to the name of an existing getter, or defining a getter or field named 'title'.style: Theme.of(context).textTheme.title,
2
Answers
Please note that without seeing the specific code causing the error, it is difficult to provide an exact solution.
The
title
field onTextTheme
is removed in version 2.2. The replacement for it isheadline6
.You need to replace
with
This is the full list of the old and new APIs:
See also: