I have simple list in which some string are available. I just to need to show all strings in Text widget by for loop
I try like this
List datesData = [{
'09:00 am - 10:00 am',
'10:00 am - 11:00 am',
'11:00 am - 12:00 am',
'12:00 am - 01:00 am',
'01:00 am - 02:00 am',
'02:00 am - 03:00 am',
'03:00 am - 04:00 am',
'04:00 am - 05:00 am'
}];
for(int i = 0; i < 8; i++){
Container(
child: Text(datesData(i)),
);
}
ITs show error in datesData The expression doesn't evaluate to a function, so it can't be invoked.
Also in don't want to define length of for lopp like for(int i = 0; i < 8; i++) i need to check it automatically that it has 8 strings.