ZEGOCLOUD / zego_uikit_prebuilt_call_example_flutter

Call Kit is a prebuilt feature-rich call component, which enables you to build one-on-one and group voice/video calls into your app with only a few lines of code.
https://www.zegocloud.com
52 stars 24 forks source link

Can not build the app, due to this- Error: The getter 'WidgetStateProperty' isn't defined for the class '_ZegoSendCallingInvitationListState'. #9

Closed farhana-95 closed 5 months ago

farhana-95 commented 5 months ago

Using this version of the package-

  zego_uikit_prebuilt_call: ^4.11.6
  zego_uikit_signaling_plugin: ^2.7.0

A few days ago this worked fine but I'm getting this error now. I tried flutter clean, and checked on a new emulator also but did not work. I can not figure out why is this WidgetStateProperty showing.

[ZEGO][PLUGIN] Download native dependency
[ZEGO][PLUGIN] Native version: 3.15.1.38837
[ZEGO][PLUGIN] The specified version SDK already exists!
/C:/Users/ACER/AppData/Local/Pub/Cache/hosted/pub.dev/zego_uikit_prebuilt_call-4.12.0/lib/src/invitation/components/send_calling_invitation_list.dart:374:22: Error: The getter 'WidgetStateProperty' isn't defined for the class '_ZegoSendCallingInvitationListState'.
 - '_ZegoSendCallingInvitationListState' is from 'package:zego_uikit_prebuilt_call/src/invitation/components/send_calling_invitation_list.dart' ('/C:/Users/ACER/AppData/Local/Pub/Cache/hosted/pub.dev/zego_uikit_prebuilt_call-4.12.0/lib/src/invitation/components/send_calling_invitation_list.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'WidgetStateProperty'.
          fillColor: WidgetStateProperty.all(
                     ^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\ACER\Development\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 1419

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\ACER\Development\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 30s
Error: Gradle task assembleDebug failed with exit code 1
yoer commented 5 months ago

'MaterialStateProperty' is deprecated and shouldn't be used. Use WidgetStateProperty instead. Moved to the Widgets layer to make code available outside of Material. This feature was deprecated after v3.19.0-0.3.pre

yoer commented 5 months ago

https://docs.flutter.dev/release/breaking-changes/material-state

yoer commented 5 months ago

please upgrade your flutter version

farhana-95 commented 5 months ago

The issue is resolved after updating the flutter version.