text stringlengths 1 372 |
|---|
on the same screen all at once, consider using |
the HTML renderer instead of CanvasKit. |
<topic_end> |
<topic_start> |
windows |
<topic_end> |
<topic_start> |
topics |
<topic_end> |
<topic_start> |
add windows devtools for flutter |
to choose the guide to add visual studio to your flutter configuration, |
click the getting started path you followed. |
<topic_end> |
<topic_start> |
building windows apps with flutter |
this page discusses considerations unique to building |
windows apps with flutter, including shell integration |
and distribution of windows apps through the |
microsoft store on windows. |
<topic_end> |
<topic_start> |
integrating with windows |
the windows programming interface combines traditional win32 APIs, |
COM interfaces and more modern windows runtime libraries. |
as all these provide a c-based ABI, |
you can call into the services provided by the operating |
system using dart’s foreign function interface library (dart:ffi). |
FFI is designed to enable dart programs to efficiently call into |
c libraries. it provides flutter apps with the ability to allocate |
native memory with malloc or calloc, support for pointers, |
structs and callbacks, and ABI types like long and size_t. |
for more information about calling c libraries from flutter, |
see c interop using dart:ffi. |
in practice, while it is relatively straightforward to call |
basic win32 APIs from dart in this way, |
it is easier to use a wrapper library that abstracts the |
intricacies of the COM programming model. |
the win32 package provides a library |
for accessing thousands of common windows APIs, |
using metadata provided by microsoft for consistency and correctness. |
the package also includes examples of |
a variety of common use cases, |
such as WMI, disk management, shell integration, |
and system dialogs. |
a number of other packages build on this foundation, |
providing idiomatic dart access for the windows registry, |
gamepad support, biometric storage, |
taskbar integration, and serial port access, to name a few. |
more generally, many other packages support windows, |
including common packages such as url_launcher, shared_preferences, file_selector, and path_provider. |
<topic_end> |
<topic_start> |
supporting windows UI guidelines |
while you can use any visual style or theme you choose, |
including material, some app authors might wish to build |
an app that matches the conventions of microsoft’s |
fluent design system. the fluent_ui package, |
a flutter favorite, provides support for visuals |
and common controls that are commonly found in |
modern windows apps, including navigation views, |
content dialogs, flyouts, date |
pickers, and tree view widgets. |
in addition, microsoft offers fluentui_system_icons, |
a package that provides easy access to thousands of |
fluent icons for use in your flutter app. |
lastly, the bitsdojo_window package provides support |
for “owner draw” title bars, allowing you to replace |
the standard windows title bar with a custom one |
that matches the rest of your app. |
<topic_end> |
<topic_start> |
customizing the windows host application |
when you create a windows app, flutter generates a |
small c++ application that hosts flutter. |
this “runner app” is responsible for creating and sizing a |
traditional win32 window, initializing the flutter |
engine and any native plugins, |
and running the windows message loop |
(passing relevant messages on to flutter for further processing). |
you can, of course, make changes to this code to suit your needs, |
including modifying the app name and icon, |
and setting the window’s initial size and location. |
the relevant code is in main.cpp, |
where you will find code similar to the following: |
replace myapp with the title you would like displayed in the |
windows caption bar, as well as optionally adjusting the |
dimensions for size and the window coordinates. |
to change the windows application icon, replace the |
app_icon.ico file in the windows\runner\resources |
directory with an icon of your preference. |
the generated windows executable filename can be changed |
by editing the BINARY_NAME variable in windows/CMakeLists.txt: |
when you run flutter build windows, |
the executable file generated in the |
build\windows\runner\Release directory |
will match the newly given name. |
finally, further properties for the app executable |
itself can be found in the runner.rc file in the |
windows\runner directory. here you can change the |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.