From f79301ec77a4a30e6b836687f8391b90f744bba2 Mon Sep 17 00:00:00 2001 From: Hemanth Savarala Date: Tue, 27 Feb 2024 10:54:31 +0530 Subject: [PATCH] #000 | Hemanth | Fix lint warnings --- lib/app.dart | 4 ++-- .../widgets/choose_calendar_format_widget.dart | 6 +++--- lib/core/widgets/choose_theme_mode_widget.dart | 6 +++--- .../filter_widget/filter_budget_widget.dart | 4 ++-- .../paisa_widgets/paisa_empty_widget.dart | 4 ++-- .../widgets/paisa_widgets/paisa_icon_picker.dart | 3 +-- .../paisa_widgets/paisa_user_image_widget.dart | 4 ++-- lib/core/widgets/progress_bar.dart | 4 ++-- .../pages/account_transactions_page.dart | 4 ++-- .../presentation/pages/add/add_account_page.dart | 4 ++-- .../presentation/widgets/account_card.dart | 16 ++++++++-------- .../widgets/account_transaction_widget.dart | 4 ++-- .../widgets/accounts_page_view_widget.dart | 4 ++-- .../widgets/card_type_drop_down.dart | 2 +- .../pages/add/add_category_page.dart | 4 ++-- .../pages/category_list_mobile_page.dart | 4 ++-- .../pages/category_list_tablet_page.dart | 4 ++-- .../widgets/category_item_desktop_widget.dart | 4 ++-- .../widgets/category_item_mobile_widget.dart | 4 ++-- .../widgets/category_item_tablet_widget.dart | 4 ++-- .../widgets/category_item_widget.dart | 4 ++-- .../widgets/debt_toggle_buttons_widget.dart | 4 ++-- .../home/presentation/pages/home/home_page.dart | 4 ++-- .../presentation/pages/summary/summary_page.dart | 4 ++-- .../summary/widgets/expense_item_widget.dart | 8 ++++---- .../summary/widgets/expense_list_widget.dart | 4 ++-- .../summary/widgets/expense_month_card.dart | 4 ++-- .../widgets/expense_total_for_month_widget.dart | 4 ++-- .../summary/widgets/expense_total_widget.dart | 4 ++-- .../summary/widgets/total_balance_widget.dart | 4 ++-- .../summary/widgets/welcome_name_widget.dart | 2 +- .../presentation/widgets/content_widget.dart | 4 ++-- .../widgets/home_desktop_widget.dart | 2 +- .../presentation/widgets/home_mobile_widget.dart | 2 +- .../presentation/widgets/welcome_widget.dart | 4 ++-- .../data/data_source/local_country_data.dart | 1 + .../intro/presentation/pages/intro_page.dart | 8 ++++---- .../widgets/intro_account_add_widget.dart | 2 +- .../widgets/intro_country_picker_widget.dart | 4 ++-- .../widgets/intro_image_picker_widget.dart | 4 ++-- .../widgets/intro_set_name_widget.dart | 4 ++-- .../presentation/widgets/overview_bar_chart.dart | 3 --- .../widgets/user_profile_bottomshee_widget.dart | 4 ++-- .../presentation/page/add_recurring_page.dart | 10 +++++----- .../search/presentation/pages/search_page.dart | 2 +- .../presentation/pages/setting_page.dart | 4 ++-- .../widgets/currency_change_widget.dart | 2 +- .../widgets/dynamic_color_switch_widget.dart | 4 ++-- .../presentation/widgets/setting_option.dart | 4 ++-- .../widgets/settings_color_picker_widget.dart | 8 ++++---- .../widgets/settings_group_card.dart | 4 ++-- .../presentation/widgets/version_widget.dart | 2 +- .../presentation/pages/transaction_page.dart | 4 ++-- .../widgets/select_account_widget.dart | 4 ++-- .../widgets/select_category_widget.dart | 2 +- .../transaction_toggle_buttons_widget.dart | 2 +- 56 files changed, 115 insertions(+), 118 deletions(-) diff --git a/lib/app.dart b/lib/app.dart index 3c5b785a1..74d1482ef 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -24,8 +24,8 @@ import 'package:paisa/main.dart'; class PaisaApp extends StatefulWidget { const PaisaApp({ - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _PaisaAppState(); diff --git a/lib/core/widgets/choose_calendar_format_widget.dart b/lib/core/widgets/choose_calendar_format_widget.dart index 4f25706cb..9a9ea7aaf 100644 --- a/lib/core/widgets/choose_calendar_format_widget.dart +++ b/lib/core/widgets/choose_calendar_format_widget.dart @@ -12,9 +12,9 @@ import 'package:paisa/main.dart'; class ChooseCalendarFormatWidget extends StatefulWidget { const ChooseCalendarFormatWidget({ - Key? key, + super.key, this.currentFormat, - }) : super(key: key); + }); final CalendarFormats? currentFormat; @@ -59,7 +59,7 @@ class ChooseCalendarFormatWidgetState ), ), ) - .toList(), + , Row( mainAxisAlignment: MainAxisAlignment.end, children: [ diff --git a/lib/core/widgets/choose_theme_mode_widget.dart b/lib/core/widgets/choose_theme_mode_widget.dart index 4e4908d88..892ba5db1 100644 --- a/lib/core/widgets/choose_theme_mode_widget.dart +++ b/lib/core/widgets/choose_theme_mode_widget.dart @@ -11,9 +11,9 @@ import 'package:paisa/main.dart'; class ChooseThemeModeWidget extends StatefulWidget { const ChooseThemeModeWidget({ - Key? key, + super.key, required this.currentTheme, - }) : super(key: key); + }); final ThemeMode currentTheme; @@ -55,7 +55,7 @@ class ChooseThemeModeWidgetState extends State { ), ), ) - .toList(), + , Row( mainAxisAlignment: MainAxisAlignment.end, children: [ diff --git a/lib/core/widgets/filter_widget/filter_budget_widget.dart b/lib/core/widgets/filter_widget/filter_budget_widget.dart index 9f3519876..bb592bc21 100644 --- a/lib/core/widgets/filter_widget/filter_budget_widget.dart +++ b/lib/core/widgets/filter_widget/filter_budget_widget.dart @@ -9,9 +9,9 @@ import 'package:paisa/features/home/presentation/controller/summary_controller.d class FilterBudgetToggleWidget extends StatelessWidget { const FilterBudgetToggleWidget({ - Key? key, + super.key, required this.summaryController, - }) : super(key: key); + }); final SummaryController summaryController; diff --git a/lib/core/widgets/paisa_widgets/paisa_empty_widget.dart b/lib/core/widgets/paisa_widgets/paisa_empty_widget.dart index b8572e481..b658408a2 100644 --- a/lib/core/widgets/paisa_widgets/paisa_empty_widget.dart +++ b/lib/core/widgets/paisa_widgets/paisa_empty_widget.dart @@ -7,13 +7,13 @@ import 'paisa_button.dart'; class EmptyWidget extends StatelessWidget { const EmptyWidget({ - Key? key, + super.key, required this.title, required this.icon, required this.description, this.onActionPressed, this.actionTitle, - }) : super(key: key); + }); final String? actionTitle; final String description; diff --git a/lib/core/widgets/paisa_widgets/paisa_icon_picker.dart b/lib/core/widgets/paisa_widgets/paisa_icon_picker.dart index c1d3f0d12..bce15f6c2 100644 --- a/lib/core/widgets/paisa_widgets/paisa_icon_picker.dart +++ b/lib/core/widgets/paisa_widgets/paisa_icon_picker.dart @@ -68,11 +68,10 @@ Future paisaIconPicker({ class _IconPickerWidget extends StatefulWidget { const _IconPickerWidget({ - Key? key, required this.iconKeys, required this.selectedIcon, required this.onSelectedIcon, - }) : super(key: key); + }); final List iconKeys; final Function(IconData icon) onSelectedIcon; diff --git a/lib/core/widgets/paisa_widgets/paisa_user_image_widget.dart b/lib/core/widgets/paisa_widgets/paisa_user_image_widget.dart index 572fc085d..49eed420b 100644 --- a/lib/core/widgets/paisa_widgets/paisa_user_image_widget.dart +++ b/lib/core/widgets/paisa_widgets/paisa_user_image_widget.dart @@ -15,11 +15,11 @@ import 'package:paisa/features/profile/presentation/cubit/profile_cubit.dart'; class PaisaUserImageWidget extends StatelessWidget { const PaisaUserImageWidget({ - Key? key, + super.key, required this.pickImage, this.maxRadius, this.useDefault = false, - }) : super(key: key); + }); final double? maxRadius; final VoidCallback pickImage; diff --git a/lib/core/widgets/progress_bar.dart b/lib/core/widgets/progress_bar.dart index 2470ac731..f50c431a3 100644 --- a/lib/core/widgets/progress_bar.dart +++ b/lib/core/widgets/progress_bar.dart @@ -10,11 +10,11 @@ class ProgressBar extends StatelessWidget { final Color? color; const ProgressBar({ - Key? key, + super.key, required this.max, required this.current, this.color, - }) : super(key: key); + }); @override Widget build(BuildContext context) { return LayoutBuilder( diff --git a/lib/features/account/presentation/pages/account_transactions_page.dart b/lib/features/account/presentation/pages/account_transactions_page.dart index f9908e98a..b1917f420 100644 --- a/lib/features/account/presentation/pages/account_transactions_page.dart +++ b/lib/features/account/presentation/pages/account_transactions_page.dart @@ -19,10 +19,10 @@ import 'package:paisa/features/transaction/domain/entities/transaction_entity.da class AccountTransactionsPage extends StatelessWidget { const AccountTransactionsPage({ - Key? key, + super.key, required this.accountId, required this.summaryController, - }) : super(key: key); + }); final int accountId; final SummaryController summaryController; diff --git a/lib/features/account/presentation/pages/add/add_account_page.dart b/lib/features/account/presentation/pages/add/add_account_page.dart index 5c8c6d97d..2b86abb93 100644 --- a/lib/features/account/presentation/pages/add/add_account_page.dart +++ b/lib/features/account/presentation/pages/add/add_account_page.dart @@ -19,9 +19,9 @@ final GlobalKey _form = GlobalKey(); class AccountPage extends StatefulWidget { const AccountPage({ - Key? key, + super.key, this.accountId, - }) : super(key: key); + }); final int? accountId; diff --git a/lib/features/account/presentation/widgets/account_card.dart b/lib/features/account/presentation/widgets/account_card.dart index eb4f5f1a5..7c0055ae7 100644 --- a/lib/features/account/presentation/widgets/account_card.dart +++ b/lib/features/account/presentation/widgets/account_card.dart @@ -11,7 +11,7 @@ import 'package:paisa/core/common_enum.dart'; class AccountCard extends StatefulWidget { const AccountCard({ - Key? key, + super.key, required this.totalBalance, required this.cardHolder, required this.bankName, @@ -20,7 +20,7 @@ class AccountCard extends StatefulWidget { required this.expense, this.onDelete, this.onTap, - }) : super(key: key); + }); final String bankName; final String cardHolder; @@ -75,7 +75,7 @@ class _AccountCardState extends State class MobileAccountCard extends StatelessWidget { const MobileAccountCard({ - Key? key, + super.key, required this.totalBalance, required this.cardHolder, required this.bankName, @@ -84,7 +84,7 @@ class MobileAccountCard extends StatelessWidget { this.onTap, required this.income, required this.expense, - }) : super(key: key); + }); final String bankName; final String cardHolder; @@ -214,7 +214,7 @@ class AccountSummaryTail extends StatelessWidget { class TabletAccountCard extends StatelessWidget { const TabletAccountCard({ - Key? key, + super.key, required this.cardNumber, required this.cardHolder, required this.bankName, @@ -223,7 +223,7 @@ class TabletAccountCard extends StatelessWidget { this.onTap, required this.income, required this.expense, - }) : super(key: key); + }); final String bankName; final String cardHolder; @@ -369,7 +369,7 @@ class TabletAccountCard extends StatelessWidget { class DesktopAccountCard extends StatelessWidget { const DesktopAccountCard({ - Key? key, + super.key, required this.cardNumber, required this.cardHolder, required this.bankName, @@ -378,7 +378,7 @@ class DesktopAccountCard extends StatelessWidget { this.onTap, required this.income, required this.expense, - }) : super(key: key); + }); final String bankName; final String cardHolder; diff --git a/lib/features/account/presentation/widgets/account_transaction_widget.dart b/lib/features/account/presentation/widgets/account_transaction_widget.dart index f1faccb76..3a7340c84 100644 --- a/lib/features/account/presentation/widgets/account_transaction_widget.dart +++ b/lib/features/account/presentation/widgets/account_transaction_widget.dart @@ -15,9 +15,9 @@ import 'package:paisa/features/home/presentation/pages/summary/widgets/transacti class AccountTransactionWidget extends StatelessWidget { const AccountTransactionWidget({ - Key? key, + super.key, this.isScroll = false, - }) : super(key: key); + }); final bool isScroll; diff --git a/lib/features/account/presentation/widgets/accounts_page_view_widget.dart b/lib/features/account/presentation/widgets/accounts_page_view_widget.dart index 4ce3f0154..e07534516 100644 --- a/lib/features/account/presentation/widgets/accounts_page_view_widget.dart +++ b/lib/features/account/presentation/widgets/accounts_page_view_widget.dart @@ -17,9 +17,9 @@ import 'package:paisa/features/account/presentation/widgets/account_card.dart'; class AccountPageViewWidget extends StatefulWidget { const AccountPageViewWidget({ - Key? key, + super.key, required this.accounts, - }) : super(key: key); + }); final List accounts; diff --git a/lib/features/account/presentation/widgets/card_type_drop_down.dart b/lib/features/account/presentation/widgets/card_type_drop_down.dart index 8f29c871e..4953b1633 100644 --- a/lib/features/account/presentation/widgets/card_type_drop_down.dart +++ b/lib/features/account/presentation/widgets/card_type_drop_down.dart @@ -11,7 +11,7 @@ import 'package:paisa/core/widgets/paisa_widget.dart'; import 'package:paisa/features/account/presentation/bloc/accounts_bloc.dart'; class CardTypeButtons extends StatelessWidget { - const CardTypeButtons({Key? key}) : super(key: key); + const CardTypeButtons({super.key}); void _update(BuildContext context, CardType type) { BlocProvider.of(context).add(UpdateCardTypeEvent(type)); diff --git a/lib/features/category/presentation/pages/add/add_category_page.dart b/lib/features/category/presentation/pages/add/add_category_page.dart index 5d917d960..34e87aaee 100644 --- a/lib/features/category/presentation/pages/add/add_category_page.dart +++ b/lib/features/category/presentation/pages/add/add_category_page.dart @@ -21,9 +21,9 @@ final GlobalKey _formKey = GlobalKey(); class CategoryPage extends StatefulWidget { const CategoryPage({ - Key? key, + super.key, this.categoryId, - }) : super(key: key); + }); final int? categoryId; diff --git a/lib/features/category/presentation/pages/category_list_mobile_page.dart b/lib/features/category/presentation/pages/category_list_mobile_page.dart index 09a666d02..cacdd744a 100644 --- a/lib/features/category/presentation/pages/category_list_mobile_page.dart +++ b/lib/features/category/presentation/pages/category_list_mobile_page.dart @@ -7,9 +7,9 @@ import 'package:paisa/features/category/presentation/widgets/category_item_mobil class CategoryListMobileWidget extends StatelessWidget { const CategoryListMobileWidget({ - Key? key, + super.key, required this.categories, - }) : super(key: key); + }); final List categories; diff --git a/lib/features/category/presentation/pages/category_list_tablet_page.dart b/lib/features/category/presentation/pages/category_list_tablet_page.dart index 38a541447..ff53165f4 100644 --- a/lib/features/category/presentation/pages/category_list_tablet_page.dart +++ b/lib/features/category/presentation/pages/category_list_tablet_page.dart @@ -10,11 +10,11 @@ import 'package:paisa/features/category/presentation/widgets/category_item_table class CategoryListTabletWidget extends StatelessWidget { const CategoryListTabletWidget({ - Key? key, + super.key, required this.addCategoryBloc, this.crossAxisCount = 1, required this.categories, - }) : super(key: key); + }); final CategoryBloc addCategoryBloc; final List categories; diff --git a/lib/features/category/presentation/widgets/category_item_desktop_widget.dart b/lib/features/category/presentation/widgets/category_item_desktop_widget.dart index 107d48eb6..f6189d0ea 100644 --- a/lib/features/category/presentation/widgets/category_item_desktop_widget.dart +++ b/lib/features/category/presentation/widgets/category_item_desktop_widget.dart @@ -9,10 +9,10 @@ import 'package:paisa/features/category/data/model/category_model.dart'; class CategoryItemDesktopWidget extends StatelessWidget { const CategoryItemDesktopWidget({ - Key? key, + super.key, required this.category, required this.onPressed, - }) : super(key: key); + }); final CategoryModel category; final VoidCallback onPressed; diff --git a/lib/features/category/presentation/widgets/category_item_mobile_widget.dart b/lib/features/category/presentation/widgets/category_item_mobile_widget.dart index f7ce02e1d..121f083fc 100644 --- a/lib/features/category/presentation/widgets/category_item_mobile_widget.dart +++ b/lib/features/category/presentation/widgets/category_item_mobile_widget.dart @@ -11,9 +11,9 @@ import 'package:paisa/features/category/domain/entities/category.dart'; class CategoryItemMobileWidget extends StatelessWidget { const CategoryItemMobileWidget({ - Key? key, + super.key, required this.category, - }) : super(key: key); + }); final CategoryEntity category; diff --git a/lib/features/category/presentation/widgets/category_item_tablet_widget.dart b/lib/features/category/presentation/widgets/category_item_tablet_widget.dart index 4905fbb7e..c6ce2eee5 100644 --- a/lib/features/category/presentation/widgets/category_item_tablet_widget.dart +++ b/lib/features/category/presentation/widgets/category_item_tablet_widget.dart @@ -9,10 +9,10 @@ import 'package:paisa/features/category/domain/entities/category.dart'; class CategoryItemTabletWidget extends StatelessWidget { const CategoryItemTabletWidget({ - Key? key, + super.key, required this.category, required this.onPressed, - }) : super(key: key); + }); final CategoryEntity category; final VoidCallback onPressed; diff --git a/lib/features/category/presentation/widgets/category_item_widget.dart b/lib/features/category/presentation/widgets/category_item_widget.dart index 37124ec02..482f6e1fa 100644 --- a/lib/features/category/presentation/widgets/category_item_widget.dart +++ b/lib/features/category/presentation/widgets/category_item_widget.dart @@ -11,10 +11,10 @@ import 'category_item_tablet_widget.dart'; class CategoryItemWidget extends StatelessWidget { const CategoryItemWidget({ - Key? key, + super.key, required this.category, required this.onPressed, - }) : super(key: key); + }); final CategoryEntity category; final VoidCallback onPressed; diff --git a/lib/features/debit/presentation/widgets/debt_toggle_buttons_widget.dart b/lib/features/debit/presentation/widgets/debt_toggle_buttons_widget.dart index 9bb1b0ba2..69855f8c5 100644 --- a/lib/features/debit/presentation/widgets/debt_toggle_buttons_widget.dart +++ b/lib/features/debit/presentation/widgets/debt_toggle_buttons_widget.dart @@ -12,9 +12,9 @@ import 'package:paisa/features/debit/presentation/cubit/debts_bloc.dart'; class DebtToggleButtonsWidget extends StatelessWidget { const DebtToggleButtonsWidget({ - Key? key, + super.key, required this.debtsBloc, - }) : super(key: key); + }); final DebitBloc debtsBloc; diff --git a/lib/features/home/presentation/pages/home/home_page.dart b/lib/features/home/presentation/pages/home/home_page.dart index adc61ad48..4e2f46ae1 100644 --- a/lib/features/home/presentation/pages/home/home_page.dart +++ b/lib/features/home/presentation/pages/home/home_page.dart @@ -56,8 +56,8 @@ final destinations = [ class LandingPage extends StatelessWidget { const LandingPage({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/features/home/presentation/pages/summary/summary_page.dart b/lib/features/home/presentation/pages/summary/summary_page.dart index 897f684d7..222bce510 100644 --- a/lib/features/home/presentation/pages/summary/summary_page.dart +++ b/lib/features/home/presentation/pages/summary/summary_page.dart @@ -15,8 +15,8 @@ import 'package:paisa/main.dart'; class SummaryPage extends StatelessWidget { const SummaryPage({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/features/home/presentation/pages/summary/widgets/expense_item_widget.dart b/lib/features/home/presentation/pages/summary/widgets/expense_item_widget.dart index ac94b1ea7..0fb1cfcba 100644 --- a/lib/features/home/presentation/pages/summary/widgets/expense_item_widget.dart +++ b/lib/features/home/presentation/pages/summary/widgets/expense_item_widget.dart @@ -14,11 +14,11 @@ import 'package:paisa/features/transaction/domain/entities/transaction_entity.da class ExpenseItemWidget extends StatelessWidget { const ExpenseItemWidget({ - Key? key, + super.key, required this.expense, required this.account, required this.category, - }) : super(key: key); + }); final AccountEntity account; final CategoryEntity category; @@ -79,11 +79,11 @@ class ExpenseItemWidget extends StatelessWidget { class ExpenseTransferItemWidget extends StatelessWidget { const ExpenseTransferItemWidget({ - Key? key, + super.key, required this.expense, required this.fromAccount, required this.toAccount, - }) : super(key: key); + }); final TransactionEntity expense; final AccountEntity fromAccount, toAccount; diff --git a/lib/features/home/presentation/pages/summary/widgets/expense_list_widget.dart b/lib/features/home/presentation/pages/summary/widgets/expense_list_widget.dart index 9bcfa3cea..0a62a1b4f 100644 --- a/lib/features/home/presentation/pages/summary/widgets/expense_list_widget.dart +++ b/lib/features/home/presentation/pages/summary/widgets/expense_list_widget.dart @@ -13,9 +13,9 @@ import 'expense_item_widget.dart'; class ExpenseListWidget extends StatelessWidget { const ExpenseListWidget({ - Key? key, + super.key, required this.expenses, - }) : super(key: key); + }); final List expenses; diff --git a/lib/features/home/presentation/pages/summary/widgets/expense_month_card.dart b/lib/features/home/presentation/pages/summary/widgets/expense_month_card.dart index dc4767ea4..d6054dfbf 100644 --- a/lib/features/home/presentation/pages/summary/widgets/expense_month_card.dart +++ b/lib/features/home/presentation/pages/summary/widgets/expense_month_card.dart @@ -9,11 +9,11 @@ import 'package:paisa/features/transaction/domain/entities/transaction_entity.da class ExpenseMonthCardWidget extends StatelessWidget { const ExpenseMonthCardWidget({ - Key? key, + super.key, required this.title, required this.total, required this.expenses, - }) : super(key: key); + }); final List expenses; final String title; diff --git a/lib/features/home/presentation/pages/summary/widgets/expense_total_for_month_widget.dart b/lib/features/home/presentation/pages/summary/widgets/expense_total_for_month_widget.dart index b53d4c216..221b45945 100644 --- a/lib/features/home/presentation/pages/summary/widgets/expense_total_for_month_widget.dart +++ b/lib/features/home/presentation/pages/summary/widgets/expense_total_for_month_widget.dart @@ -7,10 +7,10 @@ import 'package:paisa/core/theme/custom_color.dart'; class ExpenseTotalForMonthWidget extends StatelessWidget { const ExpenseTotalForMonthWidget({ - Key? key, + super.key, required this.income, required this.outcome, - }) : super(key: key); + }); final double income; final double outcome; diff --git a/lib/features/home/presentation/pages/summary/widgets/expense_total_widget.dart b/lib/features/home/presentation/pages/summary/widgets/expense_total_widget.dart index d3a1d206a..cec7e7849 100644 --- a/lib/features/home/presentation/pages/summary/widgets/expense_total_widget.dart +++ b/lib/features/home/presentation/pages/summary/widgets/expense_total_widget.dart @@ -16,9 +16,9 @@ import 'package:paisa/main.dart'; class ExpenseTotalWidget extends StatelessWidget { const ExpenseTotalWidget({ - Key? key, + super.key, required this.expenses, - }) : super(key: key); + }); final List expenses; diff --git a/lib/features/home/presentation/pages/summary/widgets/total_balance_widget.dart b/lib/features/home/presentation/pages/summary/widgets/total_balance_widget.dart index 2e9ea355b..2468c1881 100644 --- a/lib/features/home/presentation/pages/summary/widgets/total_balance_widget.dart +++ b/lib/features/home/presentation/pages/summary/widgets/total_balance_widget.dart @@ -6,10 +6,10 @@ import 'package:paisa/core/common.dart'; class TotalBalanceWidget extends StatelessWidget { const TotalBalanceWidget({ - Key? key, + super.key, required this.title, required this.amount, - }) : super(key: key); + }); final double amount; final String title; diff --git a/lib/features/home/presentation/pages/summary/widgets/welcome_name_widget.dart b/lib/features/home/presentation/pages/summary/widgets/welcome_name_widget.dart index 4ef970a65..d72a57d42 100644 --- a/lib/features/home/presentation/pages/summary/widgets/welcome_name_widget.dart +++ b/lib/features/home/presentation/pages/summary/widgets/welcome_name_widget.dart @@ -10,7 +10,7 @@ import 'package:paisa/core/common_enum.dart'; import 'package:paisa/main.dart'; class WelcomeNameWidget extends StatelessWidget { - const WelcomeNameWidget({Key? key}) : super(key: key); + const WelcomeNameWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/features/home/presentation/widgets/content_widget.dart b/lib/features/home/presentation/widgets/content_widget.dart index 74b3a15c7..0abb8db3a 100644 --- a/lib/features/home/presentation/widgets/content_widget.dart +++ b/lib/features/home/presentation/widgets/content_widget.dart @@ -19,8 +19,8 @@ import 'package:paisa/features/recurring/presentation/page/recurring_page.dart'; class ContentWidget extends StatelessWidget { const ContentWidget({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/features/home/presentation/widgets/home_desktop_widget.dart b/lib/features/home/presentation/widgets/home_desktop_widget.dart index 6ec6cd027..aff73ccdd 100644 --- a/lib/features/home/presentation/widgets/home_desktop_widget.dart +++ b/lib/features/home/presentation/widgets/home_desktop_widget.dart @@ -55,7 +55,7 @@ class HomeDesktopWidget extends StatelessWidget { selectedIcon: e.selectedIcon, label: Text(e.pageType.name(context)), )) - .toList(), + , const Divider(), ListTile( onTap: () { diff --git a/lib/features/home/presentation/widgets/home_mobile_widget.dart b/lib/features/home/presentation/widgets/home_mobile_widget.dart index 49dba2d35..257d01361 100644 --- a/lib/features/home/presentation/widgets/home_mobile_widget.dart +++ b/lib/features/home/presentation/widgets/home_mobile_widget.dart @@ -54,7 +54,7 @@ class HomeMobileWidget extends StatelessWidget { selectedIcon: e.selectedIcon, label: Text(e.pageType.name(context)), )) - .toList(), + , const Divider(), Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), diff --git a/lib/features/home/presentation/widgets/welcome_widget.dart b/lib/features/home/presentation/widgets/welcome_widget.dart index 9effec7cb..2ba5b3702 100644 --- a/lib/features/home/presentation/widgets/welcome_widget.dart +++ b/lib/features/home/presentation/widgets/welcome_widget.dart @@ -15,9 +15,9 @@ import 'package:paisa/main.dart'; class UserImageWidget extends StatelessWidget { const UserImageWidget({ - Key? key, + super.key, this.onPressed, - }) : super(key: key); + }); final VoidCallback? onPressed; diff --git a/lib/features/intro/data/data_source/local_country_data.dart b/lib/features/intro/data/data_source/local_country_data.dart index d6d3693b1..3b8a017d7 100644 --- a/lib/features/intro/data/data_source/local_country_data.dart +++ b/lib/features/intro/data/data_source/local_country_data.dart @@ -4,6 +4,7 @@ /// Link: https://github.com/Daniel-Ioannou/flutter_currency_picker/blob/master/lib/src/currencies.dart /// /////////////////////////////////////////////////////////////////////////////// +library; const List> localCountriesData = [ { diff --git a/lib/features/intro/presentation/pages/intro_page.dart b/lib/features/intro/presentation/pages/intro_page.dart index 3718b32b4..c1fa23554 100644 --- a/lib/features/intro/presentation/pages/intro_page.dart +++ b/lib/features/intro/presentation/pages/intro_page.dart @@ -26,8 +26,8 @@ class IntroPage extends StatelessWidget { class IntroBigScreenWidget extends StatelessWidget { const IntroBigScreenWidget({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { @@ -165,8 +165,8 @@ class IntroBigScreenWidget extends StatelessWidget { class IntoMobileWidget extends StatelessWidget { const IntoMobileWidget({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/features/intro/presentation/widgets/intro_account_add_widget.dart b/lib/features/intro/presentation/widgets/intro_account_add_widget.dart index b6d8fc52d..6ef751fad 100644 --- a/lib/features/intro/presentation/widgets/intro_account_add_widget.dart +++ b/lib/features/intro/presentation/widgets/intro_account_add_widget.dart @@ -144,7 +144,7 @@ class _IntroAccountAddWidgetState extends State color: context.primary, ), )) - .toList(), + , FilterChip( selected: false, onSelected: (value) { diff --git a/lib/features/intro/presentation/widgets/intro_country_picker_widget.dart b/lib/features/intro/presentation/widgets/intro_country_picker_widget.dart index afb071467..27d022b0c 100644 --- a/lib/features/intro/presentation/widgets/intro_country_picker_widget.dart +++ b/lib/features/intro/presentation/widgets/intro_country_picker_widget.dart @@ -14,8 +14,8 @@ import 'package:paisa/features/intro/presentation/widgets/intro_image_picker_wid class IntroCountryPickerWidget extends StatelessWidget { const IntroCountryPickerWidget({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/features/intro/presentation/widgets/intro_image_picker_widget.dart b/lib/features/intro/presentation/widgets/intro_image_picker_widget.dart index 210ecb076..d01c257d3 100644 --- a/lib/features/intro/presentation/widgets/intro_image_picker_widget.dart +++ b/lib/features/intro/presentation/widgets/intro_image_picker_widget.dart @@ -14,8 +14,8 @@ import 'package:paisa/main.dart'; class IntroImagePickerWidget extends StatelessWidget { const IntroImagePickerWidget({ - Key? key, - }) : super(key: key); + super.key, + }); void _pickImage(BuildContext context) { final ImagePicker picker = ImagePicker(); diff --git a/lib/features/intro/presentation/widgets/intro_set_name_widget.dart b/lib/features/intro/presentation/widgets/intro_set_name_widget.dart index 11e89fb85..576d94003 100644 --- a/lib/features/intro/presentation/widgets/intro_set_name_widget.dart +++ b/lib/features/intro/presentation/widgets/intro_set_name_widget.dart @@ -8,10 +8,10 @@ import 'package:paisa/features/intro/presentation/widgets/intro_image_picker_wid class IntroSetNameWidget extends StatelessWidget { const IntroSetNameWidget({ - Key? key, + super.key, required this.formState, required this.nameController, - }) : super(key: key); + }); final GlobalKey formState; final TextEditingController nameController; diff --git a/lib/features/overview/presentation/widgets/overview_bar_chart.dart b/lib/features/overview/presentation/widgets/overview_bar_chart.dart index a705b0671..075c9c778 100644 --- a/lib/features/overview/presentation/widgets/overview_bar_chart.dart +++ b/lib/features/overview/presentation/widgets/overview_bar_chart.dart @@ -5,14 +5,11 @@ import 'package:fl_chart/fl_chart.dart'; import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; import 'package:paisa/core/common.dart'; -import 'package:paisa/core/common_enum.dart'; import 'package:paisa/core/theme/custom_color.dart'; import 'package:paisa/core/widgets/paisa_widgets/paisa_card.dart'; -import 'package:paisa/features/home/presentation/controller/summary_controller.dart'; import 'package:paisa/features/intro/domain/entities/country_entity.dart'; import 'package:paisa/features/overview/presentation/widgets/filter_tabs_widget.dart'; import 'package:paisa/features/transaction/domain/entities/transaction_entity.dart'; -import 'package:paisa/main.dart'; import 'package:provider/provider.dart'; class OverViewBarChartWidget extends StatelessWidget { diff --git a/lib/features/profile/presentation/widgets/user_profile_bottomshee_widget.dart b/lib/features/profile/presentation/widgets/user_profile_bottomshee_widget.dart index 306b41c8b..e64cb8bfb 100644 --- a/lib/features/profile/presentation/widgets/user_profile_bottomshee_widget.dart +++ b/lib/features/profile/presentation/widgets/user_profile_bottomshee_widget.dart @@ -12,10 +12,10 @@ import 'package:paisa/features/settings/domain/use_case/setting_use_case.dart'; class UserProfileBottomSheetWidget extends StatelessWidget { const UserProfileBottomSheetWidget({ - Key? key, + super.key, required this.settingsUseCase, required this.profileCubit, - }) : super(key: key); + }); final SettingsUseCase settingsUseCase; final ProfileCubit profileCubit; diff --git a/lib/features/recurring/presentation/page/add_recurring_page.dart b/lib/features/recurring/presentation/page/add_recurring_page.dart index cb5dd40be..f5bae49bd 100644 --- a/lib/features/recurring/presentation/page/add_recurring_page.dart +++ b/lib/features/recurring/presentation/page/add_recurring_page.dart @@ -107,9 +107,9 @@ class _AddRecurringPageState extends State { class TransactionToggleButtons extends StatelessWidget { const TransactionToggleButtons({ - Key? key, + super.key, required this.recurringCubit, - }) : super(key: key); + }); final RecurringCubit recurringCubit; @@ -199,10 +199,10 @@ class SelectedAccount extends StatelessWidget { class AccountSelectedWidget extends StatefulWidget { const AccountSelectedWidget({ - Key? key, + super.key, required this.accounts, required this.onSelected, - }) : super(key: key); + }); final List accounts; final Function(int selectedId) onSelected; @@ -261,7 +261,7 @@ class _AccountSelectedWidgetState extends State { } class SelectCategory extends StatelessWidget { - const SelectCategory({Key? key}) : super(key: key); + const SelectCategory({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/features/search/presentation/pages/search_page.dart b/lib/features/search/presentation/pages/search_page.dart index 9a955940e..69a6d6b6f 100644 --- a/lib/features/search/presentation/pages/search_page.dart +++ b/lib/features/search/presentation/pages/search_page.dart @@ -19,7 +19,7 @@ import 'package:paisa/features/search/presentation/cubit/search_cubit.dart'; import 'package:paisa/main.dart'; class SearchPage extends StatefulWidget { - const SearchPage({Key? key}) : super(key: key); + const SearchPage({super.key}); @override State createState() => _SearchPageState(); diff --git a/lib/features/settings/presentation/pages/setting_page.dart b/lib/features/settings/presentation/pages/setting_page.dart index ef8320361..bf3bf6daa 100644 --- a/lib/features/settings/presentation/pages/setting_page.dart +++ b/lib/features/settings/presentation/pages/setting_page.dart @@ -29,8 +29,8 @@ import 'package:paisa/main.dart'; class SettingsPage extends StatelessWidget { const SettingsPage({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/features/settings/presentation/widgets/currency_change_widget.dart b/lib/features/settings/presentation/widgets/currency_change_widget.dart index 52b5baaef..4be109a54 100644 --- a/lib/features/settings/presentation/widgets/currency_change_widget.dart +++ b/lib/features/settings/presentation/widgets/currency_change_widget.dart @@ -12,7 +12,7 @@ import 'package:paisa/features/intro/domain/use_case/get_selected_country_use_ca import 'package:paisa/main.dart'; class CurrencyChangeWidget extends StatelessWidget { - const CurrencyChangeWidget({Key? key}) : super(key: key); + const CurrencyChangeWidget({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/features/settings/presentation/widgets/dynamic_color_switch_widget.dart b/lib/features/settings/presentation/widgets/dynamic_color_switch_widget.dart index c60fa76c0..12f8ab7a1 100644 --- a/lib/features/settings/presentation/widgets/dynamic_color_switch_widget.dart +++ b/lib/features/settings/presentation/widgets/dynamic_color_switch_widget.dart @@ -10,8 +10,8 @@ import 'setting_option.dart'; class DynamicColorSwitchWidget extends StatelessWidget { const DynamicColorSwitchWidget({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/features/settings/presentation/widgets/setting_option.dart b/lib/features/settings/presentation/widgets/setting_option.dart index ce12b8f1f..e6750e4eb 100644 --- a/lib/features/settings/presentation/widgets/setting_option.dart +++ b/lib/features/settings/presentation/widgets/setting_option.dart @@ -6,13 +6,13 @@ import 'package:paisa/core/common.dart'; class SettingsOption extends StatelessWidget { const SettingsOption({ - Key? key, + super.key, required this.title, this.icon, this.trailing, this.subtitle, this.onTap, - }) : super(key: key); + }); final IconData? icon; final VoidCallback? onTap; diff --git a/lib/features/settings/presentation/widgets/settings_color_picker_widget.dart b/lib/features/settings/presentation/widgets/settings_color_picker_widget.dart index 54afb03d6..e319cd3e3 100644 --- a/lib/features/settings/presentation/widgets/settings_color_picker_widget.dart +++ b/lib/features/settings/presentation/widgets/settings_color_picker_widget.dart @@ -19,8 +19,8 @@ import 'package:paisa/features/settings/presentation/widgets/setting_option.dart class SettingsColorPickerWidget extends StatelessWidget { const SettingsColorPickerWidget({ - Key? key, - }) : super(key: key); + super.key, + }); int _extractColorValue(BuildContext context, dynamic value) { final isDynamic = value.get(dynamicThemeKey, defaultValue: false); @@ -74,8 +74,8 @@ class SettingsColorPickerWidget extends StatelessWidget { class ColorPickerDialogWidget extends StatelessWidget { const ColorPickerDialogWidget({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) { diff --git a/lib/features/settings/presentation/widgets/settings_group_card.dart b/lib/features/settings/presentation/widgets/settings_group_card.dart index 9e410e215..71032566f 100644 --- a/lib/features/settings/presentation/widgets/settings_group_card.dart +++ b/lib/features/settings/presentation/widgets/settings_group_card.dart @@ -6,10 +6,10 @@ import 'package:paisa/core/common.dart'; class SettingsGroup extends StatelessWidget { const SettingsGroup({ - Key? key, + super.key, required this.title, required this.options, - }) : super(key: key); + }); final List options; final String title; diff --git a/lib/features/settings/presentation/widgets/version_widget.dart b/lib/features/settings/presentation/widgets/version_widget.dart index 98d464e98..3ef6cd0e0 100644 --- a/lib/features/settings/presentation/widgets/version_widget.dart +++ b/lib/features/settings/presentation/widgets/version_widget.dart @@ -10,7 +10,7 @@ import 'package:paisa/core/common.dart'; import 'setting_option.dart'; class VersionWidget extends StatefulWidget { - const VersionWidget({Key? key}) : super(key: key); + const VersionWidget({super.key}); @override State createState() => _VersionWidgetState(); diff --git a/lib/features/transaction/presentation/pages/transaction_page.dart b/lib/features/transaction/presentation/pages/transaction_page.dart index cdfa91dcb..10b7a76bd 100644 --- a/lib/features/transaction/presentation/pages/transaction_page.dart +++ b/lib/features/transaction/presentation/pages/transaction_page.dart @@ -26,12 +26,12 @@ import '../widgets/transfer_widget.dart'; class TransactionPage extends StatefulWidget { const TransactionPage({ - Key? key, + super.key, this.transactionId, this.transactionType, this.accountId, this.categoryId, - }) : super(key: key); + }); final int? accountId; final int? categoryId; diff --git a/lib/features/transaction/presentation/widgets/select_account_widget.dart b/lib/features/transaction/presentation/widgets/select_account_widget.dart index a4cffa521..b555fd01c 100644 --- a/lib/features/transaction/presentation/widgets/select_account_widget.dart +++ b/lib/features/transaction/presentation/widgets/select_account_widget.dart @@ -80,9 +80,9 @@ class SelectedAccount extends StatelessWidget { class AccountSelectedItem extends StatelessWidget { const AccountSelectedItem({ - Key? key, + super.key, required this.accounts, - }) : super(key: key); + }); final List accounts; diff --git a/lib/features/transaction/presentation/widgets/select_category_widget.dart b/lib/features/transaction/presentation/widgets/select_category_widget.dart index e32160751..27e3a3f09 100644 --- a/lib/features/transaction/presentation/widgets/select_category_widget.dart +++ b/lib/features/transaction/presentation/widgets/select_category_widget.dart @@ -16,7 +16,7 @@ import 'package:paisa/features/transaction/presentation/bloc/transaction_bloc.da import 'package:paisa/main.dart'; class SelectCategoryIcon extends StatelessWidget { - const SelectCategoryIcon({Key? key}) : super(key: key); + const SelectCategoryIcon({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/features/transaction/presentation/widgets/transaction_toggle_buttons_widget.dart b/lib/features/transaction/presentation/widgets/transaction_toggle_buttons_widget.dart index ee3a0a1bd..87c730b6f 100644 --- a/lib/features/transaction/presentation/widgets/transaction_toggle_buttons_widget.dart +++ b/lib/features/transaction/presentation/widgets/transaction_toggle_buttons_widget.dart @@ -11,7 +11,7 @@ import 'package:paisa/core/widgets/paisa_widget.dart'; import 'package:paisa/features/transaction/presentation/bloc/transaction_bloc.dart'; class TransactionToggleButtons extends StatelessWidget { - const TransactionToggleButtons({Key? key}) : super(key: key); + const TransactionToggleButtons({super.key}); void _update(BuildContext context, TransactionType type) { BlocProvider.of(context)