Display the full month in billing details
This commit is contained in:
parent
8dc5bad44c
commit
81db6e73d1
2 changed files with 20 additions and 1 deletions
|
@ -75,7 +75,7 @@ class UsageWidgetState extends State<UsageWidget> {
|
|||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Tentative bill for " + getMonth(DateTime.now())),
|
||||
Text("Tentative bill for " + getFullMonth(DateTime.now())),
|
||||
_usageInGBs == null ? loadWidget : _getCost(_usageInGBs),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -13,6 +13,21 @@ Map<int, String> _months = {
|
|||
12: "Dec",
|
||||
};
|
||||
|
||||
Map<int, String> _fullMonths = {
|
||||
1: "January",
|
||||
2: "February",
|
||||
3: "March",
|
||||
4: "April",
|
||||
5: "May",
|
||||
6: "June",
|
||||
7: "July",
|
||||
8: "August",
|
||||
9: "September",
|
||||
10: "October",
|
||||
11: "November",
|
||||
12: "December",
|
||||
};
|
||||
|
||||
Map<int, String> _days = {
|
||||
1: "Mon",
|
||||
2: "Tue",
|
||||
|
@ -43,6 +58,10 @@ String getMonth(DateTime dateTime) {
|
|||
return _months[dateTime.month];
|
||||
}
|
||||
|
||||
String getFullMonth(DateTime dateTime) {
|
||||
return _fullMonths[dateTime.month];
|
||||
}
|
||||
|
||||
String getTime(DateTime dateTime) {
|
||||
final hours = dateTime.hour > 9
|
||||
? dateTime.hour.toString()
|
||||
|
|
Loading…
Add table
Reference in a new issue