Deprecated classes
organicnz opened this issue · 0 comments
organicnz commented
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)