2023年9月30日

摘要: 最近研究flutter在Windows和MacOs操作系统上使用多窗口方法,总结一下开发心得。 众所周知,flutter使用skia将像素点,通过opengl,software,metal等方式渲染到一个窗口上,不像原生开发的可以指定控件添加到具体窗口内。 在flutter pub仓库管理中,看了几 阅读全文
posted @ 2023-09-30 19:41 HemJohn 阅读(874) 评论(0) 推荐(1) 编辑

2023年4月20日

摘要: 由于flutter的http请求代理不走系统,所以只能在代码中设置代理ip: class MyHttpOverrides extends HttpOverrides { bool _badCertificateCallback(X509Certificate cert, String host, i 阅读全文
posted @ 2023-04-20 16:11 HemJohn 阅读(105) 评论(0) 推荐(0) 编辑

2023年1月12日

摘要: if(NSApplication.shared.isHidden){ NSApp.activate(ignoringOtherApps: true) NSApp.setActivationPolicy(.regular) } else{ NSApp.hide(nil) NSApp.setActiva 阅读全文
posted @ 2023-01-12 15:15 HemJohn 阅读(72) 评论(0) 推荐(0) 编辑

2023年1月9日

摘要: bool FlutterWindowWin32::OnBitmapSurfaceUpdated(const void* allocation, size_t row_bytes, size_t height) { HWND hwnd = std::get<HWND>(GetRenderTarget( 阅读全文
posted @ 2023-01-09 16:20 HemJohn 阅读(91) 评论(0) 推荐(0) 编辑

2022年8月16日

摘要: D:\CMake\bin\cmake.exe -G "Visual Studio 16 2019" -A Win32 -DUSE_SANDBOX=OFF -DCEF_RUNTIME_LIBRARY_FLAG=/MD 阅读全文
posted @ 2022-08-16 17:38 HemJohn 阅读(106) 评论(0) 推荐(0) 编辑

2021年12月31日

摘要: 需要在build函数里加上 MediaQueryData queryData = MediaQuery.of(context); 监听拉伸窗口消息 阅读全文
posted @ 2021-12-31 13:57 HemJohn 阅读(73) 评论(0) 推荐(0) 编辑

2021年12月19日

摘要: 1.创建一个flutter模块项目: flutter create -t module my_module 2.编译模块代码成aar文件: cd my_module flutter build aar 注意:编译完的shell窗口不要关闭,这里输出日志有后续要写入build.gradle的配置过程 阅读全文
posted @ 2021-12-19 20:33 HemJohn 阅读(537) 评论(0) 推荐(0) 编辑

2021年7月26日

摘要: 第一次用flutter 开发web,遇到不少坑: 1.图片问题:Image.memory来加载图片会报错,估计是html5原生控件没有使用memory创建图片的接口吧。 2.WebAssembly使用有点复杂,c++的socket跟多线程在谷歌浏览器上不能使用的,只能用websocket。 3.使用 阅读全文
posted @ 2021-07-26 19:48 HemJohn 阅读(1159) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> #define Export __attribute__((visibility("default"))) __attribute__((used)) extern "C" { st 阅读全文
posted @ 2021-07-26 18:17 HemJohn 阅读(540) 评论(0) 推荐(0) 编辑

2021年6月3日

摘要: mac: export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cnwindows: PUB_HOSTED_URL https://pub. 阅读全文
posted @ 2021-06-03 21:10 HemJohn 阅读(969) 评论(0) 推荐(0) 编辑

导航