The Webview Univeral Flutter package for Appeto SDK.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

41 lignes
1.1 KiB

  1. //
  2. // Created by yangbin on 2021/11/15.
  3. //
  4. #ifndef webview_universal_WINDOWS_WEB_VIEW_PLUGIN_H_
  5. #define webview_universal_WINDOWS_WEB_VIEW_PLUGIN_H_
  6. #include <flutter/method_channel.h>
  7. #include <flutter/plugin_registrar_windows.h>
  8. #include <flutter/standard_method_codec.h>
  9. #include "strconv.h"
  10. #include "webview_window.h"
  11. #include <memory>
  12. class WebviewWindowPlugin: public flutter::Plugin {
  13. public:
  14. using MethodChannelPtr = std::shared_ptr<flutter::MethodChannel<flutter::EncodableValue>>;
  15. static void RegisterWithRegistrar(flutter::PluginRegistrarWindows *registrar);
  16. explicit WebviewWindowPlugin(MethodChannelPtr method_channel);
  17. ~WebviewWindowPlugin() override;
  18. private:
  19. // Called when a method is called on this plugin's channel from Dart.
  20. void HandleMethodCall(
  21. const flutter::MethodCall<flutter::EncodableValue> &method_call,
  22. std::unique_ptr<flutter::MethodResult<flutter::EncodableValue>> result);
  23. MethodChannelPtr method_channel_;
  24. std::map<int64_t, std::unique_ptr<WebviewWindow>> windows_;
  25. };
  26. #endif //webview_universal_WINDOWS_WEB_VIEW_PLUGIN_H_