skip to Main Content

/C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_platform_widgets-1.20.0/lib/src/platform_dialog_action.dart:171:14: Error: The method ‘FlatButton’ isn’t defined for the class ‘PlatformDialogAction’.

  • ‘PlatformDialogAction’ is from ‘package:flutter_platform_widgets/src/platform_dialog_action.dart’ (‘/C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_platform_widgets-1.20.0/lib/src/platform_dialog_action.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘FlatButton’.
    return FlatButton(
    ^^^^^^^^^^
    /C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_platform_widgets-1.20.0/lib/src/platform_button.dart:269:14: Error: The method ‘FlatButton’ isn’t defined for the class ‘PlatformButton’.
  • ‘PlatformButton’ is from ‘package:flutter_platform_widgets/src/platform_button.dart’ (‘/C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_platform_widgets-1.20.0/lib/src/platform_button.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘FlatButton’.
    return FlatButton(
    ^^^^^^^^^^
    /C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_platform_widgets-1.20.0/lib/src/platform_button.dart:302:12: Error: The method ‘RaisedButton’ isn’t defined for the class ‘PlatformButton’.
  • ‘PlatformButton’ is from ‘package:flutter_platform_widgets/src/platform_button.dart’ (‘/C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_platform_widgets-1.20.0/lib/src/platform_button.dart’).
    Try correcting the name to the name of an existing method, or defining a method named ‘RaisedButton’.
    return RaisedButton(
    ^^^^^^^^^^^^
    /C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.1.0/lib/controllers/rtm_client_event_handler.dart:76:7: Error: A value of type ‘Null Function(LocalInvitation)’ can’t be assigned to a variable of type ‘dynamic Function(LocalInvitation, String)?’.
  • ‘LocalInvitation’ is from ‘package:agora_rtm/src/utils.dart’ (‘/C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtm-1.5.5/lib/src/utils.dart’).
    (AgoraRtmLocalInvitation invitation) {
    ^
    /C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.1.0/lib/controllers/rtm_client_event_handler.dart:81:7: Error: A value of type ‘void Function(LocalInvitation)’ can’t be assigned to a variable of type ‘void Function(LocalInvitation, String)?’.
  • ‘LocalInvitation’ is from ‘package:agora_rtm/src/utils.dart’ (‘/C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtm-1.5.5/lib/src/utils.dart’).
    (AgoraRtmLocalInvitation invitation) {
    ^
    /C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/agora_uikit-1.1.0/lib/controllers/rtc_event_handlers.dart:18:32: Error: No named parameter with the name ‘onApiCallExecuted’.
    return RtcEngineEventHandler(onApiCallExecuted: (err, api, result) {
    ^^^^^^^^^^^^^^^^^
    /C:/Users/Dell/AppData/Local/Pub/Cache/hosted/pub.dev/agora_rtc_engine-6.2.0/lib/src/agora_rtc_engine.dart:1636:9: Context: Found this candidate, but the arguments don’t match.
    const RtcEngineEventHandler({
    ^^^^^^^^^^^^^^^^^^^^^
    Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

  • Where:
    Script ‘D:Flutterflutterpackagesflutter_toolsgradleflutter.gradle’ line: 1151

  • What went wrong:
    Execution failed for task ‘:app:compileFlutterBuildDebug’.

Process ‘command ‘D:Flutterflutterbinflutter.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.

BUILD FAILED in 25s
Exception: Gradle task assembleDebug failed with exit code 1

can’t get rid of these errors. Someone please help me with this.

2

Answers


  1. it seems the plugin using the FlatButton,

    try updating the plugin to the latest

    agora_uikit: ^1.3.3
    
    
    flutter_platform_widgets: ^3.3.5
    
    OR
    
    flutter_platform_widgets: ^4.0.0-beta.1
    
    Login or Signup to reply.
    • These errors are coming from flutter_platform_widgets.

    • The ultimate solution will be updating this plugin to its latest version

    Happy Coding 🎉

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search