Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Functions
flutter::internal Namespace Reference

Classes

class  ReplyManager
 

Functions

void ResizeChannel (BinaryMessenger *messenger, std::string name, int new_size)
 
void SetChannelWarnsOnOverflow (BinaryMessenger *messenger, std::string name, bool warns)
 

Function Documentation

◆ ResizeChannel()

void flutter::internal::ResizeChannel ( BinaryMessenger messenger,
std::string  name,
int  new_size 
)

Definition at line 181 of file core_implementations.cc.

181 {
182 auto control_channel = std::make_unique<MethodChannel<EncodableValue>>(
183 messenger, kControlChannelName, &StandardMethodCodec::GetInstance());
184
185 // The deserialization logic handles only 32 bits values, see
186 // https://github.com/flutter/engine/blob/93e8901490e78c7ba7e319cce4470d9c6478c6dc/lib/ui/channel_buffers.dart#L495.
187 control_channel->InvokeMethod(
188 kResizeMethod, std::make_unique<EncodableValue>(EncodableList{
190 EncodableValue(static_cast<int32_t>(new_size)),
191 }));
192}
static NSString *const kResizeMethod
static constexpr char kControlChannelName[]
const char * name
Definition fuchsia.cc:50
std::vector< EncodableValue > EncodableList

◆ SetChannelWarnsOnOverflow()

void flutter::internal::SetChannelWarnsOnOverflow ( BinaryMessenger messenger,
std::string  name,
bool  warns 
)

Definition at line 194 of file core_implementations.cc.

196 {
197 auto control_channel = std::make_unique<MethodChannel<EncodableValue>>(
198 messenger, kControlChannelName, &StandardMethodCodec::GetInstance());
199
200 control_channel->InvokeMethod(kOverflowMethod,
201 std::make_unique<EncodableValue>(EncodableList{
203 EncodableValue(!warns),
204 }));
205}
static NSString *const kOverflowMethod