text
stringlengths 1
474
|
|---|
of certificates for applications
|
distributed through its store.Distributing your application by self hosting it on a
|
website requires a certificate signed by a
|
Certificate Authority known to Windows.Use the following instructions to generate a
|
self-signed .pfx certificate.<topic_end>
|
<topic_start>
|
Building your own zip file for Windows
|
The Flutter executable, .exe, can be found in your
|
project under build\windows\runner\<build mode>\.
|
In addition to that executable, you need the following:Place the DLL files in the directory next to the executable
|
and the other DLLs, and bundle them together in a zip file.
|
The resulting structure looks something like this:At this point if desired it would be relatively simple to
|
add this folder to a Windows installer such as Inno Setup, WiX, etc.
|
<topic_end>
|
<topic_start>Using packages
|
Flutter supports using shared packages contributed by other developers
|
to the Flutter and Dart ecosystems. This allows quickly building
|
an app without having to develop everything from scratch.What is the difference between a package
|
and a plugin? A plugin is a type of
|
package—the full designation is plugin package,
|
which is generally shortened to plugin.Existing packages enable many use cases—for example,
|
making network requests (http),
|
navigation/route handling (go_router),
|
integration with device APIs
|
(url_launcher and battery_plus),
|
and using third-party platform SDKs like Firebase
|
(FlutterFire).To write a new package, see developing packages.
|
To add assets, images, or fonts,
|
whether stored in files or packages,
|
see Adding assets and images.<topic_end>
|
<topic_start>
|
Using packages
|
The following section describes how to use
|
existing published packages.<topic_end>
|
<topic_start>
|
Searching for packages
|
Packages are published to pub.dev.The Flutter landing page on pub.dev displays
|
top packages that are compatible with Flutter
|
(those that declare dependencies generally compatible with Flutter),
|
and supports searching among all published packages.The Flutter Favorites page on pub.dev lists
|
the plugins and packages that have been identified as
|
packages you should first consider using when writing
|
your app. For more information on what it means to
|
be a Flutter Favorite, see the
|
Flutter Favorites program.You can also browse the packages on pub.dev by filtering
|
on Android, iOS, web,
|
Linux, Windows, macOS,
|
or any combination thereof.<topic_end>
|
<topic_start>
|
Adding a package dependency to an app
|
To add the package, css_colors, to an app:<topic_end>
|
<topic_start>
|
Adding a package dependency to an app using flutter pub add
|
To add the package, css_colors, to an app:<topic_end>
|
<topic_start>
|
Removing a package dependency to an app using flutter pub remove
|
To remove the package, css_colors, to an app:The Installing tab,
|
available on any package page on pub.dev,
|
is a handy reference for these steps.For a complete example,
|
see the css_colors example below.<topic_end>
|
<topic_start>
|
Conflict resolution
|
Suppose you want to use some_package and
|
another_package in an app,
|
and both of these depend on url_launcher,
|
but in different versions.
|
That causes a potential conflict.
|
The best way to avoid this is for package authors to use
|
version ranges rather than specific versions when
|
specifying dependencies.If some_package declares the dependencies above
|
and another_package declares a compatible
|
url_launcher dependency like '5.4.6' or
|
^5.5.0, pub resolves the issue automatically.
|
Platform-specific dependencies on
|
Gradle modules and/or CocoaPods
|
are solved in a similar way.Even if some_package and another_package
|
declare incompatible versions for url_launcher,
|
they might actually use url_launcher in
|
compatible ways. In this situation,
|
the conflict can be resolved by adding
|
a dependency override declaration to the app’s
|
pubspec.yaml file, forcing the use of a particular version.For example, to force the use of url_launcher version 5.4.0,
|
make the following changes to the app’s pubspec.yaml file:If the conflicting dependency is not itself a package,
|
but an Android-specific library like guava,
|
the dependency override declaration must be added to
|
Gradle build logic instead.To force the use of guava version 28.0, make the following
|
changes to the app’s android/build.gradle file:CocoaPods doesn’t currently offer dependency
|
override functionality.<topic_end>
|
<topic_start>
|
Developing new packages
|
If no package exists for your specific use case,
|
you can write a custom package.<topic_end>
|
<topic_start>
|
Managing package dependencies and versions
|
To minimize the risk of version collisions,
|
specify a version range in the pubspec.yaml file.<topic_end>
|
<topic_start>
|
Package versions
|
All packages have a version number, specified in the
|
package’s pubspec.yaml file. The current version of a package
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.