skip to Main Content

I’m facing issue when i build my app with flutter build apk everything I made looks good I had the documentation and showed me everything so every step is good.

But when I try to build my app it gives me these errors, what should I do ?

lib/src/pages/all_provider.dart:179:43: Error: The method 'FlatButton' isn't defined for the class '_AllProviderState'.
 - '_AllProviderState' is from 'package:multisuperstore/src/pages/all_provider.dart' ('lib/src/pages/all_provider.dart')
.
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                                          FlatButton(
                                          ^^^^^^^^^^
lib/src/pages/editprofile.dart:493:25: Error: The method 'RaisedButton' isn't defined for the class '_ProfileFormWidgetS
tate'.
 - '_ProfileFormWidgetState' is from 'package:multisuperstore/src/pages/editprofile.dart' ('lib/src/pages/editprofile.da
rt').
Try correcting the name to the name of an existing method, or defining a method named 'RaisedButton'.
                  child:RaisedButton(
                        ^^^^^^^^^^^^
lib/src/pages/editprofile.dart:552:32: Error: The method 'FlatButton' isn't defined for the class '_ProfileFormWidgetSta
te'.
 - '_ProfileFormWidgetState' is from 'package:multisuperstore/src/pages/editprofile.dart' ('lib/src/pages/editprofile.da
rt').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                        child: FlatButton(
                               ^^^^^^^^^^
lib/src/pages/force_update.dart:106:26: Error: The method 'FlatButton' isn't defined for the class '_ForceUpdateState'.
 - '_ForceUpdateState' is from 'package:multisuperstore/src/pages/force_update.dart' ('lib/src/pages/force_update.dart')
.
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                  child: FlatButton(
                         ^^^^^^^^^^
lib/src/pages/mobile_login.dart:109:44: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
      _con.scaffoldKeyState?.currentState?.showSnackBar(SnackBar(
                                           ^^^^^^^^^^^^
lib/src/pages/mobile_login.dart:254:30: Error: The method 'FlatButton' isn't defined for the class '_MobileLoginState'.
 - '_MobileLoginState' is from 'package:multisuperstore/src/pages/mobile_login.dart' ('lib/src/pages/mobile_login.dart')
.
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                      child: FlatButton(
                             ^^^^^^^^^^
lib/src/pages/mobile_login.dart:268:70: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
                                _con.scaffoldKeyState?.currentState?.showSnackBar(
                                                                     ^^^^^^^^^^^^
lib/src/pages/new_password.dart:148:14: Error: The method 'RaisedButton' isn't defined for the class '_NewPasswordWidget
State'.
 - '_NewPasswordWidgetState' is from 'package:multisuperstore/src/pages/new_password.dart' ('lib/src/pages/new_password.
dart').
Try correcting the name to the name of an existing method, or defining a method named 'RaisedButton'.
      child: RaisedButton(
             ^^^^^^^^^^^^
lib/src/pages/order_details.dart:613:28: Error: The method 'FlatButton' isn't defined for the class '_OrderDetailsState'
.
 - '_OrderDetailsState' is from 'package:multisuperstore/src/pages/order_details.dart' ('lib/src/pages/order_details.dar
t').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                    child: FlatButton(
                           ^^^^^^^^^^
lib/src/pages/otp_verification_email.dart:159:15: Error: The method 'RaisedButton' isn't defined for the class '_OtpVeri
ficationEmailState'.
 - '_OtpVerificationEmailState' is from 'package:multisuperstore/src/pages/otp_verification_email.dart' ('lib/src/pages/
otp_verification_email.dart').
Try correcting the name to the name of an existing method, or defining a method named 'RaisedButton'.
              RaisedButton(
              ^^^^^^^^^^^^
lib/src/pages/recharge.dart:154:54: Error: The method 'FlatButton' isn't defined for the class '_RechargePageState'.
 - '_RechargePageState' is from 'package:multisuperstore/src/pages/recharge.dart' ('lib/src/pages/recharge.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                                              child: FlatButton(
                                                     ^^^^^^^^^^
lib/src/pages/recharge.dart:213:28: Error: The method 'FlatButton' isn't defined for the class '_RechargePageState'.
 - '_RechargePageState' is from 'package:multisuperstore/src/pages/recharge.dart' ('lib/src/pages/recharge.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                    child: FlatButton(
                           ^^^^^^^^^^
lib/src/pages/register.dart:254:32: Error: The method 'FlatButton' isn't defined for the class '_RegisterState'.
 - '_RegisterState' is from 'package:multisuperstore/src/pages/register.dart' ('lib/src/pages/register.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                        child: FlatButton(
                               ^^^^^^^^^^
lib/src/pages/services_page.dart:291:28: Error: The method 'FlatButton' isn't defined for the class '_ServiceblockState'
.
 - '_ServiceblockState' is from 'package:multisuperstore/src/pages/services_page.dart' ('lib/src/pages/services_page.dar
t').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                    child: FlatButton(
                           ^^^^^^^^^^
lib/src/pages/timedatepage.dart:55:26: Error: The method 'FlatButton' isn't defined for the class '_TimeDatePageState'.
 - '_TimeDatePageState' is from 'package:multisuperstore/src/pages/timedatepage.dart' ('lib/src/pages/timedatepage.dart'
).
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                  child: FlatButton(
                         ^^^^^^^^^^
lib/src/pages/timedatepage.dart:444:42: Error: The method 'FlatButton' isn't defined for the class '_SheetContainerState
'.
 - '_SheetContainerState' is from 'package:multisuperstore/src/pages/timedatepage.dart' ('lib/src/pages/timedatepage.dar
t').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                                  child: FlatButton(
                                         ^^^^^^^^^^
lib/src/pages/timedatepage.dart:619:58: Error: The method 'FlatButton' isn't defined for the class '_SheetContainerState
'.
 - '_SheetContainerState' is from 'package:multisuperstore/src/pages/timedatepage.dart' ('lib/src/pages/timedatepage.dar
t').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                                                  child: FlatButton(
                                                         ^^^^^^^^^^
lib/src/pages/booking_track1.dart:1132:21: Error: The method 'FlatButton' isn't defined for the class '_BillingDetailsPo
pupState'.
 - '_BillingDetailsPopupState' is from 'package:multisuperstore/src/pages/booking_track1.dart' ('lib/src/pages/booking_t
rack1.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                    FlatButton(
                    ^^^^^^^^^^
lib/src/pages/book_confirmation.dart:230:34: Error: The method 'FlatButton' isn't defined for the class '_BookConfirmati
onState'.
 - '_BookConfirmationState' is from 'package:multisuperstore/src/pages/book_confirmation.dart' ('lib/src/pages/book_conf
irmation.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                          child: FlatButton(
                                 ^^^^^^^^^^
lib/src/pages/send_package.dart:134:36: Error: The method 'FlatButton' isn't defined for the class '_SendPackageState'.
 - '_SendPackageState' is from 'package:multisuperstore/src/pages/send_package.dart' ('lib/src/pages/send_package.dart')
.
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                            child: FlatButton(
                                   ^^^^^^^^^^
lib/src/pages/send_package.dart:159:36: Error: The method 'FlatButton' isn't defined for the class '_SendPackageState'.
 - '_SendPackageState' is from 'package:multisuperstore/src/pages/send_package.dart' ('lib/src/pages/send_package.dart')
.
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                            child: FlatButton(
                                   ^^^^^^^^^^
lib/src/pages/send_package.dart:534:36: Error: The method 'FlatButton' isn't defined for the class '_SendPackageState'.
 - '_SendPackageState' is from 'package:multisuperstore/src/pages/send_package.dart' ('lib/src/pages/send_package.dart')
.
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                            child: FlatButton(
                                   ^^^^^^^^^^
lib/src/pages/upload_prescription.dart:337:40: Error: The method 'FlatButton' isn't defined for the class '_UploadPrescr
iptionState'.
 - '_UploadPrescriptionState' is from 'package:multisuperstore/src/pages/upload_prescription.dart' ('lib/src/pages/uploa
d_prescription.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                                child: FlatButton(
                                       ^^^^^^^^^^
lib/src/pages/upload_prescription.dart:459:36: Error: The method 'FlatButton' isn't defined for the class '_UploadPrescr
iptionState'.
 - '_UploadPrescriptionState' is from 'package:multisuperstore/src/pages/upload_prescription.dart' ('lib/src/pages/uploa
d_prescription.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                            child: FlatButton(
                                   ^^^^^^^^^^
lib/src/pages/upload_prescription.dart:482:36: Error: The method 'FlatButton' isn't defined for the class '_UploadPrescr
iptionState'.
 - '_UploadPrescriptionState' is from 'package:multisuperstore/src/pages/upload_prescription.dart' ('lib/src/pages/uploa
d_prescription.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                            child: FlatButton(
                                   ^^^^^^^^^^
lib/src/pages/map.dart:283:54: Error: The method 'FlatButton' isn't defined for the class '_MapWidgetState'.
 - '_MapWidgetState' is from 'package:multisuperstore/src/pages/map.dart' ('lib/src/pages/map.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                                              child: FlatButton(
                                                     ^^^^^^^^^^
lib/src/pages/store_detail.dart:873:28: Error: The method 'FlatButton' isn't defined for the class '_FancyFabState'.
 - '_FancyFabState' is from 'package:multisuperstore/src/pages/store_detail.dart' ('lib/src/pages/store_detail.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                    child: FlatButton(
                           ^^^^^^^^^^
lib/src/pages/checkoutpage.dart:85:44: Error: The method 'FlatButton' isn't defined for the class '_CheckoutPageState'.
 - '_CheckoutPageState' is from 'package:multisuperstore/src/pages/checkoutpage.dart' ('lib/src/pages/checkoutpage.dart'
).
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                                    child: FlatButton(
                                           ^^^^^^^^^^
lib/src/pages/checkoutpage.dart:211:48: Error: The method 'FlatButton' isn't defined for the class '_CheckoutPageState'.
 - '_CheckoutPageState' is from 'package:multisuperstore/src/pages/checkoutpage.dart' ('lib/src/pages/checkoutpage.dart'
).
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                                        child: FlatButton(
                                               ^^^^^^^^^^
lib/src/pages/checkoutpage.dart:246:48: Error: The method 'FlatButton' isn't defined for the class '_CheckoutPageState'.
 - '_CheckoutPageState' is from 'package:multisuperstore/src/pages/checkoutpage.dart' ('lib/src/pages/checkoutpage.dart'
).
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                                        child: FlatButton(
                                               ^^^^^^^^^^
lib/src/pages/payment.dart:667:30: Error: The method 'FlatButton' isn't defined for the class '_PaymentPageState'.
 - '_PaymentPageState' is from 'package:multisuperstore/src/pages/payment.dart' ('lib/src/pages/payment.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                      child: FlatButton(
                             ^^^^^^^^^^
lib/src/pages/payment.dart:672:61: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
                            _con.scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                                            ^^^^^^^^^^^^
lib/src/pages/empty_cart.dart:47:9: Error: The method 'FlatButton' isn't defined for the class '_EmptyListState'.
 - '_EmptyListState' is from 'package:multisuperstore/src/pages/empty_cart.dart' ('lib/src/pages/empty_cart.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
        FlatButton(
        ^^^^^^^^^^
lib/src/pages/otp_verification.dart:108:21: Error: The method 'RaisedButton' isn't defined for the class '_OtpVerificati
onState'.
 - '_OtpVerificationState' is from 'package:multisuperstore/src/pages/otp_verification.dart' ('lib/src/pages/otp_verific
ation.dart').
Try correcting the name to the name of an existing method, or defining a method named 'RaisedButton'.
              child:RaisedButton(
                    ^^^^^^^^^^^^
lib/src/pages/forget_password.dart:140:14: Error: The method 'RaisedButton' isn't defined for the class '_ForgetPassword
WidgetState'.
 - '_ForgetPasswordWidgetState' is from 'package:multisuperstore/src/pages/forget_password.dart' ('lib/src/pages/forget_
password.dart').
Try correcting the name to the name of an existing method, or defining a method named 'RaisedButton'.
      child: RaisedButton(
             ^^^^^^^^^^^^
lib/src/pages/shop_rating.dart:279:26: Error: The method 'FlatButton' isn't defined for the class '_ShopRatingState'.
 - '_ShopRatingState' is from 'package:multisuperstore/src/pages/shop_rating.dart' ('lib/src/pages/shop_rating.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                  child: FlatButton(
                         ^^^^^^^^^^
lib/src/helpers/helper.dart:479:36: Error: The method 'FlatButton' isn't defined for the class 'Helper'.
 - 'Helper' is from 'package:multisuperstore/src/helpers/helper.dart' ('lib/src/helpers/helper.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                            child: FlatButton(
                                   ^^^^^^^^^^
lib/src/helpers/helper.dart:506:36: Error: The method 'FlatButton' isn't defined for the class 'Helper'.
 - 'Helper' is from 'package:multisuperstore/src/helpers/helper.dart' ('lib/src/helpers/helper.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                            child: FlatButton(
                                   ^^^^^^^^^^
lib/src/elements/PermissionDeniedWidget.dart:56:11: Error: The method 'FlatButton' isn't defined for the class '_Permiss
ionDeniedWidgetState'.
 - '_PermissionDeniedWidgetState' is from 'package:multisuperstore/src/elements/PermissionDeniedWidget.dart' ('lib/src/e
lements/PermissionDeniedWidget.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
          FlatButton(
          ^^^^^^^^^^
lib/src/controllers/user_controller.dart:79:43: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldSt
ate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
          scaffoldKeyState?.currentState?.showSnackBar(SnackBar(
                                          ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:86:41: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldSt
ate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
        scaffoldKeyState?.currentState?.showSnackBar(SnackBar(
                                        ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:127:40: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
            scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                       ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:184:36: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
        scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                   ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:191:36: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
        scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                   ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:227:38: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
          scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                     ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:240:38: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
          scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                     ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:262:41: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
        scaffoldKeyState?.currentState?.showSnackBar(SnackBar(
                                        ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:313:38: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
          scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                     ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:320:36: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
        scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                   ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:366:40: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
            scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                       ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:373:38: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
          scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                     ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:385:34: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
      scaffoldKey?.currentState?.showSnackBar((SnackBar(content: Text(e.message))));
                                 ^^^^^^^^^^^^
lib/src/controllers/user_controller.dart:478:38: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldS
tate'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
          scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                     ^^^^^^^^^^^^
lib/src/elements/LocationWidget.dart:117:28: Error: The method 'FlatButton' isn't defined for the class '_LocationModalP
artState'.
 - '_LocationModalPartState' is from 'package:multisuperstore/src/elements/LocationWidget.dart' ('lib/src/elements/Locat
ionWidget.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                    child: FlatButton(
                           ^^^^^^^^^^
lib/src/elements/LocationWidget.dart:395:32: Error: The method 'FlatButton' isn't defined for the class '_LocationModalP
artState'.
 - '_LocationModalPartState' is from 'package:multisuperstore/src/elements/LocationWidget.dart' ('lib/src/elements/Locat
ionWidget.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FlatButton'.
                        child: FlatButton(
                               ^^^^^^^^^^
lib/src/controllers/hservice_controller.dart:35:34: Error: The method 'showSnackBar' isn't defined for the class 'Scaffo
ldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
      scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                 ^^^^^^^^^^^^
lib/src/controllers/hservice_controller.dart:50:34: Error: The method 'showSnackBar' isn't defined for the class 'Scaffo
ldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
      scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                 ^^^^^^^^^^^^
lib/src/controllers/hservice_controller.dart:64:38: Error: The method 'showSnackBar' isn't defined for the class 'Scaffo
ldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
      timescaffoldKey?.currentState?.showSnackBar(SnackBar(
                                     ^^^^^^^^^^^^
lib/src/controllers/hservice_controller.dart:126:34: Error: The method 'showSnackBar' isn't defined for the class 'Scaff
oldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/C:/src/flutter/packages/flutter/lib/src/mater
ial/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
      scaffoldKey?.currentState?.showSnackBar(SnackBar(
                                 ^^^^^^^^^^^^

2

Answers


  1. Try to clean your dependencies with

    flutter clean
    flutter pub get
    

    and rerun again

    Login or Signup to reply.
    • flutter pub cache repair
    • flutter pub cache clean
    • flutter pub get
    • flutter build apk
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search