-2

How can I fix it? Please don't say import intl.dart as you can see at the second photo I already add it.

1

2

Md. Yeasin Sheikh
  • 54,221
  • 7
  • 29
  • 56
onurkaygn
  • 1
  • 4

3 Answers3

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