| Flutter Linux Embedder |

Functions
fl_view.h File Reference
`#include <gmodule.h>`
`#include <gtk/gtk.h>`
`#include "fl_dart_project.h"`
`#include "fl_engine.h"`

Go to the source code of this file.

## Functions
G_BEGIN_DECLS G_MODULE_EXPORT FlView * | fl_view_new (FlDartProject *project)
FlEngine * | fl_view_get_engine (FlView *view)

## Function Documentation

## ◆ fl_view_get_engine()

FlEngine* fl_view_get_engine | ( | FlView * | view | ) |

fl_view_get_engine: @view: an #FlView.

Gets the engine being rendered in the view.

Returns: an #FlEngine.

Definition at line 800 of file fl_view.cc.

800 {
801 g_return_val_if_fail(FL_IS_VIEW(self), nullptr);
802 return self->engine;
803 }

Referenced by fl_renderer_unblock_main_thread(), fl_renderer_wait_for_frame(), and get_engine().

## ◆ fl_view_new()

G_BEGIN_DECLS G_MODULE_EXPORT FlView* fl_view_new | ( | FlDartProject * | project | ) |

FlView:

#FlView is a GTK widget that is capable of displaying a Flutter application.

The following example shows how to set up a view in a GTK application: |[ FlDartProject *project = fl_dart_project_new (); FlView *view = fl_view_new (project); gtk_widget_show (GTK_WIDGET (view)); gtk_container_add (GTK_CONTAINER (parent), view);

FlBinaryMessenger *messenger = fl_engine_get_binary_messenger (fl_view_get_engine (view)); setup_channels_or_plugins (messenger); ]| fl_view_new: @project: The project to show.

Creates a widget to show Flutter application.

Returns: a new #FlView.

Definition at line 795 of file fl_view.cc.

795 {
796 return static_cast<FlView*>(
797 g_object_new(fl_view_get_type(), "flutter-project", project, nullptr));
798 }

Referenced by TEST().