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

Deprecated classes #37

Open
organicnz opened this issue Apr 5, 2021 · 0 comments
Open

Deprecated classes #37

organicnz opened this issue Apr 5, 2021 · 0 comments

Comments

@organicnz
Copy link

How could I fix these deprecations, guys?

For example TextButton highlights shape and color properties in VScode.

  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: double.infinity,
      height: getProportionateScreenHeight(56),
      child: TextButton(
        shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
        color: kPrimaryColor,
        onPressed: press,
        child: Text(
          text,
          style: TextStyle(
            fontSize: getProportionateScreenWidth(18),
            color: Colors.white,
          ),
        ),
      ),
    );
  }

flutter analyze

Analyzing E-commerce-Complete-Flutter-UI...                             

   info • 'FlatButton' is deprecated and shouldn't be used. Use TextButton
          instead. See the migration guide in
          flutter.dev/go/material-button-migration-guide). This feature
          was deprecated after v1.25.0-8.1.pre. •
          lib/components/default_button.dart:20:14 • deprecated_member_use
   info • 'FlatButton' is deprecated and shouldn't be used. Use TextButton
          instead. See the migration guide in
          flutter.dev/go/material-button-migration-guide). This feature
          was deprecated after v1.25.0-8.1.pre. •
          lib/components/rounded_icon_btn.dart:33:14 •
          deprecated_member_use
   info • Unused import:
          'package:shop_app/screens/profile/profile_screen.dart' •
          lib/main.dart:3:8 • unused_import
   info • Duplicate import • lib/models/Cart.dart:4:8 • duplicate_import
   info • 'FlatButton' is deprecated and shouldn't be used. Use TextButton
          instead. See the migration guide in
          flutter.dev/go/material-button-migration-guide). This feature
          was deprecated after v1.25.0-8.1.pre. •
          lib/screens/details/components/custom_app_bar.dart:26:22 •
          deprecated_member_use
   info • 'overflow' is deprecated and shouldn't be used. Use clipBehavior
          instead. See the migration guide in
          flutter.dev/go/clip-behavior. This feature was deprecated after
          v1.22.0-12.0.pre. •
          lib/screens/home/components/icon_btn_with_counter.dart:25:9 •
          deprecated_member_use
   info • 'Overflow' is deprecated and shouldn't be used. Use clipBehavior
          instead. See the migration guide in
          flutter.dev/go/clip-behavior. This feature was deprecated after
          v1.22.0-12.0.pre. •
          lib/screens/home/components/icon_btn_with_counter.dart:25:19 •
          deprecated_member_use
   info • 'FlatButton' is deprecated and shouldn't be used. Use TextButton
          instead. See the migration guide in
          flutter.dev/go/material-button-migration-guide). This feature
          was deprecated after v1.25.0-8.1.pre. •
          lib/screens/profile/components/profile_menu.dart:21:14 •
          deprecated_member_use
   info • 'overflow' is deprecated and shouldn't be used. Use clipBehavior
          instead. See the migration guide in
          flutter.dev/go/clip-behavior. This feature was deprecated after
          v1.22.0-12.0.pre. •
          lib/screens/profile/components/profile_pic.dart:16:9 •
          deprecated_member_use
   info • 'Overflow' is deprecated and shouldn't be used. Use clipBehavior
          instead. See the migration guide in
          flutter.dev/go/clip-behavior. This feature was deprecated after
          v1.22.0-12.0.pre. •
          lib/screens/profile/components/profile_pic.dart:16:19 •
          deprecated_member_use
   info • 'FlatButton' is deprecated and shouldn't be used. Use TextButton
          instead. See the migration guide in
          flutter.dev/go/material-button-migration-guide). This feature
          was deprecated after v1.25.0-8.1.pre. •
          lib/screens/profile/components/profile_pic.dart:27:22 •
          deprecated_member_use
   info • Name non-constant identifiers using lowerCamelCase •
          lib/screens/sign_up/components/sign_up_form.dart:20:10 •
          non_constant_identifier_names

12 issues found. (ran in 2.5s)
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