Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
context fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuldevgarg committed Jan 22, 2024
1 parent ebd02bd commit e334235
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions frontend/mgramseva/lib/providers/reports_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ class ReportsProvider with ChangeNotifier {
navigatorKey.currentContext!,
listen: false);
if (selectedBillPeriod == null) {
throw Exception('${ApplicationLocalizations.of(context).translate(i18.common.SELECT_BILLING_CYCLE)}');
throw Exception('${ApplicationLocalizations.of(navigatorKey.currentContext!).translate(i18.common.SELECT_BILLING_CYCLE)}');
}
Map<String, dynamic> params = {
'tenantId': commonProvider.userDetails!.selectedtenant!.code,
Expand Down Expand Up @@ -481,7 +481,7 @@ class ReportsProvider with ChangeNotifier {
navigatorKey.currentContext!,
listen: false);
if (selectedBillPeriod == null) {
throw Exception('${ApplicationLocalizations.of(context).translate(i18.common.SELECT_BILLING_CYCLE)}');
throw Exception('${ApplicationLocalizations.of(navigatorKey.currentContext!).translate(i18.common.SELECT_BILLING_CYCLE)}');
}
Map<String, dynamic> params = {
'tenantId': commonProvider.userDetails!.selectedtenant!.code,
Expand Down Expand Up @@ -547,7 +547,7 @@ class ReportsProvider with ChangeNotifier {
navigatorKey.currentContext!,
listen: false);
if (selectedBillPeriod == null) {
throw Exception('${ApplicationLocalizations.of(context).translate(i18.common.SELECT_BILLING_CYCLE)}');
throw Exception('${ApplicationLocalizations.of(navigatorKey.currentContext!).translate(i18.common.SELECT_BILLING_CYCLE)}');
}
Map<String, dynamic> params = {
'tenantId': commonProvider.userDetails!.selectedtenant!.code,
Expand Down Expand Up @@ -612,7 +612,7 @@ class ReportsProvider with ChangeNotifier {
navigatorKey.currentContext!,
listen: false);
if (selectedBillPeriod == null) {
throw Exception('${ApplicationLocalizations.of(context).translate(i18.common.SELECT_BILLING_CYCLE)}');
throw Exception('${ApplicationLocalizations.of(navigatorKey.currentContext!).translate(i18.common.SELECT_BILLING_CYCLE)}');
}
Map<String, dynamic> params = {
'tenantId': commonProvider.userDetails!.selectedtenant!.code,
Expand Down Expand Up @@ -677,7 +677,7 @@ class ReportsProvider with ChangeNotifier {
navigatorKey.currentContext!,
listen: false);
if (selectedBillPeriod == null) {
throw Exception('${ApplicationLocalizations.of(context).translate(i18.common.SELECT_BILLING_CYCLE)}');
throw Exception('${ApplicationLocalizations.of(navigatorKey.currentContext!).translate(i18.common.SELECT_BILLING_CYCLE)}');
}
Map<String, dynamic> params = {
'tenantId': commonProvider.userDetails!.selectedtenant!.code,
Expand Down

0 comments on commit e334235

Please sign in to comment.