I moved to stable flutter channel from beta, after upgrading flutter,
I am getting error for ListTile() attributes and ScaffoldMassanger,
child: ListTile(
horizontalTitleGap: 10, // error
minVerticalPadding: 10, // error
),
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text('success'),
duration: Duration(seconds: 2),
));
I tried below solutions:
flutter upgrade
flutter clean
flutter pub get
reinstalled dart and flutter plugin in VSCode
flutter run
updated vscode
no success
error log after removing depreciated attributes,
lib/widgets/list_expense.dart:32:9: Error: The getter 'ScaffoldMessenger' isn't defined for the class '_ListExpenseState'.
- '_ListExpenseState' is from 'package:XpenseTracker/widgets/list_expense.dart' ('lib/widgets/list_expense.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'ScaffoldMessenger'. ScaffoldMessenger.of(context).showSnackBar(SnackBar(