flutterflutter-desktop

How can I run a Flutter Linux desktop application in full screen?


I need to run a Flutter Linux application in full screen, how can this be achieved? I've looked at the WindowUtils plugin but it only supports desktop embedding.


Solution

  • On Linux, Flutter runs above GTK, so you may edit the file linux/my_application.cc and after the line:

    gtk_window_set_default_size(window, 1280, 720);
    

    Insert the following line:

    gtk_window_fullscreen(GTK_WINDOW(window));