mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[glfw] Implement SystemNavigator.pop (#9365)
* [glfw] Implement SystemNavigator.pop * Exit the program * Add success result
This commit is contained in:
parent
9b130a4bff
commit
e6d3552216
@ -12,6 +12,7 @@ static constexpr char kChannelName[] = "flutter/platform";
|
||||
|
||||
static constexpr char kGetClipboardDataMethod[] = "Clipboard.getData";
|
||||
static constexpr char kSetClipboardDataMethod[] = "Clipboard.setData";
|
||||
static constexpr char kSystemNavigatorPopMethod[] = "SystemNavigator.pop";
|
||||
|
||||
static constexpr char kTextPlainFormat[] = "text/plain";
|
||||
static constexpr char kTextKey[] = "text";
|
||||
@ -73,6 +74,9 @@ void PlatformHandler::HandleMethodCall(
|
||||
}
|
||||
glfwSetClipboardString(window_, itr->value.GetString());
|
||||
result->Success();
|
||||
} else if (method.compare(kSystemNavigatorPopMethod) == 0) {
|
||||
exit(EXIT_SUCCESS);
|
||||
result->Success();
|
||||
} else {
|
||||
result->NotImplemented();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user