Generates an android.iml file and a package-level library for flutter.jar.
Does not set up an Android SDK in IDEA; this isn't possible with a
template-based approach. But IDEA shows a clear warning, so the
user can fix this by setting the SDK.
(When creating a Flutter project from within IDEA, we can fix this up
afterwards in the plugin.)
Rename State.config to State.widget
Rename State.didUpdateConfig to State.didUpdateWidget
Renamed all State subclasses' local variables named config to something else
Added a PluginRegistry to the new project template. The registry files will be automatically updated at build time to register the native plugins.
Fixes#7814.
This yak shave went as follows:
Fix https://github.com/flutter/flutter/issues/8795 by adding stocks to
the examples README.
Notice the layers entry in that README isn't quite right either.
Update that.
Check the layers/README file is worth pointing at.
Update the layers/README.
Let's run some of the layer tests to see if they still work.
Oops, need to update them to gradle.
Ok let's try running them again.
Oops, sector is broken.
Add a test for sector.
Fix sector. Find you need to add an assert to a const constructor.
Notice we need to turn const asserts on for the analyzer.
Notice the analysis_options files are out of sync with each other and
with the full list of lints.
Turn on the lints that should be on.
Fix the bugs that finds.
Gradle projects are evaluated in lexicographical order, and the plugin
projects are at the same level as the :app project, so if a plugin has
a name that comes before 'app' (like, for example, any name that starts
with a capital letter), the plugin project will be evaluated before
:app.
Since :app applies the Flutter Gradle plugin, which tries to
modify the dependencies of the plugin projects, we have a problem if the
plugin projects have already been evaluated. Adding
evaluationDependsOn(':app') to the plugin projects fixes this.
Updated example projects to the latest (plugin-enabled) Gradle build
files.
Also removed two unused imports in `pluginClass.java.tmpl`.
Plugin projects are created by running `flutter create --plugin <name>`.
An example app is also created in the plugin project, using the normal 'create' template, which has been modified to allow for conditional plugin code.
Modified the android package name to match package naming conventions (all lower-case, and must match the directory name).
Go through all packages brought in by pub, and write the name and path of every one that is a flutter plugin into .flutter-plugins.
In android/settings.gradle and ios/Podfile, read in .flutter-plugins, if that file exists. The Android / iOS code from the plugins is automatically added as dependencies of the native code of the app.
**THIS IS A BREAKING CHANGE.** See below for migration steps for
existing projects.
Previously, Flutter app code was built as a raw dylib on iOS. Dynamic
libraries outside of a framework bundle are not supported on iOS, except
for the system Swift libraries provided by Xcode.
See:
https://developer.apple.com/library/content/technotes/tn2435/_index.html#//apple_ref/doc/uid/DTS40017543-CH1-TROUBLESHOOTING_BUNDLE_ERRORS-EMBEDDED__DYLIB_FILES
* Migrates Xcode build from app.dylib to App.framework
* Migrates flutter create template
* Migrates example projects
Migration steps for existing projects
=====================================
The following steps should be taken from the root of your Flutter
project:
1. Edit `ios/.gitignore`: add `/Flutter/App.framework` on a new line.
2. In the Xcode project navigator, remove `app.dylib` from the Flutter
folder. Delete this file from the `ios/Flutter` directory in your project.
3. Run a build to generate `ios/Flutter/App.framework`. From the command
line, run `flutter build ios`. If you have not configured app signing
in Xcode, an alternative method is to open the simulator, then run
`flutter run -d iP`.
4. In the Xcode project navigator, select the `Runner` project. In the
project settings that are displayed in the main view, ensure that the
`Runner` target is selected. You can verify this by exposing the
sidebar using the [| ] icon in the upper-left corner of the main
view.
5. Select the *General* tab in the project settings. Under the
*Embedded Binaries* section, click '+' to add `App.framework`. In the
sheet that drops down, click the *Add Other...* button. Navigate to
the `ios/Flutter` directory and select `App.framework`. Click *Open*.
In the sheet that drops down, select *Create folder references*, then
click *Finish*.
6. In the project settings, verify that `App.framework` has been added to the
*Embedded Binaries* and *Linked Frameworks and Libraries* lists.
7. In the Xcode project navigator, drag `App.framework` under the
Flutter folder.
8. In the Xcode project navigator, select `Flutter` then from the
*File* menu, select *Add Files to "Runner"...*. Navigate to the
`ios/Flutter` directory, select `AppFrameworkInfo.plist` and click
the *Add* button.
9. From the command line, in your project directory, run
`flutter build clean`, then `flutter run`.
At this point your project should be fully migrated.
* Revert "use color.shadeXxx instead of color[Xxx] (#8932)"
This reverts commit 578ca0a295.
* Revert "add missing const keyword (#8931)"
This reverts commit fac2fac1d6.
* Revert "Make min/max fling velocity and min fling distance ScrollPhysics properties (#8928)"
This reverts commit dac80aac89.
* Revert "Defer to operating system for whichAll (#8921)"
This reverts commit 14933de986.
* Revert "Update gradle wrapper and build-tools version for flutter create. (#8914)"
This reverts commit deb71cc6dc.
* Update gradle wrapper and build-tools version.
Tested manually by "flutter create" with Idea "flutter run" and from android studio "run" android app.
* Update com.android.tools.build to 2.3.0
Changed the default build output directory in the new project template
to build/, instead of android/build/ and android/app/build/.
Updated tools to ask the Gradle scripts what the build directory is,
since this is configurable in the build scripts, and we need to know
where the build output actually is.
Silenced output from 'flutter build aot' when invoked from Gradle, since
the output was confusing in this case.
Fixes#8723Fixes#8656Fixes#8138
* Small update to instructional comments in app template
* Update Flutter Driver comment
Good suggestion to add the link, Seth! I also updated the working to match what that page uses.
* Make new project template gradle-based for Android.
With this change, the 'new project' template uses the same gradle-based build for Android as the hello_services example. This has some implications on build performance, since we're now building a complete Android app instead of just combining a pre-compiled .dex with the Flutter assets.
The very first build is a little over 2x slower, since it needs to download gradle and build the build scripts before getting to the actual code. Subsequent builds with changes to the code are comparable to the old builds. Null builds are faster. Enabling the gradle daemon speeds up subsequent builds by around 5s.
* Move Flutter Gradle plugin to Flutter root.
* Support thinning iOS frameworks to supported architectures
When building against frameworks that are distributed as
multi-architecture fat binaries, we want to strip the frameworks we
distribute down to only the architectures specified in $ARCHS.
This patch adds:
* The ability to specify commands to xcode_backend.sh (if none is
specified, run BuildApp for backward compatibility).
* A 'thin' command that invokes lipo to thin down the distributed as
described above.
* Add framework thinning step to iOS build
Invokes xcode_backend.sh thin on the build application.
* Limit architectures to arm64 in Xcode template
Flutter does not yet support armv7 iOS devices. Limit the $ARCHS build
variable to arm64 until then.
By default, pass status bar taps to the root view controller in
generated Flutter apps. Developers should customise as necesary if they
later create one or more alternate FlutterViewControllers that they'd
like to forward these to.
* Disable 'Show Excluded' by default
* Move .iml file inside .idea dir
* Remove pub and build excludions as they are automatically set by the Dart plugin
* Exclude .idea folder (new users will edit it through the IJ UI, not the file)
* Move .iml files into .idea dir to be consistent with template changes
* Add workspace.xml from new template to existing samples
* Update current examples to match template changes for excluding folders
* Add missing flutter.yaml to make sure there are no analysis errors
* Add back .pub and build excludeFolder tags per https://github.com/flutter/flutter-intellij/issues/630#issuecomment-272887230
* Remove workspace.xml from example per review feedback
* s/sky/flutter/ in Android templates
* update engine.version with a compatible engine version
* replace more SkyActivity references with FlutterActivity
Switch our pubspec.yamls to using SDK sources so that we can have consistent
source types when we depend on these packages from external packages using SDK
sources.
* Remove stray PRODUCT_BUNDLE_IDENTIFIER
This was erroneously added and overrides
the bundle for the gallery causing signing
to fail in my setup.
@chinmaygarde
* Remove PRODUCT_BUNDLE_IDENTIFIER from all Runner pbxproj's
We now use a different approach for ios projects where the developer controls
the Xcode project file. This patch removes the old ".generated" approach in
favor of the new approach.
This patch changes the default `flutter create` command to generate a
HelloServices-style app on iOS. As a consequence, the Atom integration now
fully works with HelloServices.
Anywhere that accepted IconData now accepts either an Icon or an
ImageIcon.
Places that used to take an IconData in an `icon` argument, notably
IconButton and DrawerItem, now take a Widget in that slot. You can wrap
the value that used to be passed in in an Icon constructor to get the
same result.
Icon itself now takes the icon as a positional argument, for brevity.
ThemeData now has an iconTheme as well as a primaryIconTheme, the same
way it has had a textTheme and primaryTextTheme for a while.
IconTheme.of() always returns a value now (though that value itself may
have nulls in it). It defaults to the ThemeData.iconTheme.
IconThemeData.fallback() is a new method that returns an icon theme data
structure with all fields filled in.
IconTheme.merge() is a new constructor that takes a context and creates
a widget that mixes in the new values with the inherited values.
Most places that introduced an IconTheme widget now use IconTheme.merge.
IconThemeData.merge and IconThemeData.copyWith act in a way analogous to
the similarly-named members of TextStyle.
ImageIcon is introduced. It acts like Icon but takes an ImageProvider
instead of an IconData.
Also: Fix the analyzer to actually check the stocks app.
The 'routes' table is a point of confusion with new developers. By
providing a 'home' argument that sets the '/' route, we can delay the
point at which we teach developers about 'routes' until the point where
they want to have a second route.
This gives developers a breadcrumb they can follow to customize the
theme of their app. Previously, some customers were trying to set a
theme by manually configuring the colors of all their widgets.
Fixes#2980
* left -> leading (Removes an LTR bias)
* center -> title (Widget was actually centered)
* right -> actions (Removes an LTR bias, asymmetric with leading)
Fixes#2348
Rather than managing all the Material Design icons manually, we now
manage them using an icon font. The icon font contains glyphs for each
icon in an efficient vector format.
This patch updates the FLX tooling to include the MaterialIcons font and
updates the Icon widget to use the font instead of asset images.
Fixes#2313Fixes#2218Fixes#2009Fixes#994