text
stringlengths
1
372
is designed around the c language and ABI.
fortunately, dart provides dart:ffi,
which is designed to enable dart programs
to efficiently call into c libraries.
FFI 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.
many apps will benefit from using a package that
wraps the underlying library
calls in a more convenient, idiomatic dart API.
canonical has built a series of packages
with a focus on enabling dart and flutter on linux,
including support for desktop notifications,
dbus, network management, and bluetooth.
more generally, many other packages support linux,
including common packages such as url_launcher,
shared_preferences, file_selector, and
path_provider.
<topic_end>
<topic_start>
preparing linux apps for distribution
the executable binary can be found in your project under
build/linux/<build mode>/bundle/. alongside your
executable binary in the bundle directory there are
two directories:
in addition to these files, your application also
relies on various operating system libraries that
it’s been compiled against.
you can see the full list by running ldd
against your application. for example,
assuming you have a flutter desktop application
called linux_desktop_test, you could inspect
the system libraries it depends upon as follows:
to wrap up this application for distribution
you need to include everything in the bundle directory,
and make sure the linux system you are installing
it on has all of the system libraries required.
this could be as simple as:
for information on publishing a linux application
to the snap store, see
build and release a linux application to the snap store.
<topic_end>
<topic_start>
macOS
<topic_end>
<topic_start>
topics
<topic_end>
<topic_start>
add macOS devtools for flutter
to choose the guide to add macOS devtools to your flutter configuration,
click the getting started path you followed.
<topic_end>
<topic_start>
building macOS apps with flutter
this page discusses considerations unique to building
macOS apps with flutter, including shell integration
and distribution of macOS apps through the apple store.
<topic_end>
<topic_start>
integrating with macOS look and feel
while you can use any visual style or theme you choose
to build a macOS app, you might want to adapt your app
to more fully align with the macOS look and feel.
flutter includes the cupertino widget set,
which provides a set of widgets for
the current iOS design language.
many of these widgets, including sliders,
switches and segmented controls,
are also appropriate for use on macOS.
alternatively, you might find the macos_ui
package a good fit for your needs.
this package provides widgets and themes that
implement the macOS design language,
including a MacosWindow frame and scaffold,
toolbars, pulldown and
pop-up buttons, and modal dialogs.
<topic_end>
<topic_start>
building macOS apps
to distribute your macOS application, you can either
distribute it through the macOS app store,
or you can distribute the .app itself,
perhaps from your own website.
as of macOS 10.14.5, you need to notarize
your macOS application before distributing
it outside of the macOS app store.
the first step in both of the above processes
involves working with your application inside of xcode.
to be able to compile your application from inside of
xcode you first need to build the application for release
using the flutter build command, then open the
flutter macOS runner application.
once inside of xcode, follow either apple’s
documentation on notarizing macOS applications, or
on distributing an application through the app store.
you should also read through the