how can I get the last 3 hours time from the current time in DART
I am getting the current time by this
DateTime toTime = new DateTime.now();
I want to get last last 30minutes before,lastOneHour,lastThreeHour,last 6,last 12,last 24 time from the current time.
I tried doing like this
from = toTime.subtract(new Duration(hours: 0.5)).millisecondsSinceEpoch;
//This is not working
I am converting those result to epochtime.