Group Group Group Group Group Group Group Group Group

Chapter16 .1 can't be returned from the method 'build' because it has a return type of 'Widget'

chapter16 .1 Optimizing the app icon for Android
main.dart: line38
“A value of type ‘MultiProvider’ can’t be returned from the method ‘build’ because it has a return type of ‘Widget’.”

I cannot solve this issue.

Does the final project run as expected?

@murara1, IMHO your message comes from a typo you did inside the block MultiProvider.

Since Dart is strongly typed, most of the error messages from Flutter SDK and from Android Studio have nothing to do with the actual error, but with the syntax type-checker.

May I suggest that you post the complete code of your MultiProvider block of code here. It’ll be easier to help you check.