From f7f6f757e500bb68226a4c7b45b2ae71b0745c9d Mon Sep 17 00:00:00 2001 From: Moktadir Date: Sat, 23 Mar 2024 03:19:44 +0600 Subject: [PATCH] simple fix --- analysis_options.yaml | 2 ++ lib/app/components/global-widgets/empty_widget.dart | 2 +- lib/app/components/global-widgets/soft_button.dart | 4 ++-- lib/app/components/navbar/bottom_navbar.dart | 2 +- .../example/home-with-restAPI/views/post_detail_view.dart | 2 +- lib/app/modules/onboarding/views/onboarding_view.dart | 5 ++--- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 0d29021..25016a4 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -21,6 +21,8 @@ linter: # `// ignore_for_file: name_of_lint` syntax on the line or in the file # producing the lint. rules: + spelling_typo: + enabled: false # avoid_print: false # Uncomment to disable the `avoid_print` rule # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule diff --git a/lib/app/components/global-widgets/empty_widget.dart b/lib/app/components/global-widgets/empty_widget.dart index b78807b..5efc058 100755 --- a/lib/app/components/global-widgets/empty_widget.dart +++ b/lib/app/components/global-widgets/empty_widget.dart @@ -6,7 +6,7 @@ import 'package:ionicons/ionicons.dart'; import 'package:lottie/lottie.dart'; class EmptyWidget extends StatelessWidget { - const EmptyWidget({Key? key, required this.onPressed}) : super(key: key); + const EmptyWidget({super.key, required this.onPressed}); final VoidCallback onPressed; @override Widget build(BuildContext context) { diff --git a/lib/app/components/global-widgets/soft_button.dart b/lib/app/components/global-widgets/soft_button.dart index 33a129a..89f612d 100755 --- a/lib/app/components/global-widgets/soft_button.dart +++ b/lib/app/components/global-widgets/soft_button.dart @@ -3,10 +3,10 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; class SoftButton extends StatelessWidget { const SoftButton({ - Key? key, + super.key, required this.title, required this.onPressed, - }) : super(key: key); + }); final String title; final VoidCallback onPressed; diff --git a/lib/app/components/navbar/bottom_navbar.dart b/lib/app/components/navbar/bottom_navbar.dart index 2d9e420..7f86e9c 100755 --- a/lib/app/components/navbar/bottom_navbar.dart +++ b/lib/app/components/navbar/bottom_navbar.dart @@ -8,7 +8,7 @@ import 'package:iconly/iconly.dart'; import 'navbar_controller.dart'; class BottomNavbar extends GetView { - const BottomNavbar({Key? key}) : super(key: key); + const BottomNavbar({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/app/modules/example/home-with-restAPI/views/post_detail_view.dart b/lib/app/modules/example/home-with-restAPI/views/post_detail_view.dart index 013bba3..87ce619 100755 --- a/lib/app/modules/example/home-with-restAPI/views/post_detail_view.dart +++ b/lib/app/modules/example/home-with-restAPI/views/post_detail_view.dart @@ -5,7 +5,7 @@ import 'package:get/get.dart'; import '../controllers/home_controller.dart'; class PostDetailView extends GetView { - const PostDetailView({Key? key}) : super(key: key); + const PostDetailView({super.key}); @override Widget build(BuildContext context) { diff --git a/lib/app/modules/onboarding/views/onboarding_view.dart b/lib/app/modules/onboarding/views/onboarding_view.dart index e65ea12..f738527 100644 --- a/lib/app/modules/onboarding/views/onboarding_view.dart +++ b/lib/app/modules/onboarding/views/onboarding_view.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; - import 'package:get/get.dart'; import '../../../components/global-widgets/my_buttons.dart'; @@ -8,7 +7,7 @@ import '../../../routes/app_pages.dart'; import '../controllers/onboarding_controller.dart'; class OnboardingView extends GetView { - const OnboardingView({Key? key}) : super(key: key); + const OnboardingView({super.key}); @override Widget build(BuildContext context) { var theme = Theme.of(context); @@ -17,7 +16,7 @@ class OnboardingView extends GetView { children: [ PageView.builder( controller: controller.pageController, - onPageChanged: controller.selectedPage, + onPageChanged: controller.selectedPage.call, itemCount: controller.onBoardingPages.length, itemBuilder: (context, index) { return controller.onBoardingPages.isEmpty