Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState #1

Open
jianboy opened this issue Dec 12, 2023 · 0 comments

Comments

@jianboy
Copy link

jianboy commented Dec 12, 2023

lib/controllers/auth/auth_provider.dart:53:34: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
            Scaffold.of(context).showSnackBar((SnackBarWidget.MainSnackBarError(
                                 ^^^^^^^^^^^^
lib/controllers/auth/auth_provider.dart:77:20: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
                  .showSnackBar((SnackBarWidget.MainSnackBarSuccess(
                   ^^^^^^^^^^^^
lib/controllers/auth/auth_provider.dart:86:36: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
              Scaffold.of(context).showSnackBar(
                                   ^^^^^^^^^^^^
lib/controllers/auth/auth_provider.dart:94:32: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
          Scaffold.of(context).showSnackBar((SnackBarWidget.MainSnackBarError(
                               ^^^^^^^^^^^^
lib/controllers/auth/auth_provider.dart:100:32: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
          Scaffold.of(context).showSnackBar(
                               ^^^^^^^^^^^^
lib/controllers/auth/auth_provider.dart:129:20: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
                  .showSnackBar((SnackBarWidget.MainSnackBarSuccess(
                   ^^^^^^^^^^^^
lib/controllers/auth/auth_provider.dart:138:32: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
          Scaffold.of(context).showSnackBar(
                               ^^^^^^^^^^^^
lib/controllers/auth/auth_provider.dart:142:32: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
          Scaffold.of(context).showSnackBar(
                               ^^^^^^^^^^^^
lib/controllers/main/user_provider.dart:99:34: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
            Scaffold.of(context).showSnackBar(
                                 ^^^^^^^^^^^^
lib/controllers/main/user_provider.dart:141:34: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
            Scaffold.of(context).showSnackBar(
                                 ^^^^^^^^^^^^
lib/controllers/main/user_provider.dart:162:34: Error: The method 'showSnackBar' isn't defined for the class 'ScaffoldState'.
 - 'ScaffoldState' is from 'package:flutter/src/material/scaffold.dart' ('/opt/flutter/packages/flutter/lib/src/material/scaffold.dart').
Try correcting the name to the name of an existing method, or defining a method named 'showSnackBar'.
            Scaffold.of(context).showSnackBar(
                                 ^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant