From f7b923dde9ad2edee8495513d6cd83f64e9daf11 Mon Sep 17 00:00:00 2001 From: Aman Date: Tue, 3 Jan 2023 03:53:07 +0530 Subject: [PATCH] fix: fix month year in rebate card Signed-off-by: Aman --- android/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../transaction/paginated_yearly_rebate.dart | 2 +- .../components/monthly_rebate_card.dart | 5 +- lib/ui/rebates/rebates_history_view.dart | 7 +-- pubspec.lock | 62 +++++++------------ pubspec.yaml | 6 +- 7 files changed, 36 insertions(+), 52 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index f049c53f..5ff0a00c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.7.20' + ext.kotlin_version = '1.6.10' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.3.2' } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 459a0197..7efb1bdc 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip \ No newline at end of file +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip \ No newline at end of file diff --git a/lib/models/transaction/paginated_yearly_rebate.dart b/lib/models/transaction/paginated_yearly_rebate.dart index 52041c73..86eaca21 100644 --- a/lib/models/transaction/paginated_yearly_rebate.dart +++ b/lib/models/transaction/paginated_yearly_rebate.dart @@ -41,7 +41,7 @@ class YearlyRebate { int year; dynamic bill; int expenses; - int rebate; + num rebate; int startDate; YearlyRebate({ diff --git a/lib/ui/rebates/components/monthly_rebate_card.dart b/lib/ui/rebates/components/monthly_rebate_card.dart index 29910ffb..81d4a97e 100644 --- a/lib/ui/rebates/components/monthly_rebate_card.dart +++ b/lib/ui/rebates/components/monthly_rebate_card.dart @@ -1,11 +1,10 @@ import 'package:appetizer/app_theme.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:intl/intl.dart'; class MonthlyRebateCard extends StatelessWidget { final int? balanceConsumed; - final int? rebate; + final num? rebate; final int? additionalMeal; final String? month; final int? year; @@ -36,7 +35,7 @@ class MonthlyRebateCard extends StatelessWidget { style: AppTheme.headline3, ), Text( - '${DateFormat.MMMM().format(DateTime.now())} ${DateTime.now().year}', + '$month $year', style: AppTheme.bodyText1, ), ], diff --git a/lib/ui/rebates/rebates_history_view.dart b/lib/ui/rebates/rebates_history_view.dart index 926001da..d35055f9 100644 --- a/lib/ui/rebates/rebates_history_view.dart +++ b/lib/ui/rebates/rebates_history_view.dart @@ -110,15 +110,14 @@ class _RebatesHistoryViewState extends State { return MonthlyRebateCard( balanceConsumed: 0, rebate: _yearlyRebate.rebate, - additionalMeal: - model.yearlyRebate.results[index].expenses, + additionalMeal: _yearlyRebate.expenses, month: DateTimeUtils.getMonthName( DateTime( DateTime.now().year, - model.yearlyRebate.results[index].monthId, + _yearlyRebate.monthId, ), ), - year: model.yearlyRebate.results[index].year, + year: _yearlyRebate.year, ); }, ); diff --git a/pubspec.lock b/pubspec.lock index 6e9e297d..9a1795d5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: _flutterfire_internals url: "https://pub.dartlang.org" source: hosted - version: "1.0.9" + version: "1.0.12" archive: dependency: transitive description: @@ -71,20 +71,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.1" - cloud_firestore_platform_interface: - dependency: transitive - description: - name: cloud_firestore_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "5.9.0" - cloud_firestore_web: - dependency: transitive - description: - name: cloud_firestore_web - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" collection: dependency: transitive description: @@ -189,28 +175,28 @@ packages: name: firebase_analytics url: "https://pub.dartlang.org" source: hosted - version: "10.0.6" + version: "10.1.0" firebase_analytics_platform_interface: dependency: transitive description: name: firebase_analytics_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "3.3.14" + version: "3.3.17" firebase_analytics_web: dependency: transitive description: name: firebase_analytics_web url: "https://pub.dartlang.org" source: hosted - version: "0.5.1+5" + version: "0.5.1+8" firebase_core: dependency: "direct main" description: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.4.1" firebase_core_platform_interface: dependency: transitive description: @@ -224,49 +210,49 @@ packages: name: firebase_core_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.1.0" firebase_messaging: dependency: "direct main" description: name: firebase_messaging url: "https://pub.dartlang.org" source: hosted - version: "14.1.3" + version: "14.2.1" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "4.2.7" + version: "4.2.10" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web url: "https://pub.dartlang.org" source: hosted - version: "3.2.8" + version: "3.2.11" firebase_remote_config: dependency: "direct main" description: name: firebase_remote_config url: "https://pub.dartlang.org" source: hosted - version: "3.0.6" + version: "3.0.9" firebase_remote_config_platform_interface: dependency: transitive description: name: firebase_remote_config_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.1.26" + version: "1.1.29" firebase_remote_config_web: dependency: transitive description: name: firebase_remote_config_web url: "https://pub.dartlang.org" source: hosted - version: "1.1.15" + version: "1.1.18" flare_flutter: dependency: "direct main" description: @@ -285,14 +271,14 @@ packages: name: flutter_inappwebview url: "https://pub.dartlang.org" source: hosted - version: "5.7.2+2" + version: "5.7.2+3" flutter_launcher_icons: dependency: "direct main" description: name: flutter_launcher_icons url: "https://pub.dartlang.org" source: hosted - version: "0.10.0" + version: "0.11.0" flutter_native_splash: dependency: "direct main" description: @@ -330,7 +316,7 @@ packages: name: fluttertoast url: "https://pub.dartlang.org" source: hosted - version: "8.1.1" + version: "8.1.2" get: dependency: "direct main" description: @@ -372,7 +358,7 @@ packages: name: image url: "https://pub.dartlang.org" source: hosted - version: "3.2.2" + version: "3.3.0" intl: dependency: "direct main" description: @@ -400,7 +386,7 @@ packages: name: lottie url: "https://pub.dartlang.org" source: hosted - version: "1.4.3" + version: "2.1.0" matcher: dependency: transitive description: @@ -575,7 +561,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "6.0.4" + version: "6.0.5" qr: dependency: transitive description: @@ -596,21 +582,21 @@ packages: name: sembast url: "https://pub.dartlang.org" source: hosted - version: "3.3.1" + version: "3.3.1+1" sentry: dependency: transitive description: name: sentry url: "https://pub.dartlang.org" source: hosted - version: "6.17.0" + version: "6.18.1" sentry_flutter: dependency: "direct main" description: name: sentry_flutter url: "https://pub.dartlang.org" source: hosted - version: "6.17.0" + version: "6.18.1" share_plus: dependency: "direct main" description: @@ -652,7 +638,7 @@ packages: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" shared_preferences_macos: dependency: transitive description: @@ -680,7 +666,7 @@ packages: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sky_engine: dependency: transitive description: flutter @@ -832,7 +818,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "3.1.2" + version: "3.1.3" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index ae3ae438..9050b327 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: appetizer description: An application for digitalzing IIT Roorkee Mess -version: 2.0.3+17 +version: 2.0.3+18 environment: sdk: ">=2.12.0 <3.0.0" @@ -15,7 +15,7 @@ dependencies: firebase_messaging: ^14.0.3 firebase_remote_config: ^3.0.3 flare_flutter: ^3.0.2 - flutter_launcher_icons: ^0.10.0 + flutter_launcher_icons: ^0.11.0 flutter_native_splash: ^2.0.5 flutter_svg: ^1.0.3 fluttertoast: ^8.0.8 @@ -38,7 +38,7 @@ dependencies: connectivity_for_web: ^0.4.0+1 flutter_inappwebview: ^5.4.3+7 flutter_screenutil: ^5.5.3+2 - lottie: ^1.4.3 + lottie: ^2.1.0 card_swiper: ^2.0.4 dev_dependencies: