Skip to content

TDLib Flutter issue with TdClient #3415

@mabexx

Description

@mabexx

when I run it says ( in short TdClient is undefined and idk how to fix it)
ERROR: lib/chat_page.dart:38:25: Error: The method 'send' isn't defined for the class 'TdLibService'.
ERROR: - 'TdLibService' is from 'package:project_x/tdlib_service.dart' ('lib/tdlib_service.dart').
ERROR: Try correcting the name to the name of an existing method, or defining a method named 'send'.
ERROR: widget.tdlibService.send({
ERROR: ^^^^
ERROR: lib/tdlib_service.dart:7:14: Error: Type 'TdClient' not found.
ERROR: late final TdClient _client;
ERROR: ^^^^^^^^
ERROR: lib/tdlib_service.dart:7:14: Error: 'TdClient' isn't a type.
ERROR: late final TdClient _client;
ERROR: ^^^^^^^^
ERROR: lib/tdlib_service.dart:15:15: Error: The method 'TdClient' isn't defined for the class 'TdLibService'.
ERROR: - 'TdLibService' is from 'package:project_x/tdlib_service.dart' ('lib/tdlib_service.dart').
ERROR: Try correcting the name to the name of an existing method, or defining a method named 'TdClient'.
ERROR: _client = TdClient();
ERROR: ^^^^^^^^
ERROR: Target kernel_snapshot_program failed: Exception
I tried lots of things but I wanna hear yours so thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions