Flutter Engine
The Flutter Engine
fl_method_call_private.h File Reference
#include "flutter/shell/platform/linux/public/flutter_linux/fl_method_call.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_method_channel.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_value.h"

Go to the source code of this file.

Functions

: a method name.

fl_method_call_new:

@args: arguments provided to a method. @channel: channel call received on. @response_handle: handle to respond with.

Creates a method call.

Returns: a new #FlMethodCall.

FlMethodCall * fl_method_call_new (const gchar *name, FlValue *args, FlMethodChannel *channel, FlBinaryMessengerResponseHandle *response_handle)
 

Function Documentation

◆ fl_method_call_new()

FlMethodCall * fl_method_call_new ( const gchar *  name,
FlValue args,
FlMethodChannel *  channel,
FlBinaryMessengerResponseHandle *  response_handle 
)

Definition at line 44 of file fl_method_call.cc.

48 {
49 g_return_val_if_fail(name != nullptr, nullptr);
50 g_return_val_if_fail(args != nullptr, nullptr);
51 g_return_val_if_fail(FL_IS_METHOD_CHANNEL(channel), nullptr);
52 g_return_val_if_fail(FL_IS_BINARY_MESSENGER_RESPONSE_HANDLE(response_handle),
53 nullptr);
54
55 FlMethodCall* self =
56 FL_METHOD_CALL(g_object_new(fl_method_call_get_type(), nullptr));
57
58 self->name = g_strdup(name);
59 self->args = fl_value_ref(args);
60 self->channel = FL_METHOD_CHANNEL(g_object_ref(channel));
61 self->response_handle =
62 FL_BINARY_MESSENGER_RESPONSE_HANDLE(g_object_ref(response_handle));
63
64 return self;
65}
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
G_MODULE_EXPORT FlValue * fl_value_ref(FlValue *self)
Definition: fl_value.cc:394
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32