0

I am trying to Navigate to a specific route from Native flutter Pugin. I was able to do that in swift for iOS:

            let extVC = FlutterViewController()
            extVC.setInitialRoute(routerName)
            window?.rootViewController = extVC

What is the equivelent to setInitialRoute in flutter native(c++) plugin for Windows?

bool FlutterWindow::OnCreate() {
  if (!Win32Window::OnCreate()) {
    return false;
  }

  RECT frame = GetClientArea();

  // The size here must match the window dimensions to avoid unnecessary surface
  // creation / destruction in the startup path.
  flutter_controller_ = std::make_unique<flutter::FlutterViewController>(
      frame.right - frame.left, frame.bottom - frame.top, project_);
  // Ensure that basic setup of the controller was successful.
  if (!flutter_controller_->engine() || !flutter_controller_->view()) {
    return false;
  }
  run_loop_->RegisterFlutterInstance(flutter_controller_->engine());
  SetChildContent(flutter_controller_->view()->GetNativeWindow());
  return true;
Ebram
  • 1,042
  • 1
  • 13
  • 26

1 Answers1

0

There is currently no equivalent in the Windows embedding API. You should file an issue requesting the functionality you need.

smorgan
  • 20,228
  • 3
  • 47
  • 55
  • should it be on flutter repo or flutter-desktop-embedding https://github.com/google/flutter-desktop-embedding? – Ebram Aug 20 '21 at 22:07