Getter functions are functions that retrieve something and have no arguments.
syntax:
returnType get NameOfFunction { return code }
Let's define an objective so we can walk through an example:
I want to get a list of maps that has the day as a key and the amount as value over the last 7 days.
I want to return a List<Map<String, Object>>
then I define my getter:
List<Map<String, Object>> get groupedTransaction {} where groupedTransaction is the name of my getter function.
I want to have a list of the last 7 days so I use List.generate() to get a list of a particualr range