How can I fix it? Please don't say import intl.dart as you can see at the second photo I already add it.
Asked
Active
Viewed 1,405 times
3 Answers
2
Your import statement has a red line under it. Meaning it has an error. Most likely you didn't include intl
in your dependencies. You need to add this in the dependencies section of your pubspec.yaml
file.
intl: ^0.17.0

Ivo
- 18,659
- 2
- 23
- 35
0
It might be using the Date Format class from another package.
-> import 'package:intl/intl.dart' as intl;
Edit the import like this.
Try using the date format as below.
intl.DateFormat.yMMMd().format(transaction[index].date),

tguzel
- 34
- 4
0
Open your terminal in VSCode (Ctrl + Shift + ') then type flutter pub add intl
to add the intl package on your dependencies.

editix
- 322
- 2
- 14