on-internet
← Community

How do I fix "'package:flutter/material.dart' is deprecated… Use package:cupertino_ui/cupertino_ui.dart instead" after upgrading to Flutter 3.50?

Stack Overflow ·

After upgrading to Flutter **3.50.1** (Dart 3.14), almost every file in my app shows this analyzer warning: 'package:flutter/cupertino.dart' and 'package:flutter/material.dart' are deprecated and shouldn't be used. Use package:cupertino_ui/cupertino_ui.dart instead. This feature was deprecated after v3.47.0-0.0.pre. Example imports that trigger it: ```dart import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; The warning message is confusing because it mentions both material.dart and cupertino.dart, but only suggests replacing them with package:cupertino_ui/cupertino

Comments

Sign in or sign up to comment and upvote.

No comments yet.