Skip to content

Commit

Permalink
fix: fix month year in rebate card
Browse files Browse the repository at this point in the history
Signed-off-by: Aman <[email protected]>
  • Loading branch information
aman-singh7 committed Jan 2, 2023
1 parent 33ca183 commit f7b923d
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 52 deletions.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -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'
}
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
2 changes: 1 addition & 1 deletion lib/models/transaction/paginated_yearly_rebate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class YearlyRebate {
int year;
dynamic bill;
int expenses;
int rebate;
num rebate;
int startDate;

YearlyRebate({
Expand Down
5 changes: 2 additions & 3 deletions lib/ui/rebates/components/monthly_rebate_card.dart
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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,
),
],
Expand Down
7 changes: 3 additions & 4 deletions lib/ui/rebates/rebates_history_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,14 @@ class _RebatesHistoryViewState extends State<RebatesHistoryView> {
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,
);
},
);
Expand Down
62 changes: 24 additions & 38 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit f7b923d

Please sign in to comment.