Skip to content

Commit

Permalink
Update README-ZH.md (#292)
Browse files Browse the repository at this point in the history
flutter 3.7 windows 启动隐藏文档更新
  • Loading branch information
youxiachai authored Feb 4, 2023
1 parent fbfa750 commit 095963b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,18 @@ bool Win32Window::CreateAndShow(const std::wstring& title,
nullptr, nullptr, GetModuleHandle(nullptr), this);
```

使用 flutter 3.7 创建的Windows项目
更改 `windows/runner/flutter_window.cpp` 如下:

```diff
bool FlutterWindow::OnCreate() {
...
flutter_controller_->engine()->SetNextFrameCallback([&]() {
- this->Show();
+ "" //删除 this->Show()
});
```

确保在 `onWindowFocus` 事件中调用一次 `setState`

```dart
Expand Down

0 comments on commit 095963b

Please sign in to comment.