So im trying to get an array of timestamps from 2 times in flutterflow.
ex. time1 06:00, time2 06:05
the result would be 06:00, 06:01, 06:02, 06:03, 06:04, 06:05.
Im using a custom function so somebody please help
DateTime occupiedTime(DateTime from, DateTime to,) {
/// MODIFY CODE ONLY BELOW THIS LINE
from = DateTime(from.hour, from.minute,);
to = DateTime(to.hour, to.minute);
return
/// MODIFY CODE ONLY ABOVE THIS LINE
}
i tried this code but no matter what i try to return it gives me error
2
Answers
Based on your input & output, you are trying to get List time (interval based on minute).
It can be
While you like to format, you can use packages/intl or
Test snippet
You can define a method like this:
Usage:
Output: