[wiki migration] Leftover wiki pages and links (#148989)
This is waiting on - https://github.com/flutter/flutter/pull/148777 - https://github.com/flutter/flutter/pull/148790 After this PR lands, there will likely be 1-2 more clean up PRs, after which the migration will be done! --- This moves the remaining wiki pages as planned in [flutter.dev/go/migrate-flutter-wiki-spreadsheet](https://docs.google.com/spreadsheets/d/1x65189ZBdNiLRygpUYoU08pwvXD4M-Z157c6pm8deGI/edit?usp=sharing) It also adds the team labels to the label bot for future PRs. Changes to the content were only updating cross links, or links to refer to the main branch rather than master. Remaining links to the wiki will be updated once all other pages have finished moving, they still work in the meantime. Part of https://github.com/flutter/flutter/issues/145009
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
_**Everything in this doc and linked from this doc is experimental. These details WILL change. Do not use these instructions or APIs in production code because we will break you.**_
|
||||
|
||||
# Add Flutter as a Fragment in a ViewPager
|
||||
|
||||
Tabbed navigation often expects the presence of a `ViewPager`, such that the user can swipe left/right to navigate between tabbed pages. This guide shows you how to integrate Flutter as one or more of the pages in your `ViewPager`.
|
||||
|
||||
Start by implementing standard tabbed navigation in Android with a `ViewPager`. Consider following [this guide](https://developer.android.com/training/implementing-navigation/lateral).
|
||||
|
||||
Next, alter your `FragmentPagerAdapter` to return a `FlutterFragment` for the desired page(s).
|
||||
|
||||
```java
|
||||
/**
|
||||
* A {@link FragmentPagerAdapter} that returns a fragment corresponding to
|
||||
* one of the sections/tabs/pages.
|
||||
*/
|
||||
public class SectionsPagerAdapter extends FragmentPagerAdapter {
|
||||
|
||||
public SectionsPagerAdapter(FragmentManager fm) {
|
||||
super(fm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
if (position == FLUTTER_PAGE_INDEX) {
|
||||
// In this case we construct a FlutterFragment that will run
|
||||
// our main() method in Dart and start with an initial route of "/".
|
||||
return new FlutterFragment.createDefault();
|
||||
} else {
|
||||
// return some other page's Fragment
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
// You need to define PAGE_COUNT
|
||||
return PAGE_COUNT;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You should now have a Flutter UI as one or more pages within your tabbed navigation.
|
||||
|
||||
You may notice a delay between creation of your `FlutterFragment` and the display of your Flutter UI. This delay is caused by the warm-up time for the `FlutterEngine`. This warm-up issue a standard concern that applies to all uses of Flutter, including `FlutterActivity`. The way to minimize this visual delay is to use pre-warmed `FlutterEngine`s. Please see [the page about pre-warming FlutterEngines](Experimental-Reuse-FlutterEngine-across-screens.md).
|
||||
67
docs/wiki_archive/Experimental-Add-Flutter-View.md
Normal file
67
docs/wiki_archive/Experimental-Add-Flutter-View.md
Normal file
@@ -0,0 +1,67 @@
|
||||
_**Everything in this doc and linked from this doc is experimental. These details WILL change. Do not use these instructions or APIs in production code because we will break you.**_
|
||||
|
||||
# Add a Flutter View
|
||||
|
||||
Flutter can be added to an Android app as a single `View` in an `Activity`'s `View` hierarchy.
|
||||
|
||||
Before adding Flutter as a single `View`, you should consider if it is possible to add Flutter as a `Fragment` to reduce your development burden.
|
||||
|
||||
* [How to use a `FlutterFragment`](Experimental-Add-Flutter-Fragment-ViewPager.md)
|
||||
|
||||
If you really need to add Flutter as a single `View` then do the following.
|
||||
|
||||
## How to use FlutterView
|
||||
|
||||
### Create and start a FlutterEngine
|
||||
|
||||
Create and start a `FlutterEngine` by following the appropriate instructions. See the [FlutterEngine page](Experimental-Reuse-FlutterEngine-across-screens.md)
|
||||
|
||||
### Create a FlutterView and add to layout
|
||||
|
||||
```java
|
||||
// Instantiate a new FlutterView.
|
||||
FlutterView flutterView = new FlutterView(this);
|
||||
|
||||
// Add your FlutterView wherever you'd like. In this case we add
|
||||
// the FlutterView to a FrameLayout.
|
||||
FrameLayout frameLayout = findViewById(R.id.framelayout);
|
||||
frameLayout.addView(flutterView);
|
||||
```
|
||||
|
||||
Your `FlutterView` will not render anything at this point because it is not backed by any particular Flutter app.
|
||||
|
||||
### Attach your FlutterView to your FlutterEngine
|
||||
|
||||
```java
|
||||
flutterView.attachToFlutterEngine(flutterEngine);
|
||||
```
|
||||
|
||||
At this point you should see your Flutter UI rendering to your `FlutterView`, and touch interaction should work.
|
||||
|
||||
### Create and configure platform plugin
|
||||
|
||||
TODO(mattcarroll): update this info about the platform plugin
|
||||
|
||||
Fundamental communication between the Android platform and your Flutter app takes place over a `MethodChannel` with the name `"flutter/platform"`. For example, Android's `onPostResume()` call must be forwarded over the `flutterPlatformChannel` with the message `"AppLifecycleState.resumed"`.
|
||||
|
||||
```java
|
||||
platformPlugin = new PlatformPlugin(activity);
|
||||
MethodChannel flutterPlatformChannel = new MethodChannel(
|
||||
flutterEngine.getDartExecutor(),
|
||||
"flutter/platform",
|
||||
JSONMethodCodec.INSTANCE
|
||||
);
|
||||
flutterPlatformChannel.setMethodCallHandler(platformPlugin);
|
||||
```
|
||||
|
||||
### Add accessibility support
|
||||
|
||||
TODO(mattcarroll)
|
||||
|
||||
### Add support for plugins
|
||||
|
||||
TODO(mattcarroll)
|
||||
|
||||
### Handling orientation change
|
||||
|
||||
TODO(mattcarroll)
|
||||
@@ -0,0 +1,119 @@
|
||||
_**Everything in this doc and linked from this doc is experimental. These details WILL change. Do not use these instructions or APIs in production code because we will break you.**_
|
||||
|
||||
# Launch Flutter with non-main entrypoint
|
||||
|
||||
Typically, a Flutter app begins execution at the Dart method called `main()`, however this is not required. Developers can specify a different Dart entrypoint:
|
||||
|
||||
## FlutterActivity
|
||||
|
||||
Two options are available to specify a non-standard Dart entrypoint for a `FlutterActivity`.
|
||||
|
||||
### Option 1: AndroidManifest.xml meta-data
|
||||
|
||||
Specify your desired Dart entrypoint as `meta-data` in your `AndroidManifest.xml`:
|
||||
|
||||
```xml
|
||||
<application ...>
|
||||
<activity
|
||||
android:name="io.flutter.embedding.android.FlutterActivity"
|
||||
...
|
||||
>
|
||||
<meta-data
|
||||
android:name="io.flutter.Entrypoint"
|
||||
android:value="myMainDartMethod"
|
||||
/>
|
||||
</activity>
|
||||
</application>
|
||||
```
|
||||
|
||||
Option 2: Subclass `FlutterActivity` and override a method
|
||||
|
||||
Override the `getDartEntrypointFunctionName()` method:
|
||||
|
||||
```java
|
||||
public class MyFlutterActivity extends FlutterActivity {
|
||||
@Override
|
||||
@NonNull
|
||||
public String getDartEntrypointFunctionName() {
|
||||
return "myMainDartMethod";
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## FlutterFragment
|
||||
|
||||
Two options are available to specify a non-standard Dart entrypoint for a `FlutterFragment`.
|
||||
|
||||
### Option 1: Use FlutterFragmentBuilder
|
||||
|
||||
```java
|
||||
// Example for a FlutterFragment that creates its own FlutterEngine.
|
||||
//
|
||||
// Note: a Dart entrypoint cannot be set when using a cached engine because the
|
||||
// cached engine has already started executing Dart.
|
||||
FlutterFragment flutterFragment = new FlutterFragment
|
||||
.withNewEngine()
|
||||
.dartEntrypoint("myMainDartMethod")
|
||||
.build();
|
||||
```
|
||||
|
||||
### Option 2: Subclass FlutterFragment
|
||||
|
||||
```java
|
||||
public class MyFlutterFragment extends FlutterFragment {
|
||||
@Override
|
||||
@NonNull
|
||||
public String getDartEntrypointFunctionName() {
|
||||
return "myMainDartMethod";
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## FlutterEngine
|
||||
|
||||
When manually initializing a `FlutterEngine`, you take on the responsibility of
|
||||
invoking the desired Dart entrypoint, even if you want the standard `main()` method.
|
||||
The following examples illustrate how to execute a Dart entrypoint with a
|
||||
`FlutterEngine`.
|
||||
|
||||
Example using standard entrypoint:
|
||||
|
||||
```java
|
||||
// Instantiate a new FlutterEngine.
|
||||
FlutterEngine flutterEngine = new FlutterEngine(context);
|
||||
|
||||
// Start executing Dart using a default entrypoint, which resolves to "main()".
|
||||
flutterEngine
|
||||
.getDartExecutor()
|
||||
.executeDartEntrypoint(
|
||||
DartEntrypoint.createDefault();
|
||||
);
|
||||
```
|
||||
|
||||
Example using custom entrypoint:
|
||||
|
||||
```java
|
||||
// Instantiate a new FlutterEngine.
|
||||
FlutterEngine flutterEngine = new FlutterEngine(context);
|
||||
|
||||
// Start executing Dart using a custom entrypoint.
|
||||
flutterEngine
|
||||
.getDartExecutor()
|
||||
.executeDartEntrypoint(
|
||||
new DartEntrypoint(
|
||||
FlutterMain.findAppBundlePath(),
|
||||
"myMainDartMethod"
|
||||
)
|
||||
);
|
||||
```
|
||||
|
||||
# Avoid Tree Shaking in Release
|
||||
|
||||
When you build in release mode, your Dart code is tree-shaken. This means that the compiler removes any Dart code that it thinks you're not using. This includes your special entrypoints. To avoid crashing in release mode as a result of tree-shaking, be sure to place the following `@pragma` above each of your custom entrypoints.
|
||||
|
||||
```dart
|
||||
@pragma('vm:entry-point')
|
||||
void myMainDartMethod() {
|
||||
// implementation
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,63 @@
|
||||
_**Everything in this doc and linked from this doc is experimental. These details WILL change. Do not use these instructions or APIs in production code because we will break you.**_
|
||||
|
||||
# Re-use a FlutterEngine across screens
|
||||
|
||||
A `FlutterEngine` is responsible for executing Dart code, rendering a Flutter UI to a `FlutterView`, and connecting plugins to the core Flutter system. Each instance of `FlutterEngine` comes with a non-trivial "warm-up" time, which sets up a group of dedicated threads and other resources.
|
||||
|
||||
Due to the warm-up time of a `FlutterEngine` instance, developers may choose to cache one or more instances of `FlutterEngine`s and re-use those instances across different `Activity`s and/or `Fragment`s in their Android app. This document explains how to cache and re-use `FlutterEngine`s, as well as handle nuances when re-using those `FlutterEngine`s.
|
||||
|
||||
## Ensure Flutter is initialized
|
||||
|
||||
Flutter must be initialized before instantiating a single `FlutterEngine` instance. To ensure that Flutter is initialized, invoke the following methods before instantiating a `FlutterEngine`.
|
||||
|
||||
```java
|
||||
FlutterMain.startInitialization(...);
|
||||
FlutterMain.ensureInitializationComplete(...);
|
||||
```
|
||||
|
||||
## Initializing FlutterEngines
|
||||
|
||||
A `FlutterEngine` must go through 2 steps to be fully initialized. First, an instance is instantiated. Second, the `FlutterEngine` is instructed to execute a Dart entrypoint, e.g., `main()`.
|
||||
|
||||
```java
|
||||
// Instantiate a FlutterEngine.
|
||||
FlutterEngine engine = new FlutterEngine(appContext);
|
||||
|
||||
// Define a DartEntrypoint
|
||||
DartExecutor.DartEntrypoint entrypoint = new DartExecutor.createDefault();
|
||||
|
||||
// Execute the DartEntrypoint within the FlutterEngine.
|
||||
engine.getDartExecutor().executeDartEntrypoint(entrypoint);
|
||||
```
|
||||
|
||||
To cache one or more `FlutterEngine`s, store the initialized `FlutterEngine`s in a central place that you can access from your desired `Activity`s and `Fragment`s. You could choose to store these `FlutterEngine`s in your `Application` subclass, or you could store them in a statically accessible location of your choice. This choice is up to you, and should consider your specific application architecture and development practices.
|
||||
|
||||
## Dart entrypoint restrictions
|
||||
|
||||
A `FlutterEngine` can only execute a Dart entrypoint one time. Once a `FlutterEngine` has started executing Dart code, it will continue to execute that Dart code until the `FlutterEngine` is disposed. To re-use a `FlutterEngine` that needs to display different experiences at different times you will need to find an approach that accomplishes your goals without restarting Dart execution. Below are a couple options.
|
||||
|
||||
### Using a Navigator with routes
|
||||
|
||||
The `Navigator` widget in Flutter already has the ability to switch experiences at runtime. We call these different experiences `routes`, and your app is probably already using them. Typically, `routes` are controlled with Dart code, but the Android embedding also has a navigation system channel that allows you to `pushRoute(...)` and `popRoute(...)`. The `NavigationChannel` can be retrieved from a `FlutterEngine` instance.
|
||||
|
||||
```java
|
||||
myFlutterEngine.getNavigationChannel().pushRoute("myPage");
|
||||
```
|
||||
|
||||
You'll need to ensure that pushing a route at the desired time has the desired effect in your app. This approach of pushing routes may not work for all apps.
|
||||
|
||||
### Using method channels and a custom widget
|
||||
|
||||
Custom method channels offer a mechanism to implement your own solution for jumping between experiences. Method channels allow you to send any message you would like to your Flutter app, and then take whatever action you'd like.
|
||||
|
||||
Start by [setting up a method channel](https://flutter.dev/docs/development/platform-integration/platform-channels) with the navigation messages that you're interested in sending.
|
||||
|
||||
Once your method channel is setup, respond to your messages on the Flutter/Dart side by switching out your top-level widget, or by switching out any other widget in your hierarchy that makes sense for your use-case.
|
||||
|
||||
TODO(mattcarroll): add a code example here.
|
||||
|
||||
## Re-using FlutterEngines across screens
|
||||
|
||||
Re-using the same `FlutterEngine` across screens that are significantly separated should work as described above. However, developers must consider the possibility that one Flutter experience might show through to another. For example, consider an `Activity` that displays `flutterEngineA`, which then launches a native Android dialog, and that dialog is a `Fragment` that also displays `flutterEngineA`. This situation won't work because both the dialog and the underlying `Activity` are simultaneously visible and a single `FlutterEngine` can only render a single UI at a given moment.
|
||||
|
||||
When two Flutter experiences are shown back to back, you must carefully consider the possibility that Flutter might be instructed to show two different UIs at the same time. If such a situation occurs, you will need to switch your strategy to cache two `FlutterEngine`s instead of one, or you'll need to allow a new `FlutterEngine` to be instantiated for the second Flutter experience.
|
||||
@@ -0,0 +1,65 @@
|
||||
Flutter's v2 Android embedding includes reflection code that should find and register all plugins listed in your `pubspec.yaml` file without any intervention on your part. If your desired plugins are not registered automatically, please file an issue.
|
||||
|
||||
### Partial plugin registration
|
||||
|
||||
To prevent Flutter from registering all plugins and instead register only specific plugins of your choosing, do the following.
|
||||
|
||||
First, construct a `FlutterEngine` either as a [cached `FlutterEngine`](https://flutter.dev/docs/development/add-to-app/android/add-flutter-screen#step-3-optional-use-a-cached-flutterengine), or by overriding `provideFlutterEngine()` in [`FlutterActivity`](https://api.flutter.dev/javadoc/io/flutter/embedding/android/FlutterActivity.html#provideFlutterEngine-android.content.Context-) or [`FlutterFragment`](https://api.flutter.dev/javadoc/io/flutter/embedding/android/FlutterFragment.html#provideFlutterEngine-android.content.Context-) such that the `FlutterEngine` instance doesn't automatically register plugins.
|
||||
|
||||
```java
|
||||
FlutterEngine flutterEngine = new FlutterEngine(
|
||||
context,
|
||||
FlutterLoader.getInstance(),
|
||||
new FlutterJNI(),
|
||||
dartVmArgs, // or an empty array if no args needed
|
||||
false // this arg instructs the FlutterEngine NOT to register plugins automatically
|
||||
);
|
||||
```
|
||||
|
||||
Second, register the plugins that you want. If you overrode `provideFlutterEngine()` in `FlutterActivity` or `FlutterFragment` then override `configureFlutterEngine()` to add plugins:
|
||||
|
||||
```java
|
||||
public void configureFlutterEngine(FlutterEngine engine) {
|
||||
// The ShimPluginRegistry is how the v2 embedding works with v1 plugins.
|
||||
ShimPluginRegistry shimPluginRegistry = new ShimPluginRegistry(
|
||||
flutterEngine,
|
||||
new PlatformViewsController()
|
||||
);
|
||||
|
||||
// Add any v1 plugins to the shim
|
||||
// MyV1Plugin.registerWith(
|
||||
// shimPluginRegistry.registrarFor("com.my.package.MyV1Plugin")
|
||||
// );
|
||||
|
||||
// Add any v2 plugins that you want
|
||||
// engine.getPlugins().add(new MyPlugin());
|
||||
}
|
||||
```
|
||||
|
||||
If you went with the cached `FlutterEngine` approach instead of `FlutterActivity` and `FlutterFragment` method overrides, then you can add plugins whenever you'd like. You can even add them immediately after instantiating your `FlutterEngine`. However, be advised that some v1 plugins expect an `Activity` to be available immediately upon registration. This will not be the case unless you add plugins in `configureFlutterEngine()` as shown earlier.
|
||||
|
||||
```java
|
||||
// Instantiate cached FlutterEngine.
|
||||
FlutterEngine flutterEngine = new FlutterEngine(
|
||||
context,
|
||||
FlutterLoader.getInstance(),
|
||||
new FlutterJNI(),
|
||||
dartVmArgs, // or an empty array if no args needed
|
||||
false // this arg instructs the FlutterEngine NOT to register plugins automatically
|
||||
);
|
||||
|
||||
// Immediately add plugins to the cached FlutterEngine.
|
||||
// The ShimPluginRegistry is how the v2 embedding works with v1 plugins.
|
||||
ShimPluginRegistry shimPluginRegistry = new ShimPluginRegistry(
|
||||
flutterEngine,
|
||||
new PlatformViewsController()
|
||||
);
|
||||
|
||||
// Add any v1 plugins to the shim
|
||||
// MyV1Plugin.registerWith(
|
||||
// shimPluginRegistry.registrarFor("com.my.package.MyV1Plugin")
|
||||
// );
|
||||
|
||||
// Add any v2 plugins that you want
|
||||
// engine.getPlugins().add(new MyPlugin());
|
||||
```
|
||||
63
docs/wiki_archive/Flutter-migrate.md
Normal file
63
docs/wiki_archive/Flutter-migrate.md
Normal file
@@ -0,0 +1,63 @@
|
||||
_This refers to a [project](https://github.com/flutter/packages/tree/main/packages/flutter_migrate) that is incomplete and is not currently maintained._
|
||||
|
||||
# Flutter migrate tool
|
||||
|
||||
Flutter projects that were created with old versions of flutter tend to slowly become outdated and sometimes do not have access to new flutter features.
|
||||
|
||||
The `flutter_migrate` tool is a set of commands that helps you migrate legacy flutter projects to modern flutter project templates. This process will typically update your dependencies, add access to new flutter features, and improve resilience and robustness against future updates.
|
||||
|
||||
Flutter migrate works best for small to medium sized projects that are primarily implemented in flutter/dart.
|
||||
|
||||
The flutter migrate tool will generate a staging directory where you will be able to preview changes and resolve any conflicts before committing the changes to your project.
|
||||
|
||||
## Prepare your project for migration
|
||||
|
||||
Before running the migrate tool, your project must be set up as a git repository and have no uncommitted changes. This is to ensure that the migration will always be able to be rolled back if needed. The migrate tool itself also requires git to function.
|
||||
|
||||
## Start the migration
|
||||
|
||||
To start the migration process, enter the root directory of your flutter project and run:
|
||||
|
||||
$ flutter migrate start
|
||||
|
||||
It is normal for this command to take a while to run. A staging directory called `migrate_staging_directory` will be created in your flutter project where the suggested changes are located. The staged files are the migrated and merged versions. For some projects, there may be merge conflicts between flutter-generated code changes and your own changes.
|
||||
|
||||
To view the status of your current started migration, run:
|
||||
|
||||
$ flutter migrate status
|
||||
|
||||
This will display an overview of the diffs, files changed, added, and deleted, as well as any files with merge conflicts.
|
||||
|
||||
## Resolve conflicts
|
||||
|
||||
Any merge conflicts must be resolved before applying the migration. The status command will list the discovered conflicts in the staging directory. These conflicts should either be fixed manually in the staging directory by directly modifying the staged files or optionally resolved using the resolve-conflicts wizard if one of the versions should be accepted without changes.
|
||||
|
||||
The resolve-conflicts wizard helps process routine merge conflicts quickly. Many projects will find that user changes to files like AndroidManifest.xml will be caught as a conflict. In most cases, it is desired to just keep your manual changes instead of reverting to the default template manifest. The wizard can help quickly resolve these types of conflict. Run the resolve-conflicts wizard with:
|
||||
|
||||
$ flutter migrate resolve-conflicts
|
||||
|
||||
The wizard will display each conflict and present the option to accept the new template version, keep the existing version, or skip the conflict and resolve it manually later. After each file, the wizard will ask to commit the changes or not.
|
||||
|
||||
## Apply the migration
|
||||
|
||||
When all conflicts are resolved and the changes are to your liking, the migration should be applied to the project. The contents of the staging directory will be moved into the project itself, overwriting the existing files. To apply, run:
|
||||
|
||||
|
||||
$ flutter migrate apply
|
||||
|
||||
After applying the migration, all changes can be handled via git commands. It is recommended to now build your app for all your target platforms to ensure the migration was successful. Although the migration tool typically produces working apps, it is possible in complex projects for errors to occur when merging or resolving conflicts. If the project is left in a broken state, it is easy to undo the migration by running:
|
||||
|
||||
$ git reset --hard HEAD
|
||||
|
||||
Newly added files can be removed with:
|
||||
|
||||
$ git clean -n (preview untracked files to be cleaned)
|
||||
$ git clean -f (delete untracked files)
|
||||
|
||||
## Aborting a staged migration
|
||||
|
||||
If the staged migration is no longer desired, you can abort the migration by running:
|
||||
|
||||
$ flutter migrate abort
|
||||
|
||||
This will delete the staging directory and your project will be left untouched.
|
||||
@@ -0,0 +1,82 @@
|
||||
IntelliJ is a full-featured IDE; it supports refactorings, code navigation, debugging, searching, and source control integration.
|
||||
|
||||
The following is a subjective take on getting IntelliJ to be a bit more lightweight (and slightly speedier) editor. Your mileage may vary.
|
||||
|
||||
## Less Chrome
|
||||
|
||||
Less is more! You can hide the IntelliJ toolbar and status line. You're still left with IntelliJ's tool buttons - buttons around the exterior allowing you to toggle visibility of different views - and the navigation bar, for common run actions.
|
||||
|
||||
From the View menu, toggle off the Toolbar and Status Bar:
|
||||
|
||||

|
||||
|
||||
## Breadcrumbs
|
||||
|
||||
The breadcrumbs view shows at the top of each editor. This view adds visual noise to the UI. To disable it, open the Settings view (ctrl-alt-s) and search for 'breadcrumbs'.
|
||||
|
||||

|
||||
|
||||
## Line numbers
|
||||
|
||||
Perhaps more controversially, you can disable line numbers in the UI as well. Similarly to disabling breadcrumbs, open the Settings dialog and search for 'line numbers'.
|
||||
|
||||

|
||||
|
||||
## Code folding
|
||||
|
||||
Some people disable it. Whether it adds value is highly subjective; your mileage may vary. In Settings, search for 'code folding'. Uncheck all the checkboxes under 'collapse by default'.
|
||||
|
||||
## The structure view
|
||||
|
||||
Also called the outline view in other tools. If you have a Dart file open this view will show the class and method structure for the file. This can be invaluable for quickly getting a sense of the structure of a file and for knowing where you are in one.
|
||||
|
||||
By default this is inline with the Project view on the left side of the IDE window. This can make it difficult to see your project structure and the structure of your current library at the same time. You can drag the various views around to dock in exterior of your window. To experiment, drag the 'Structure' tab from the left side of the window and dock it on the right-hand side:
|
||||
|
||||

|
||||
|
||||
## Synchronize views
|
||||
|
||||
When some people navigate around files in a project, and within the current file, they like the project view and the structure view to stay synchronized with the selection.
|
||||
|
||||
From the Project view, click on the gear icon, and ensure that 'Autoscroll to Source' and 'Autoscroll from Source' are checked:
|
||||
|
||||

|
||||
|
||||
And from the Structure view, in the toolbar, ensure that the two icons for 'Autoscroll to Source' and 'Autoscroll from Source' are selected:
|
||||
|
||||

|
||||
|
||||
## Darcula
|
||||
|
||||
Obviously a critical choice when developing - after coming down on one side or the other of the tabs-vs-spaces debate - is to choose a light or dark color theme. 😛 If you prefer a dark theme, you're in good company, with [52.5%](http://stackoverflow.com/research/developer-survey-2015#tech-ide) of other developers.
|
||||
|
||||
To set your UI theme to Darcula open the Settings and, under Appearance & Behavior > Appearance, adjust the value of the 'Theme' chooser.
|
||||
|
||||

|
||||
|
||||
## IDE layout
|
||||
|
||||
Some people prefer to have their IDE views positioned so that they are able to see the Project view, the Structure view, and the Dart Analysis view (errors and warnings) at once. Some people think of this as their
|
||||
[work triangle](https://en.wikipedia.org/wiki/Kitchen_work_triangle),
|
||||
similar to how you optimize for frequent tasks when designing a kitchen. After some fussing, here's a typical IDE layout:
|
||||
|
||||

|
||||
|
||||
## Remove unused plugins
|
||||
|
||||
IntelliJ (especially IntelliJ Ultimate) ships with a lot of plugins installed by default. Many of these plugins are harmless; a few may consume memory and CPU at various times. To disable plugins, open the Settings view and select the 'Plugins' category. Some people err on the side of only disabling plugins they clearly won't use.
|
||||
|
||||
## Community Edition vs Ultimate?
|
||||
|
||||
The two versions of IntelliJ are very similar. Ultimate includes plugins for web development; if web development is not an important use case for you, you can prefer to use the community edition. It has significantly fewer plugins installed than the Ultimate edition.
|
||||
|
||||
## Adjust the default heap
|
||||
|
||||
The recommended way of changing the JVM options in IntelliJ is from the Help | Edit Custom VM Options menu. This action will create a copy of the .vmoptions file in the IDE config directory and open an editor where you can change them (see also:
|
||||
[configuring VM options](https://intellij-support.jetbrains.com/hc/en-us/articles/206544869-Configuring-JVM-options-and-platform-properties)).
|
||||
|
||||
Current default values for IntelliJ:
|
||||
|
||||
`-Xms128m -Xmx750m`
|
||||
|
||||
Increase these for fun and profit.
|
||||
@@ -0,0 +1,13 @@
|
||||
Due to the newly added framework presubmit tests, if your engine commit breaks the framework in some way, **build_and_test_host** will likely catch it. In some cases, that breakage is intended and it requires a subsequent framework change (a.k.a., a manual engine roll) to fix the breakage.
|
||||
|
||||
While the breaking commit landed in the engine tree but the manual engine roll has not landed in the framework tree, all engine PRs could fail **build_and_test_host** unless those PRs are created based on an older engine tree without that breaking commit.
|
||||
|
||||
Therefore, for the author of the breaking commit that needs a manual roll, please notify others in
|
||||
* Flutter engine,
|
||||
* Flutter & Dart,
|
||||
* Flutter & Skia chat rooms,
|
||||
* and anyone who's rolling into the Flutter engine tree.
|
||||
|
||||
Feel free to @all to grab attentions as many people probably will skip any message without a red dot.
|
||||
|
||||
For authors of other PRs: please hold your PR until the manual roll finishes and rerun build_and_test_host for a green landing if it's not urgent. If your PR needs to fix something urgently, you may still land it on red build_and_test_host with an explicit explanation that the redness is caused by another commit.
|
||||
75
docs/wiki_archive/Multi-device-debugging-in-VS-Code.md
Normal file
75
docs/wiki_archive/Multi-device-debugging-in-VS-Code.md
Normal file
@@ -0,0 +1,75 @@
|
||||
The Flutter plugin for Visual Studio code has been updated to provide _experimental_ support for [Visual Studio Code’s multi-target debugging](https://code.visualstudio.com/docs/editor/debugging#_multitarget-debugging).
|
||||
|
||||
## Requirements
|
||||
- You must be on latest Flutter master channel for concurrent builds to not overwrite each other and cause build failures.
|
||||
|
||||
## Known Issues
|
||||
- The Hot Reload button on the debug toolbar does all sessions, but Hot Restart only does the active session
|
||||
|
||||
|
||||
## Setup
|
||||
To debug multiple devices concurrently you should set up a launch config for each device that has the `deviceId` field set (this is the same ID you'd pass to `flutter run -d xxx`). Open the launch config by clicking `Debug -> Open Configurations`. Add a `compound` config at the bottom that will launch both (or more) configurations at the same time:
|
||||
|
||||
```json
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Current Device",
|
||||
"request": "launch",
|
||||
"type": "dart"
|
||||
},
|
||||
{
|
||||
"name": "Android",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"deviceId": "android"
|
||||
},
|
||||
{
|
||||
"name": "iPhone",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"deviceId": "iphone"
|
||||
},
|
||||
],
|
||||
"compounds": [
|
||||
{
|
||||
"name": "All Devices",
|
||||
"configurations": ["Android", "iPhone"],
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Once saved, the compound configuration will show up in the drop-down at the top of the Debug side bar.
|
||||
|
||||
## Running
|
||||
Selecting the compound config on the Debug side bar and clicking `Debug -> Start Debugging` (or `Start Without Debugging`) will launched debug sessions for each device at the same time.
|
||||
|
||||
_Note: This may be slow because there are multiple concurrent builds (it may be faster on subsequent builds). You will also see multiple progress notification windows during the builds (we can likely improve this, but right now they just run without knowledge of each other so spawn their own notifications)._
|
||||
|
||||
When there are multiple active debug sessions, the debug toolbar will show a dropdown that lets you select the "active" debug session.
|
||||
|
||||
Actions on the debug toolbar will be sent only to this session (so you can step individually). The Debug Console will show a similar dropdown to switch between the output of each session.
|
||||
|
||||
The Variables and Watch panels on the Debug sidebar will be applied to the active debug session (being re-evaluated as you switch between them), though the Call Stack will show all sessions together, grouped by name.
|
||||
|
||||
All the usual functionality like hot-reload-on-save should work. Terminating an app should close only that single debug session.
|
||||
|
||||
## Troubleshooting
|
||||
The following are tips and tricks learned from connecting a large number of devices for simultaneous debugging (up to 9 at a time have been tested with these techniques).
|
||||
|
||||
### Hardware
|
||||
- Make sure to use high quality USB cables, e.g. Anker Powerline+ and/or the official Apple cables
|
||||
- Make sure to use a high quality USB hub, e.g. Anker 7-Port USB 3.0 Data Hub
|
||||
- If you feel the device buzzing periodically, it may be connected and disconnecting, which isn't conducive to good debugging
|
||||
|
||||
### Chrome OS
|
||||
- Make sure that the ChromeOS box is in developer mode and supports adb deployment
|
||||
- Make sure the left port is used for the connection (at least for the Google Pixel family of Chrome OS devices)
|
||||
- If not showing in ```flutter devices```, reboot the Chrome OS device with the USB cable in place
|
||||
|
||||
### Misc
|
||||
- Changes not being replicated to the web and/or desktop app via hot reload? Clicking on the app should cause the changes to be replicated.
|
||||
- Starting a debugging session always failing? Make sure that you're using the proper device name, e.g. Apple likes to use smart quotes in their device names instead of the standard apostrophe, e.g. ```Bob’s iPad``` instead of ```Bob's iPad```.
|
||||
- If you're still having trouble, make sure to test each configuration on its own via the Debug Sidebar instead of choosing the device to debug from the status bar -- the one in the status bar is going to ignore your launch settings and hide your errors.
|
||||
2507
docs/wiki_archive/Nevercode [TBD]/2021---Issue-Triage-Reports.md
Normal file
2507
docs/wiki_archive/Nevercode [TBD]/2021---Issue-Triage-Reports.md
Normal file
File diff suppressed because it is too large
Load Diff
3372
docs/wiki_archive/Nevercode [TBD]/2022---Issue-Triage-Reports.md
Normal file
3372
docs/wiki_archive/Nevercode [TBD]/2022---Issue-Triage-Reports.md
Normal file
File diff suppressed because it is too large
Load Diff
3477
docs/wiki_archive/Nevercode [TBD]/2023-Issue-Triage-Reports.md
Normal file
3477
docs/wiki_archive/Nevercode [TBD]/2023-Issue-Triage-Reports.md
Normal file
File diff suppressed because it is too large
Load Diff
863
docs/wiki_archive/Nevercode [TBD]/2024-Issue-Triage-Reports.md
Normal file
863
docs/wiki_archive/Nevercode [TBD]/2024-Issue-Triage-Reports.md
Normal file
@@ -0,0 +1,863 @@
|
||||
## 2024-05-17
|
||||
### Notable issues
|
||||
|
||||
- [Linux][Web]: Bug while pressing Numeric Keypad keys [#148447](https://github.com/flutter/flutter/issues/148447)
|
||||
- [Web][HTML]: cursor offset is incorrect when typing CJK [#148271](https://github.com/flutter/flutter/issues/148271)
|
||||
- Software keyboard flickers when focus moves between TextFields [#148530](https://github.com/flutter/flutter/issues/148530)
|
||||
- Import app_localizations fails after build_runner [#148333](https://github.com/flutter/flutter/issues/148333)
|
||||
- Autofill Hints not populating in text fields on iOS with Flutter 3.22.0 [#148475](https://github.com/flutter/flutter/issues/148475)
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 154, closed 33 (21.43%).
|
||||
|
||||
In total closed 79 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 23% |
|
||||
| Fixed | 32% |
|
||||
| Invalid | 25% |
|
||||
| Solved | 20% |
|
||||
|
||||
Issues closed due to inactivity: 28
|
||||
|
||||
Size of backlog: 94
|
||||
|
||||
## 2024-05-10
|
||||
### Notable issues
|
||||
|
||||
No major issues to be reported for this week.
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 102, closed 30 (29.41%).
|
||||
|
||||
In total closed 72 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 22% |
|
||||
| Fixed | 24% |
|
||||
| Invalid | 39% |
|
||||
| Solved | 15% |
|
||||
|
||||
Issues closed due to inactivity: 18
|
||||
|
||||
|
||||
|
||||
## 2024-05-03
|
||||
### Notable issues
|
||||
|
||||
No major issues to be reported for this week.
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 134, closed 49 (36.57%).
|
||||
|
||||
In total closed 95 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 28% |
|
||||
| Fixed | 34% |
|
||||
| Invalid | 21% |
|
||||
| Solved | 17% |
|
||||
|
||||
Issues closed due to inactivity: 32
|
||||
|
||||
Size of backlog: 89
|
||||
|
||||
|
||||
## 2024-04-26
|
||||
### Notable issues
|
||||
|
||||
- Text selection magnifier freezes, causing the TextField to prevent input after closing the keyboard on the iPad [#145751](https://github.com/flutter/flutter/issues/145751)
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 127, closed 37 (29.13%).
|
||||
|
||||
In total closed 83 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 28% |
|
||||
| Fixed | 34% |
|
||||
| Invalid | 20% |
|
||||
| Solved | 18% |
|
||||
|
||||
Issues closed due to inactivity: 20
|
||||
|
||||
Size of backlog: 88
|
||||
|
||||
## 2024-04-19
|
||||
### Notable issues
|
||||
|
||||
- TextField Becomes Unresponsive After Using back swipe Gesture [#146844](https://github.com/flutter/flutter/issues/146844)
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 127, closed 40 (31.5%).
|
||||
|
||||
In total closed 78 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 32% |
|
||||
| Fixed | 28% |
|
||||
| Invalid | 28% |
|
||||
| Solved | 12% |
|
||||
|
||||
Issues closed due to inactivity: 20
|
||||
|
||||
Size of backlog: 73
|
||||
|
||||
## 2024-04-12
|
||||
### Notable issues
|
||||
|
||||
- [Web][HTML] Hovering the cursor over Arabic characters causes an ArgumentError [#146588](https://github.com/flutter/flutter/issues/146588)
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 112, closed 35 (31.25%).
|
||||
|
||||
In total closed 87 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 22% |
|
||||
| Fixed | 31% |
|
||||
| Invalid | 30% |
|
||||
| Solved | 17% |
|
||||
|
||||
Issues closed due to inactivity: 34
|
||||
|
||||
Size of backlog: 75
|
||||
|
||||
## 2024-04-05
|
||||
|
||||
### Notable issues
|
||||
|
||||
- [webview_flutter] [iOS] WebviewWidget lost drag response, when some widgets on it use Stack layout [#121960](https://github.com/flutter/flutter/issues/121960). Some users are reporting this as affecting their development workflow.
|
||||
- Shadow animation using Impeller causing rendering issues [#145969](https://github.com/flutter/flutter/issues/145969). This regressed in 3.19.4, it was fine in 3.19.0 up until 3.19.3
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 121, closed 37 (30.58%).
|
||||
|
||||
In total closed 101 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 27% |
|
||||
| Fixed | 37% |
|
||||
| Invalid | 27% |
|
||||
| Solved | 14% |
|
||||
|
||||
Issues closed due to inactivity: 23
|
||||
|
||||
Size of backlog: 87
|
||||
|
||||
## 2024-03-29
|
||||
### Notable issues
|
||||
|
||||
- Regression: Severe performance regression on Firefox in v.3.19 (https://github.com/flutter/flutter/issues/145563)
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 148, closed 36 (24.32%).
|
||||
|
||||
In total closed 90 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 36% |
|
||||
| Fixed | 36% |
|
||||
| Invalid | 14% |
|
||||
| Solved | 14% |
|
||||
|
||||
Issues closed due to inactivity: 20
|
||||
|
||||
Size of backlog: 59
|
||||
|
||||
## 2024-03-22
|
||||
### Notable issues
|
||||
|
||||
No major issues to report this week
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 143, closed 46 (32.17%).
|
||||
|
||||
In total closed 97 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 31% |
|
||||
| Fixed | 29% |
|
||||
| Invalid | 27% |
|
||||
| Solved | 13% |
|
||||
|
||||
Issues closed due to inactivity: 34
|
||||
|
||||
Size of backlog: 86
|
||||
|
||||
## 2024-03-15
|
||||
### Notable issues
|
||||
|
||||
- Regression: Pointer position shifts in scaled Platform Views in Flutter 3.19.[(https://github.com/flutter/flutter/issues/144278)](https://github.com/flutter/flutter/issues/144278)).
|
||||
- Regression: Navigator.Pop cause most recent focus node to regain focus even if not focused when new page was opened (https://github.com/flutter/flutter/issues/145155)
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 133, closed 43 (32.33%).
|
||||
|
||||
In total closed 86 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 29% |
|
||||
| Fixed | 30% |
|
||||
| Invalid | 27% |
|
||||
| Solved | 12% |
|
||||
|
||||
Issues closed due to inactivity: 21
|
||||
|
||||
Size of backlog: 82
|
||||
|
||||
|
||||
|
||||
## 2024-03-08
|
||||
### Notable issues
|
||||
|
||||
- Integration test TimeoutException after 0:12:00.000000: Test timed out after 12 minutes. [#105913](https://github.com/flutter/flutter/issues/105913). It appears more people are experiencing this issue.
|
||||
- DropdownMenu experiences screen jitter issues when used within TabBarView alongside nested navigation [#139113](https://github.com/flutter/flutter/issues/139113) Some users would like to know the status of this issue.
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 147, closed 55 (37.41%).
|
||||
|
||||
In total closed 92 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| ------------------ | --- |
|
||||
| Duplicate | 38% |
|
||||
| Fixed | 20% |
|
||||
| Invalid | 27% |
|
||||
| Solved | 15% |
|
||||
|
||||
Issues closed due to inactivity: 23
|
||||
|
||||
Size of backlog: 86
|
||||
|
||||
## 2024-03-01
|
||||
### Notable issues
|
||||
|
||||
- [Impeller] CupertinoDatePicker might cause text on screen to glitch. [#144331](https://github.com/flutter/flutter/issues/144331)
|
||||
- Font weight is too light in light mode and too heavy in dark mode [#120857](https://github.com/flutter/flutter/issues/120857).
|
||||
Some users are requesting that this be looked at again and re-prioritized (with a higher priority) if possible.
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 143, closed 39 (23.17%).
|
||||
|
||||
In total closed 85 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| Duplicate | 22.4% |
|
||||
| Fixed | 36.5% |
|
||||
| Invalid | 32.9% |
|
||||
| Solved | 8.2% |
|
||||
|
||||
Issues closed due to inactivity: 20
|
||||
|
||||
Size of backlog: 80
|
||||
|
||||
#### Flutter/website
|
||||
|
||||
New website issues triaged 9, closed 0 (0%)
|
||||
|
||||
In total closed 1 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| invalid | 100% |
|
||||
|
||||
#### dart-lang/site-www
|
||||
|
||||
New dart-lang/site-www issues triaged 4, closed 0 (0%)
|
||||
|
||||
No issues closed during the week.
|
||||
|
||||
#### Flutterfire
|
||||
|
||||
New Flutterfire issues triaged 14, closed 2 (27.27%).
|
||||
|
||||
In total closed 24 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| fixed | 33.3% |
|
||||
| duplicate | 12.5% |
|
||||
| invalid | 16.7% |
|
||||
| no-response | 16.7% |
|
||||
| solution-provided | 8.3% |
|
||||
| user issue | 4.2% |
|
||||
|
||||
#### FirebaseUI-Flutter
|
||||
|
||||
New FirebaseUI-Flutter issues triaged 1, closed 0 (0%).
|
||||
|
||||
In total, closed 0 issues during the week
|
||||
|
||||
|
||||
## 2024-02-23
|
||||
### Notable issues
|
||||
|
||||
Resizing FlutterView in android create a flicker [#143051](https://github.com/flutter/flutter/issues/143051)
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 149, closed 50 (33.56%).
|
||||
|
||||
In total closed 92 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| Duplicate | 28.26% |
|
||||
| Fixed | 23.91% |
|
||||
| Invalid | 30.43% |
|
||||
| Solved | 17.39% |
|
||||
|
||||
Issues closed due to inactivity: 16
|
||||
|
||||
Size of backlog: 76
|
||||
|
||||
#### Flutter/website
|
||||
|
||||
New website issues triaged 5, closed 0 (0%)
|
||||
|
||||
In total closed 4 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| fixed | 100.00% |
|
||||
|
||||
#### dart-lang/site-www
|
||||
|
||||
New dart-lang/site-www issues triaged 8, closed 2 (25.00%)
|
||||
|
||||
No issues closed during the week.
|
||||
|
||||
#### Flutterfire
|
||||
|
||||
New Flutterfire issues triaged 22, closed 7 (31.82%).
|
||||
|
||||
In total closed 16 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| solution-provided | 18.75% |
|
||||
| no-response | 25.00% |
|
||||
| invalid | 25.00% |
|
||||
| duplicate | 12.50% |
|
||||
|
||||
#### FirebaseUI-Flutter
|
||||
|
||||
New FirebaseUI-Flutter issues triaged 2, closed 1 (50%).
|
||||
|
||||
In total closed 2 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| duplicate | 50.00% |
|
||||
| fixed | 50.00% |
|
||||
|
||||
|
||||
## 2024-02-16
|
||||
### Notable issues
|
||||
|
||||
No major issues to report for this week
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 83, closed 20 (24.1%).
|
||||
|
||||
In total closed 94 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| Duplicate | 13.83% |
|
||||
| Fixed | 50.00% |
|
||||
| Invalid | 21.28% |
|
||||
| Solved | 14.89% |
|
||||
|
||||
Issues closed due to inactivity: 27
|
||||
|
||||
Size of backlog: 67
|
||||
|
||||
#### Flutter/website
|
||||
|
||||
New website issues triaged 7, closed 2 (28.57%)
|
||||
|
||||
In total closed 2 issue during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| invalid | 50.00% |
|
||||
| duplicate | 50.00% |
|
||||
|
||||
#### dart-lang/site-www
|
||||
|
||||
New dart-lang/site-www issues triaged 2, closed 1 (50.00%)
|
||||
|
||||
No issues closed during the week.
|
||||
|
||||
#### Flutterfire
|
||||
|
||||
New Flutterfire issues triaged 14, closed 3 (21.43%).
|
||||
|
||||
In total closed 12 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| user | 8.33% |
|
||||
| no-response | 58.33% |
|
||||
| invalid | 16.67% |
|
||||
| duplicate | 16.67% |
|
||||
|
||||
#### FirebaseUI-Flutter
|
||||
|
||||
New FirebaseUI-Flutter issues triaged 0, closed 0 (0%).
|
||||
|
||||
No issues closed during the week.
|
||||
|
||||
|
||||
## 2024-02-09
|
||||
### Notable issues
|
||||
|
||||
Cupertino icons are misaligned in latest beta [#143069](https://github.com/flutter/flutter/issues/143069)
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 138, closed 43 (31.16%).
|
||||
|
||||
In total closed 97 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| Duplicate | 35.05% |
|
||||
| Fixed | 30.93% |
|
||||
| Invalid | 22.68% |
|
||||
| Solved | 11.34% |
|
||||
|
||||
Issues closed due to inactivity: 35
|
||||
|
||||
Size of backlog: 81
|
||||
|
||||
#### Flutter/website
|
||||
|
||||
New website issues triaged 3, closed 1 (33.33%)
|
||||
|
||||
In total closed 1 issue during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| invalid | 100% |
|
||||
|
||||
#### dart-lang/site-www
|
||||
|
||||
New dart-lang/site-www issues triaged 1, closed 0 (0%)
|
||||
|
||||
No issues closed during the week.
|
||||
|
||||
#### Flutterfire
|
||||
|
||||
New Flutterfire issues triaged 16, closed 2 (12.5%).
|
||||
|
||||
In total closed 19 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| user | 10.53% |
|
||||
| fixed | 52.63% |
|
||||
| no-response | 21.05% |
|
||||
| solution-provided | 5.26% |
|
||||
| duplicate | 10.53% |
|
||||
|
||||
#### FirebaseUI-Flutter
|
||||
|
||||
New FirebaseUI-Flutter issues triaged 3, closed 0 (0%).
|
||||
|
||||
In total closed 2 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| no-response | 50.00% |
|
||||
| solution-provided | 50.00% |
|
||||
|
||||
|
||||
## 2024-02-02
|
||||
### Notable issues
|
||||
|
||||
No major issues to report for this week
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 140, closed 32 (22.86%).
|
||||
|
||||
In total closed 90 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| Duplicate | 22.22% |
|
||||
| Fixed | 37.78% |
|
||||
| Invalid | 20.00% |
|
||||
| Solved | 20.00% |
|
||||
|
||||
Issues closed due to inactivity: 25
|
||||
|
||||
Size of backlog: 101
|
||||
|
||||
#### Flutter/website
|
||||
|
||||
New website issues triaged 4, closed 0 (0%)
|
||||
|
||||
In total closed 3 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| fixed | 100% |
|
||||
|
||||
#### dart-lang/site-www
|
||||
|
||||
New dart-lang/site-www issues triaged 2, closed 0 (0%)
|
||||
|
||||
No issues closed during the week.
|
||||
|
||||
#### Flutterfire
|
||||
|
||||
New Flutterfire issues triaged 27, closed 1 (3.7%).
|
||||
|
||||
In total closed 14 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| user | 14.29% |
|
||||
| fixed | 57.14% |
|
||||
| no-response | 21.43% |
|
||||
| solution-provided | 7.14% |
|
||||
|
||||
#### FirebaseUI-Flutter
|
||||
|
||||
New FirebaseUI-Flutter issues triaged 2, closed 1 (50%).
|
||||
|
||||
In total closed 1 issue during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| duplicate | 100.00% |
|
||||
|
||||
## 2024-01-26
|
||||
### Notable issues
|
||||
|
||||
* [go_router_builder] universal link is not working with generated routes [#140909](https://github.com/flutter/flutter/issues/140909)
|
||||
* iOS 15+ save password prompt dismiss is pushing UI up and down [#112281](https://github.com/flutter/flutter/issues/112281)
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 133, closed 32 (24.06%).
|
||||
|
||||
In total closed 91 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| Duplicate | 27.47% |
|
||||
| Fixed | 39.56% |
|
||||
| Invalid | 20.88% |
|
||||
| Solved | 12.09% |
|
||||
|
||||
Issues closed due to inactivity: 29
|
||||
|
||||
Size of backlog: 109
|
||||
|
||||
#### Flutter/website
|
||||
|
||||
New website issues triaged 3, closed 0 (0%)
|
||||
|
||||
In total closed 2 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| fixed | 100% |
|
||||
|
||||
#### dart-lang/site-www
|
||||
|
||||
New dart-lang/site-www issues triaged 0, closed 0 (0%)
|
||||
|
||||
No issues closed during the week.
|
||||
|
||||
#### Flutterfire
|
||||
|
||||
New Flutterfire issues triaged 19, closed 3 (15.79%).
|
||||
|
||||
In total closed 16 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| user | 12.50% |
|
||||
| fixed | 12.50% |
|
||||
| no-response | 43.75% |
|
||||
| invalid | 18.75% |
|
||||
| solution-provided | 6.25% |
|
||||
| duplicate | 6.25% |
|
||||
|
||||
#### FirebaseUI-Flutter
|
||||
|
||||
New FirebaseUI-Flutter issues triaged 2, closed 0 (0%).
|
||||
|
||||
In total closed 1 issue during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| user | 100.00% |
|
||||
|
||||
|
||||
## 2024-01-19
|
||||
### Notable issues
|
||||
|
||||
* [Android][iOS] Builds generated on different machines have different sizes [#137990](https://github.com/flutter/flutter/issues/137990)
|
||||
* Textfield vertical alignment center off with outline input border [#124852](https://github.com/flutter/flutter/issues/124852)
|
||||
* [web] Flutter web hot restart not reflecting changes[#141588]( https://github.com/flutter/flutter/issues/141588)
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 133, closed 37 (27.82%).
|
||||
|
||||
In total closed 90 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| Duplicate | 26.67% |
|
||||
| Fixed | 30.00% |
|
||||
| Invalid | 23.33% |
|
||||
| Solved | 20.00% |
|
||||
|
||||
Issues closed due to inactivity: 10
|
||||
|
||||
Size of backlog: 122
|
||||
|
||||
#### Flutter/website
|
||||
|
||||
New website issues triaged 4, closed 2 (50%)
|
||||
|
||||
In total closed 2 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| duplicate | 100% |
|
||||
|
||||
#### dart-lang/site-www
|
||||
|
||||
New dart-lang/site-www issues triaged 3, closed 0 (0%)
|
||||
|
||||
No issues closed during the week.
|
||||
|
||||
#### Flutterfire
|
||||
|
||||
New Flutterfire issues triaged 8, closed 1 (12.50%).
|
||||
|
||||
In total closed 20 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| user | 10.00% |
|
||||
| fixed | 25.00% |
|
||||
| no-response | 10.00% |
|
||||
| invalid | 10.00% |
|
||||
| solution-provided | 40.00% |
|
||||
| duplicate | 5.00% |
|
||||
|
||||
#### FirebaseUI-Flutter
|
||||
|
||||
New FirebaseUI-Flutter issues triaged 0, closed 0 (0%).
|
||||
|
||||
In total closed 2 issue during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| no-response | 100.00% |
|
||||
|
||||
|
||||
## 2024-01-12
|
||||
### Notable issues
|
||||
|
||||
No major issues to report for this week
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 146, closed 29 (19.86%).
|
||||
|
||||
In total closed 69 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| Duplicate | 27.54% |
|
||||
| Fixed | 36.23% |
|
||||
| Invalid | 26.09% |
|
||||
| Solved | 10.14% |
|
||||
|
||||
Issues closed due to inactivity: 20
|
||||
|
||||
Size of backlog: 102
|
||||
|
||||
#### Flutter/website
|
||||
|
||||
New website issues triaged 10, closed 2 (20%)
|
||||
|
||||
In total closed 4 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| fixed | 50.00% |
|
||||
| duplicate | 25.00% |
|
||||
| invalid | 25.00% |
|
||||
|
||||
#### dart-lang/site-www
|
||||
|
||||
New dart-lang/site-www issues triaged 0, closed 0 (0%)
|
||||
|
||||
No issues closed during the week.
|
||||
|
||||
#### Flutterfire
|
||||
|
||||
New Flutterfire issues triaged 23, closed 6 (26.09%).
|
||||
|
||||
In total closed 26 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| user | 7.69% |
|
||||
| fixed | 11.54% |
|
||||
| no-response | 26.92% |
|
||||
| invalid | 15.38% |
|
||||
| solution-provided | 30.77% |
|
||||
| duplicate | 3.85% |
|
||||
| wontfix | 3.85% |
|
||||
|
||||
#### FirebaseUI-Flutter
|
||||
|
||||
New FirebaseUI-Flutter issues triaged 4, closed 1 (25.00%).
|
||||
|
||||
In total closed 1 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| fixed | 100.00% |
|
||||
|
||||
|
||||
## 2024-01-05
|
||||
### Notable issues
|
||||
|
||||
No major issues to report for this week
|
||||
|
||||
### Issue counts
|
||||
|
||||
#### Flutter
|
||||
|
||||
New Flutter issues triaged 110, closed 37 (33.64%).
|
||||
|
||||
In total closed 84 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| Duplicate | 34.52% |
|
||||
| Fixed | 27.38% |
|
||||
| Invalid | 21.43% |
|
||||
| Solved | 16.67% |
|
||||
|
||||
Issues closed due to inactivity: 39
|
||||
|
||||
Size of backlog: 91
|
||||
|
||||
#### Flutter/website
|
||||
|
||||
New website issues triaged 6, closed 1 (16.67%)
|
||||
|
||||
In total closed 6 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| fixed | 83.33% |
|
||||
| duplicate | 16.67% |
|
||||
|
||||
#### dart-lang/site-www
|
||||
|
||||
New dart-lang/site-www issues triaged 1, closed 0 (0%)
|
||||
|
||||
No issues closed during the week.
|
||||
|
||||
#### Flutterfire
|
||||
|
||||
New Flutterfire issues triaged 18, closed 2 (11.11%).
|
||||
|
||||
In total closed 39 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| user | 17.95% |
|
||||
| fixed | 30.77% |
|
||||
| no-response | 17.95% |
|
||||
| invalid | 12.82% |
|
||||
| solution-provided | 12.82% |
|
||||
| duplicate | 7.69% |
|
||||
|
||||
#### FirebaseUI-Flutter
|
||||
|
||||
New FirebaseUI-Flutter issues triaged 5, closed 0 (0%).
|
||||
|
||||
In total closed 4 issues during the week.
|
||||
|
||||
| Reason for closing | |
|
||||
| -- | -- |
|
||||
| fixed | 50.00% |
|
||||
| solution-provided | 50.00% |
|
||||
@@ -0,0 +1,8 @@
|
||||
This page contains weekly issue triage reports from the Nevercode front-line triage team.
|
||||
|
||||
- [2024 reports](2024-Issue-Triage-Reports.md)
|
||||
- [2023 reports](2023-Issue-Triage-Reports.md)
|
||||
- [2022 reports](2022---Issue-Triage-Reports.md)
|
||||
- [2021 reports](2021---Issue-Triage-Reports.md)
|
||||
|
||||
_See also: [Triage](../../triage/README.md)_
|
||||
@@ -0,0 +1,158 @@
|
||||
(This wiki page applies to people migrating code written before March 2017. It is unlikely to still be relevant.)
|
||||
|
||||
# Introduction
|
||||
Prior to pull requests [flutter/flutter#8837](https://github.com/flutter/flutter/pull/8837) and [flutter/engine#3482](https://github.com/flutter/engine/pull/3482), both merged on March 17 2017, communication between Flutter app components written in Dart and host platform app components written for Android or iOS was accomplished by sending and receiving string/JSON messages using methods defined in the following types:
|
||||
|
||||
* `PlatformMessages` (Dart)
|
||||
* `FlutterView` (Android)
|
||||
* `FlutterViewController` (iOS)
|
||||
|
||||
These methods have been removed, leaving only methods for sending unencoded binary messages. A new channel concept has been introduced in their place:
|
||||
|
||||
* [`PlatformMessageChannel`](https://docs.flutter.io/flutter/services/PlatformMessageChannel-class.html), [`PlatformMethodChannel`](https://docs.flutter.io/flutter/services/PlatformMethodChannel-class.html) (Dart)
|
||||
* `FlutterMessageChannel`, `FlutterMethodChannel` (Android, iOS)
|
||||
|
||||
The main goals of the new API are to achieve
|
||||
|
||||
* higher-level communication: asynchronous method calls and event streams
|
||||
* less boilerplate and redundancy
|
||||
* a more symmetric API across Dart, Android, and iOS
|
||||
|
||||
The following sections detail how to port code written against the old API.
|
||||
|
||||
# Flutter side
|
||||
|
||||
With the new API you define in one place the name and type of the channel you need:
|
||||
|
||||
var fooChannel = new PlatformMessageChannel<String>('foo', const StringCodec());
|
||||
var barChannel = new PlatformMethodChannel('bar', const JSONMethodCodec());
|
||||
|
||||
There are four codecs to choose from: binary, string, JSON, and standard. The standard codec employs efficient binary serialization of JSON-like values, supporting also buffers as leaf values (e.g. Dart `TypedData`, Java primitive arrays, Cocoa `NSData`).
|
||||
|
||||
Once you have a channel, you can use it in multiple places without repeating the information needed for its creation.
|
||||
|
||||
## Sending messages to platform
|
||||
|
||||
Replace code like this
|
||||
|
||||
String reply = await PlatformMessages.sendString('foo', myString);
|
||||
|
||||
with code like this
|
||||
|
||||
String reply = await fooChannel.send(myString);
|
||||
|
||||
## Receiving messages from platform
|
||||
|
||||
Replace code like this
|
||||
|
||||
PlatformMessages.setStringMessageHandler('foo', (String message) async {
|
||||
// do something, then
|
||||
return reply;
|
||||
});
|
||||
|
||||
with code like this
|
||||
|
||||
fooChannel.setMessageHandler((String message) async {
|
||||
// do something, then
|
||||
return reply;
|
||||
});
|
||||
|
||||
## Invoking platform methods
|
||||
|
||||
Replace code like this
|
||||
|
||||
var arguments = { 'argA': 'hello', 'argB': 42 };
|
||||
var message = {
|
||||
'method': 'someMethod',
|
||||
'args': <Map<String, dynamic>>[arguments],
|
||||
};
|
||||
dynamic reply = await PlatformMessages.sendJSON('bar', message);
|
||||
// what about errors?
|
||||
|
||||
or this
|
||||
|
||||
var arguments = { 'argA': 'hello', 'argB': 42 };
|
||||
dynamic reply = await PlatformMessages.invokeMethod(
|
||||
'bar',
|
||||
'someMethod',
|
||||
<Map<String, dynamic>>[arguments],
|
||||
);
|
||||
// what about errors?
|
||||
|
||||
with code like this
|
||||
|
||||
try {
|
||||
dynamic result = await barChannel.invokeMethod(
|
||||
'someMethod',
|
||||
{ 'argA': 'hello', 'argB': 42 },
|
||||
);
|
||||
// use result
|
||||
} on PlatformException catch(e) {
|
||||
// handle error
|
||||
}
|
||||
|
||||
## Receiving method calls from platform code
|
||||
|
||||
Replace code like this
|
||||
|
||||
PlatformMessages.setJSONMessageHandler('bar', (dynamic methodCall) async {
|
||||
String method = methodCall['method'];
|
||||
List arguments = methodCall['args'];
|
||||
// handle call then
|
||||
return result;
|
||||
// but what about errors?
|
||||
});
|
||||
|
||||
with code like this
|
||||
|
||||
barChannel.setMethodCallHandler((MethodCall call) async {
|
||||
String method = call.method;
|
||||
dynamic arguments = call.arguments;
|
||||
// handle call then
|
||||
return result;
|
||||
// or
|
||||
throw new PlatformException(errorCode, anErrorMessage, someDetails);
|
||||
});
|
||||
|
||||
See [platform_channel](../../examples/platform_channel/lib/main.dart) for an example.
|
||||
|
||||
## Android side
|
||||
|
||||
Similar to Flutter side, using `FlutterMessageChannel` and `FlutterMethodChannel` from `io.flutter.plugin.common`.
|
||||
|
||||
FlutterView view = ...
|
||||
FlutterMessageChannel<String> fooChannel =
|
||||
new FlutterMessageChannel<>(view, "foo", StringCodec.INSTANCE);
|
||||
|
||||
fooChannel.send(myString);
|
||||
|
||||
// or if you need to handle a reply:
|
||||
|
||||
fooChannel.send(myString, new ReplyHandler<String>() {
|
||||
public void onReply(String reply) {
|
||||
// do something with reply
|
||||
}
|
||||
});
|
||||
|
||||
[API documentation](https://docs.flutter.io/javadoc/). See [platform_channel](../../examples/platform_channel/android/app/src/main/java/com/example/platformchannel/MainActivity.java) for another example.
|
||||
|
||||
## iOS side
|
||||
|
||||
Similar to Flutter side, using `FlutterMessageChannel` and `FlutterMethodChannel` from `FlutterChannels.h`.
|
||||
|
||||
FlutterViewController controller = ...
|
||||
FlutterMessageChannel* fooChannel =
|
||||
[FlutterMessageChannel messageChannelWithName:@"foo"
|
||||
binaryMessenger:controller
|
||||
codec:[FlutterStringCodec sharedInstance]];
|
||||
|
||||
[fooChannel sendMessage:myString];
|
||||
|
||||
// or if you need to handle a reply:
|
||||
|
||||
[fooChannel sendMessage:myString replyHandler:^(id reply) {
|
||||
// do something with (NSString*)reply
|
||||
}];
|
||||
|
||||
|
||||
[API documentation](https://github.com/flutter/engine/blob/main/shell/platform/darwin/ios/framework/Headers). See [platform_channel](../../examples/platform_channel/ios/Runner/AppDelegate.m) for another example.
|
||||
57
docs/wiki_archive/User-documentation-index.md
Normal file
57
docs/wiki_archive/User-documentation-index.md
Normal file
@@ -0,0 +1,57 @@
|
||||
<!-- Don't add user documentation to the wiki. User documentation belongs on the web site. -->
|
||||
<!-- We only have these pages for historical reasons. -->
|
||||
|
||||
Flutter's user-facing documentation should all be on the Flutter web site and the API documentation site:
|
||||
|
||||
- https://docs.flutter.dev/
|
||||
- [Release notes](https://flutter.dev/docs/development/tools/sdk/release-notes)
|
||||
- https://api.flutter.dev/
|
||||
|
||||
Historically, experimental documentation was sometimes first written on this wiki and later moved to the web site. This is
|
||||
now discouraged but some of the content created in this way still exists and is listed below.
|
||||
|
||||
_Contributors: please consider moving this content to the web site or deleting it if it is no longer applicable!_
|
||||
|
||||
## Old documentation
|
||||
|
||||
## General
|
||||
|
||||
<!-- don't add things here; if you have a new feature, it should be documented on the web site not the wiki -->
|
||||
- [Apple Silicon support](../platforms/desktop/macos/Developing-with-Flutter-on-Apple-Silicon.md)
|
||||
- [Bad Builds](../releases/Bad-Builds.md)
|
||||
- [Binding to native code via FFI](https://flutter.dev/docs/development/platform-integration/c-interop)
|
||||
- [Data-driven Fixes](../contributing/Data-driven-Fixes.md)
|
||||
- [Flutter CLI crash reporting](https://docs.flutter.dev/reference/crash-reporting)
|
||||
- [Flutter CLI custom embedder support](../tool/Using-custom-embedders-with-the-Flutter-CLI.md)
|
||||
- [Flutter Test Fonts](../contributing/testing/Flutter-Test-Fonts.md)
|
||||
- [Hybrid Composition](../platforms/Hybrid-Composition.md)
|
||||
- [IntelliJ - Flutter Setup Tips and Tricks](IntelliJ---Flutter-Setup-Tips-and-Tricks.md)
|
||||
- [JIT release builds](../engine/JIT-Release-Modes.md)
|
||||
- [Making animated GIFs of Flutter apps](../contributing/issue_hygiene/Making-animated-GIFs-of-Flutter-apps.md)
|
||||
- [Multi-device debugging in VS Code](Multi-device-debugging-in-VS-Code.md)
|
||||
- [Obfuscating Dart Code](https://flutter.dev/docs/deployment/obfuscate)
|
||||
- [Reduce shader compilation jank using SkSL warm up](https://flutter.dev/docs/perf/rendering/shader)
|
||||
- [Upgrading Flutter projects from using PlatformMessages to using channels](Upgrading-Flutter-projects-from-using-PlatformMessages-to-using-channels.md)
|
||||
- [Writing Effective Tests](../contributing/testing/Writing-Effective-Tests.md)
|
||||
|
||||
### Android
|
||||
<!-- don't add things here; user documentation belongs on the web site not the wiki -->
|
||||
- [Android Fast Start](../tool/Fast-Start.md)
|
||||
- [Android Platform Views](../platforms/android/Android-Platform-Views.md)
|
||||
- [How Flutter apps are compiled with Gradle for Android](../platforms/android/How-Flutter-apps-are-compiled-with-Gradle-for-Android.md)
|
||||
- [Hybrid Composition](../platforms/Hybrid-Composition.md#android)
|
||||
- [Multidex](../platforms/android/Android-Multidex-support.md)
|
||||
- [Texture Layer Hybrid Composition](../platforms/android/Texture-Layer-Hybrid-Composition.md)
|
||||
|
||||
### iOS
|
||||
<!-- don't add things here; user documentation belongs on the web site not the wiki -->
|
||||
- [Hybrid Composition iOS](../platforms/Hybrid-Composition.md#ios)
|
||||
|
||||
### Web
|
||||
<!-- don't add things here; user documentation belongs on the web site not the wiki -->
|
||||
- [Debugging issues on the Web](../platforms/web/Debugging-issues-on-the-Web.md)
|
||||
- [Running Flutter Driver tests with Web](../contributing/testing/Running-Flutter-Driver-tests-with-Web.md)
|
||||
|
||||
### Release notes
|
||||
<!-- don't add things here; user documentation belongs on the web site not the wiki -->
|
||||
- [Hotfixes to the Stable Channel](../releases/Hotfixes-to-the-Stable-Channel.md)
|
||||
182
docs/wiki_archive/Workarounds-for-common-issues.md
Normal file
182
docs/wiki_archive/Workarounds-for-common-issues.md
Normal file
@@ -0,0 +1,182 @@
|
||||
Common issues Flutter developers might run into and recipes how to fix or work around.
|
||||
|
||||
= Flutter Recipes
|
||||
|
||||
== Flutter installation
|
||||
|
||||
=== Flutter installation corrupted
|
||||
|
||||
The Flutter install directory is in an inconsistent state and that causes all kinds of troubles.
|
||||
|
||||
==== Symptoms
|
||||
|
||||
// TODO
|
||||
|
||||
==== Causes
|
||||
|
||||
Unclear
|
||||
|
||||
==== Ways to fix
|
||||
|
||||
- Run the following commands in the Flutter install directory:
|
||||
[source,sh]
|
||||
----
|
||||
git clean -xfd
|
||||
git stash save --keep-index
|
||||
git stash drop
|
||||
git pull
|
||||
flutter doctor
|
||||
----
|
||||
|
||||
[CAUTION]
|
||||
====
|
||||
The `git stash drop` command drops customizations you might have made to the Flutter installation.
|
||||
====
|
||||
|
||||
==== Related information
|
||||
- https://github.com/flutter/flutter/issues/25220
|
||||
- https://github.com/flutter/flutter/issues/1963
|
||||
|
||||
== Flutter project files
|
||||
|
||||
=== Generated project files outdated
|
||||
|
||||
==== Symptoms
|
||||
// TODO
|
||||
|
||||
==== Causes
|
||||
|
||||
When a project is created with `flutter create foo` several files in the `ios/` and `android/` sub-directories are created.
|
||||
|
||||
Newer Flutter versions might generate these files a bit differently and projects created with older Flutter versions might cause issues.
|
||||
|
||||
==== Ways to fix
|
||||
|
||||
- Delete the `ios/` and `android/` directories and run `flutter create .` to re-generate these directories.
|
||||
|
||||
[CAUTION]
|
||||
====
|
||||
Custom changes will be lost and need to be re-applied.
|
||||
This is easiest if the project is committed to a version control system like Git.
|
||||
====
|
||||
|
||||
|
||||
==== Related information
|
||||
- https://github.com/flutter/flutter/issues/14974
|
||||
- https://github.com/flutter/flutter/issues/12573
|
||||
- https://github.com/flutter/flutter/issues/12983
|
||||
- https://github.com/flutter/flutter/issues/9827
|
||||
|
||||
|
||||
== Pub dependencies
|
||||
|
||||
=== Corrupted cache
|
||||
|
||||
Especially with plugin packages it was seen several times that the package in the pub cache was corrupted.
|
||||
|
||||
==== Symptoms
|
||||
Usually syntax errors at build time about code in dependencies.
|
||||
|
||||
==== Causes
|
||||
|
||||
Unknown.
|
||||
IDEs or editors used by developers might not prevent editing plugin files and when they navigate into plugin code they might accidentally modify the code.
|
||||
|
||||
==== Ways to fix
|
||||
|
||||
- Run `pub cache repair`
|
||||
This might take quite some time and re-downloads every package in the cache, even outdated versions that might not be used anymore by any project on disk.
|
||||
|
||||
- Delete `~/.pub-cache/hosted` and/or `~/.pub-cache/git` (for Git dependencies).
|
||||
This requires to run `flutter packages get` in all active projects on your machine afterwards.
|
||||
|
||||
- Delete a specific package or package version.
|
||||
Look up the exact path in cache for a specific package in the `.packages` file of your project.
|
||||
For example for `firebase_auth`
|
||||
```
|
||||
firebase_auth:file:///Users/someuser/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.6.6/lib/
|
||||
```
|
||||
To fix this package delete `///Users/someuser/.pub-cache/hosted/pub.dartlang.org/firebase_auth-0.6.6/` (`lib/` removed) and run `flutter packages get`.
|
||||
|
||||
==== Related information
|
||||
- https://www.dartlang.org/tools/pub/cmd/pub-cache
|
||||
- https://www.dartlang.org/tools/pub/environment-variables
|
||||
|
||||
== Proxy
|
||||
|
||||
=== Flutter commands can not access the Internet
|
||||
|
||||
In a network where the Internet can only be reached through a proxy and Flutter commands fail.
|
||||
|
||||
==== Symtoms
|
||||
|
||||
// TODO
|
||||
|
||||
==== Causes
|
||||
|
||||
Proxy setting incomplete or invalid.
|
||||
|
||||
==== Related information
|
||||
(none yet)
|
||||
|
||||
=== Hot-reload not working
|
||||
|
||||
When a proxy is configured hot-reload does often not work.
|
||||
|
||||
==== Symptoms
|
||||
|
||||
// TODO
|
||||
|
||||
==== Causes
|
||||
|
||||
Proxy setting incomplete or invalid.
|
||||
Localhost is redirected to the proxy.
|
||||
|
||||
==== Ways to fix
|
||||
|
||||
- Set environment variable `NO_PROXY=127.0.0.1`
|
||||
|
||||
==== Related information
|
||||
|
||||
- https://github.com/flutter/flutter/issues/24854
|
||||
- https://github.com/flutter/flutter/issues/16875#issuecomment-384758566
|
||||
- https://stackoverflow.com/questions/9546324/adding-directory-to-path-environment-variable-in-windows[Adding directory to PATH Environment Variable in Windows]
|
||||
- https://stackoverflow.com/questions/19287379/how-do-i-add-to-the-windows-path-variable-using-setx-having-weird-problems[How do I add to the Windows PATH variable using setx? Having weird problems]
|
||||
|
||||
|
||||
= Empty Template for new recipes
|
||||
|
||||
Copy from the following line down
|
||||
|
||||
== Topic name
|
||||
|
||||
=== Issue title
|
||||
|
||||
Issue description
|
||||
|
||||
==== Symptoms
|
||||
Explain seen symptoms
|
||||
|
||||
==== Causes
|
||||
|
||||
Explain what causes this issue
|
||||
|
||||
==== Ways to fix
|
||||
|
||||
- Do this, do that as well
|
||||
|
||||
==== Related information
|
||||
- https://example.com/some_link.html
|
||||
|
||||
|
||||
= AsciiDoc Recipes
|
||||
|
||||
==== AsciiDoc Syntax Quick Reference
|
||||
|
||||
- https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/
|
||||
|
||||
==== GitHub Flavored AsciiDoc
|
||||
|
||||
Some workarounds for common issues with AsciiDoc on GitHub
|
||||
|
||||
- https://gist.github.com/dcode/0cfbf2699a1fe9b46ff04c41721dda74
|
||||
Reference in New Issue
Block a user