Skip to content

Commit f7b923d

Browse files
committed
fix: fix month year in rebate card
Signed-off-by: Aman <[email protected]>
1 parent 33ca183 commit f7b923d

File tree

7 files changed

+36
-52
lines changed

7 files changed

+36
-52
lines changed

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.7.20'
2+
ext.kotlin_version = '1.6.10'
33
repositories {
44
google()
55
jcenter()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:7.0.2'
9+
classpath 'com.android.tools.build:gradle:7.1.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
classpath 'com.google.gms:google-services:4.3.2'
1212
}

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

lib/models/transaction/paginated_yearly_rebate.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class YearlyRebate {
4141
int year;
4242
dynamic bill;
4343
int expenses;
44-
int rebate;
44+
num rebate;
4545
int startDate;
4646

4747
YearlyRebate({

lib/ui/rebates/components/monthly_rebate_card.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import 'package:appetizer/app_theme.dart';
22
import 'package:flutter/material.dart';
33
import 'package:flutter_screenutil/flutter_screenutil.dart';
4-
import 'package:intl/intl.dart';
54

65
class MonthlyRebateCard extends StatelessWidget {
76
final int? balanceConsumed;
8-
final int? rebate;
7+
final num? rebate;
98
final int? additionalMeal;
109
final String? month;
1110
final int? year;
@@ -36,7 +35,7 @@ class MonthlyRebateCard extends StatelessWidget {
3635
style: AppTheme.headline3,
3736
),
3837
Text(
39-
'${DateFormat.MMMM().format(DateTime.now())} ${DateTime.now().year}',
38+
'$month $year',
4039
style: AppTheme.bodyText1,
4140
),
4241
],

lib/ui/rebates/rebates_history_view.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,14 @@ class _RebatesHistoryViewState extends State<RebatesHistoryView> {
110110
return MonthlyRebateCard(
111111
balanceConsumed: 0,
112112
rebate: _yearlyRebate.rebate,
113-
additionalMeal:
114-
model.yearlyRebate.results[index].expenses,
113+
additionalMeal: _yearlyRebate.expenses,
115114
month: DateTimeUtils.getMonthName(
116115
DateTime(
117116
DateTime.now().year,
118-
model.yearlyRebate.results[index].monthId,
117+
_yearlyRebate.monthId,
119118
),
120119
),
121-
year: model.yearlyRebate.results[index].year,
120+
year: _yearlyRebate.year,
122121
);
123122
},
124123
);

pubspec.lock

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ packages:
77
name: _flutterfire_internals
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "1.0.9"
10+
version: "1.0.12"
1111
archive:
1212
dependency: transitive
1313
description:
@@ -71,20 +71,6 @@ packages:
7171
url: "https://pub.dartlang.org"
7272
source: hosted
7373
version: "1.1.1"
74-
cloud_firestore_platform_interface:
75-
dependency: transitive
76-
description:
77-
name: cloud_firestore_platform_interface
78-
url: "https://pub.dartlang.org"
79-
source: hosted
80-
version: "5.9.0"
81-
cloud_firestore_web:
82-
dependency: transitive
83-
description:
84-
name: cloud_firestore_web
85-
url: "https://pub.dartlang.org"
86-
source: hosted
87-
version: "3.1.0"
8874
collection:
8975
dependency: transitive
9076
description:
@@ -189,28 +175,28 @@ packages:
189175
name: firebase_analytics
190176
url: "https://pub.dartlang.org"
191177
source: hosted
192-
version: "10.0.6"
178+
version: "10.1.0"
193179
firebase_analytics_platform_interface:
194180
dependency: transitive
195181
description:
196182
name: firebase_analytics_platform_interface
197183
url: "https://pub.dartlang.org"
198184
source: hosted
199-
version: "3.3.14"
185+
version: "3.3.17"
200186
firebase_analytics_web:
201187
dependency: transitive
202188
description:
203189
name: firebase_analytics_web
204190
url: "https://pub.dartlang.org"
205191
source: hosted
206-
version: "0.5.1+5"
192+
version: "0.5.1+8"
207193
firebase_core:
208194
dependency: "direct main"
209195
description:
210196
name: firebase_core
211197
url: "https://pub.dartlang.org"
212198
source: hosted
213-
version: "2.3.0"
199+
version: "2.4.1"
214200
firebase_core_platform_interface:
215201
dependency: transitive
216202
description:
@@ -224,49 +210,49 @@ packages:
224210
name: firebase_core_web
225211
url: "https://pub.dartlang.org"
226212
source: hosted
227-
version: "2.0.1"
213+
version: "2.1.0"
228214
firebase_messaging:
229215
dependency: "direct main"
230216
description:
231217
name: firebase_messaging
232218
url: "https://pub.dartlang.org"
233219
source: hosted
234-
version: "14.1.3"
220+
version: "14.2.1"
235221
firebase_messaging_platform_interface:
236222
dependency: transitive
237223
description:
238224
name: firebase_messaging_platform_interface
239225
url: "https://pub.dartlang.org"
240226
source: hosted
241-
version: "4.2.7"
227+
version: "4.2.10"
242228
firebase_messaging_web:
243229
dependency: transitive
244230
description:
245231
name: firebase_messaging_web
246232
url: "https://pub.dartlang.org"
247233
source: hosted
248-
version: "3.2.8"
234+
version: "3.2.11"
249235
firebase_remote_config:
250236
dependency: "direct main"
251237
description:
252238
name: firebase_remote_config
253239
url: "https://pub.dartlang.org"
254240
source: hosted
255-
version: "3.0.6"
241+
version: "3.0.9"
256242
firebase_remote_config_platform_interface:
257243
dependency: transitive
258244
description:
259245
name: firebase_remote_config_platform_interface
260246
url: "https://pub.dartlang.org"
261247
source: hosted
262-
version: "1.1.26"
248+
version: "1.1.29"
263249
firebase_remote_config_web:
264250
dependency: transitive
265251
description:
266252
name: firebase_remote_config_web
267253
url: "https://pub.dartlang.org"
268254
source: hosted
269-
version: "1.1.15"
255+
version: "1.1.18"
270256
flare_flutter:
271257
dependency: "direct main"
272258
description:
@@ -285,14 +271,14 @@ packages:
285271
name: flutter_inappwebview
286272
url: "https://pub.dartlang.org"
287273
source: hosted
288-
version: "5.7.2+2"
274+
version: "5.7.2+3"
289275
flutter_launcher_icons:
290276
dependency: "direct main"
291277
description:
292278
name: flutter_launcher_icons
293279
url: "https://pub.dartlang.org"
294280
source: hosted
295-
version: "0.10.0"
281+
version: "0.11.0"
296282
flutter_native_splash:
297283
dependency: "direct main"
298284
description:
@@ -330,7 +316,7 @@ packages:
330316
name: fluttertoast
331317
url: "https://pub.dartlang.org"
332318
source: hosted
333-
version: "8.1.1"
319+
version: "8.1.2"
334320
get:
335321
dependency: "direct main"
336322
description:
@@ -372,7 +358,7 @@ packages:
372358
name: image
373359
url: "https://pub.dartlang.org"
374360
source: hosted
375-
version: "3.2.2"
361+
version: "3.3.0"
376362
intl:
377363
dependency: "direct main"
378364
description:
@@ -400,7 +386,7 @@ packages:
400386
name: lottie
401387
url: "https://pub.dartlang.org"
402388
source: hosted
403-
version: "1.4.3"
389+
version: "2.1.0"
404390
matcher:
405391
dependency: transitive
406392
description:
@@ -575,7 +561,7 @@ packages:
575561
name: provider
576562
url: "https://pub.dartlang.org"
577563
source: hosted
578-
version: "6.0.4"
564+
version: "6.0.5"
579565
qr:
580566
dependency: transitive
581567
description:
@@ -596,21 +582,21 @@ packages:
596582
name: sembast
597583
url: "https://pub.dartlang.org"
598584
source: hosted
599-
version: "3.3.1"
585+
version: "3.3.1+1"
600586
sentry:
601587
dependency: transitive
602588
description:
603589
name: sentry
604590
url: "https://pub.dartlang.org"
605591
source: hosted
606-
version: "6.17.0"
592+
version: "6.18.1"
607593
sentry_flutter:
608594
dependency: "direct main"
609595
description:
610596
name: sentry_flutter
611597
url: "https://pub.dartlang.org"
612598
source: hosted
613-
version: "6.17.0"
599+
version: "6.18.1"
614600
share_plus:
615601
dependency: "direct main"
616602
description:
@@ -652,7 +638,7 @@ packages:
652638
name: shared_preferences_linux
653639
url: "https://pub.dartlang.org"
654640
source: hosted
655-
version: "2.1.1"
641+
version: "2.1.2"
656642
shared_preferences_macos:
657643
dependency: transitive
658644
description:
@@ -680,7 +666,7 @@ packages:
680666
name: shared_preferences_windows
681667
url: "https://pub.dartlang.org"
682668
source: hosted
683-
version: "2.1.1"
669+
version: "2.1.2"
684670
sky_engine:
685671
dependency: transitive
686672
description: flutter
@@ -832,7 +818,7 @@ packages:
832818
name: win32
833819
url: "https://pub.dartlang.org"
834820
source: hosted
835-
version: "3.1.2"
821+
version: "3.1.3"
836822
xdg_directories:
837823
dependency: transitive
838824
description:

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: appetizer
22
description: An application for digitalzing IIT Roorkee Mess
33

4-
version: 2.0.3+17
4+
version: 2.0.3+18
55

66
environment:
77
sdk: ">=2.12.0 <3.0.0"
@@ -15,7 +15,7 @@ dependencies:
1515
firebase_messaging: ^14.0.3
1616
firebase_remote_config: ^3.0.3
1717
flare_flutter: ^3.0.2
18-
flutter_launcher_icons: ^0.10.0
18+
flutter_launcher_icons: ^0.11.0
1919
flutter_native_splash: ^2.0.5
2020
flutter_svg: ^1.0.3
2121
fluttertoast: ^8.0.8
@@ -38,7 +38,7 @@ dependencies:
3838
connectivity_for_web: ^0.4.0+1
3939
flutter_inappwebview: ^5.4.3+7
4040
flutter_screenutil: ^5.5.3+2
41-
lottie: ^1.4.3
41+
lottie: ^2.1.0
4242
card_swiper: ^2.0.4
4343

4444
dev_dependencies:

0 commit comments

Comments
 (0)