in flutter we can get current month using this
var now = new DateTime.now();
var formatter = new DateFormat(\'MM\');
String month = formatter.format(now);
<
You can just use
var prevMonth = new DateTime(date.year, date.month - 1, date.day);
with
var date = new DateTime(2018, 1, 13);
you get
2017-12-13
It's usually a good idea to convert to UTC and then back to local date/time before doing date calculations to avoid issues with daylight saving and time zones.