RivaanRanawat / flutter-whatsapp-clone

Source Code for the tutorial to build Full Stack Whatsapp Clone
250 stars 162 forks source link

not run #9

Open kapilsharma-gts opened 1 year ago

kapilsharma-gts commented 1 year ago

C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_platform_widgets-1.20.0/lib/src/platform_button.dart:267:14: Error: The method 'FlatButton' isn't defined for the class 'PlatformButton'.

FAILURE: Build failed with an exception. Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159

BUILD FAILED in 6s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)

akashmishra242 commented 1 year ago

This is due to an oudated package using deprecated widgets.

Reason of error :

The issue is due to "enough_gify_flutter" package whose last update was 9 month before and is using deprecated widgets. thus, giving this type of error:

image

this is because some widgets such as FlatButton, RaisedButton etc is now deprecated and replaced by ElevatedButton and ElevatedButton...

image https://docs.flutter.dev/release/breaking-changes/buttons#context

Solution :

Just remove the 'enough_gify_flutter' package and its relevent code everywhere in the project and it will work perfectly.

dear @RivaanRanawat kindly look into the matter and replace ''enough_gify_flutter'' package with other suitable package at pub.dev .

@kapilsharma-gts hope it helps and if yes, then close the issue.

Regards, Akash @akashmishra242

iambhabha commented 1 year ago

i already fixed it the leg is not working

akashmishra242 commented 1 year ago

you might not be able to remove the relevent part where this package using deprecated widgets in involved. It worked for me , check my repository where i have made the same app few days back taking reference from @RivaanRanawat youtube video: https://github.com/akashmishra242/WhatsApp_clone

hope this will work for you.

iambhabha commented 1 year ago

Thanks