Find a file
Greg Spencer 8ef5e2f046
Add OrderedFocusTraversalPolicy and FocusTraversalGroup to all… (#49235)
This change adds a way to provide explicit focus order for a part of the widget tree.

It adds FocusTraversalPolicyGroup, which in many ways is similar to DefaultFocusTraversal, except that it groups a widget subtree together so that those nodes are traversed as a group. DefaultFocusTraversal doesn't work as one would expect: If there is more than one DefaultFocusTraversal inside of a focus scope, the policy can change depending on which node was asked to move "next", which can cause unexpected behavior. The new grouping mechanism doesn't have that problem. I deprecate DefaultFocusTraversal in this PR.

It also adds OrderedFocusTraversalPolicy, which is a policy that can be supplied to FocusTraversalPolicyGroup to set the policy for a sub-tree. It looks for FocusTraversalOrder inherited widgets, which use a FocusOrder to do the sorting. FocusOrder has two subclasses: NumericalFocusOrder (which sorts based on a double), and LexicalFocusOrder, which sorts based on a String.

As part of doing this, I refactored the way FocusTraversalPolicy is implemented so that it has more default implementation methods, and exposes a new protected member: sortDescendants, which makes it easier for developers to make their own policy subclasses: they only need to implement sortDescendants to get a new ordering behavior, but can also still override any of the default implementation behaviors if they need different behavior.

I was able to do this without breaking the API (AFAICT).
2020-02-11 09:18:39 -08:00
.github Update BUG.md (#48539) 2020-01-11 11:04:29 -08:00
bin Roll engine 6158f03ef5fa..e4f46f32f1fd (3 commits) (#50399) 2020-02-10 15:54:03 -08:00
dev Add OrderedFocusTraversalPolicy and FocusTraversalGroup to all… (#49235) 2020-02-11 09:18:39 -08:00
examples use raw strings to avoid escaping (#50322) 2020-02-07 16:35:55 +01:00
packages Add OrderedFocusTraversalPolicy and FocusTraversalGroup to all… (#49235) 2020-02-11 09:18:39 -08:00
.cirrus.yml Set bundle config rather than deprecated --system flag (#50497) 2020-02-10 17:41:37 -08:00
.codecov.yml dont require diffs to have a percentage coverage greater than the previous diff (#36090) 2019-07-12 15:10:41 -07:00
.gitattributes Add git config option to automatically convert CRLF to LF (#8122) 2017-02-14 10:21:33 -08:00
.gitignore [flutter_tools] support --split-debug-info option in android builds (#49650) 2020-02-05 17:45:24 -08:00
analysis_options.yaml Apply void_checks lint. (#48267) 2020-01-13 10:03:01 -08:00
AUTHORS [Flutter Driver] Extend getText to support more widgets (#48809) 2020-01-15 16:49:11 -08:00
CODE_OF_CONDUCT.md Mention conduct@flutter.dev (#39150) 2019-08-25 10:46:02 -07:00
CODEOWNERS Add @christopherfujino as owner of dev/ci (docker) (#48261) 2020-01-06 13:55:03 -08:00
CONTRIBUTING.md Revert "Revert "Add many more global analyses. (#47875)" (#48080)" (#48081) 2020-01-02 11:47:28 -08:00
dartdoc_options.yaml Reverse the sense of the terms snippet and sample. (#48254) 2020-01-08 15:28:02 -08:00
flutter_console.bat License update (#45373) 2019-11-27 15:04:02 -08:00
LICENSE License update (#45373) 2019-11-27 15:04:02 -08:00
PATENT_GRANT Rename patent file (#38686) 2019-08-16 16:54:58 +01:00
README.md Update README.md (#49078) 2020-01-17 13:43:23 -08:00

Flutter logo

Build Status - Cirrus Gitter Channel Twitter handle

Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web and desktop from a single codebase. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.

Documentation

For announcements about new releases and breaking changes, follow the flutter-announce@googlegroups.com mailing list.

About Flutter

We think Flutter will help you create beautiful, fast apps, with a productive, extensible and open development model.

Beautiful user experiences

We want to enable designers to deliver their full creative vision without being forced to water it down due to limitations of the underlying framework. Flutter's layered architecture gives you control over every pixel on the screen, and its powerful compositing capabilities let you overlay and animate graphics, video, text and controls without limitation. Flutter includes a full set of widgets that deliver pixel-perfect experiences on both iOS and Android.

Reflectly hero image

Fast results

Flutter is fast. It's powered by the same hardware-accelerated Skia 2D graphics library that underpins Chrome and Android. We architected Flutter to support glitch-free, jank-free graphics at the native speed of your device. Flutter code is powered by the world-class Dart platform, which enables compilation to 32-bit and 64-bit ARM machine code for iOS and Android, as well as JavaScript for the web and Intel x64 for desktop devices.

Dart platform diagram

Productive development

Flutter offers stateful hot reload, allowing you to make changes to your code and see the results instantly without restarting your app or losing its state.

Hot reload animation

Extensible and open model

Flutter works with any development tool (or none at all), but includes editor plug-ins for both Visual Studio Code and IntelliJ / Android Studio. Flutter provides thousands of packages to speed your development, regardless of your target platform. And accessing other native code is easy, with support for both FFI and platform-specific APIs.

Flutter is a fully open source project, and we welcome contributions. Information on how to get started can be found at our contributor guide.