commit | 22116cd8b8479d1c9d8697420150faecb646ef6f | [log] [tgz] |
---|---|---|
author | Justin McCandless <jmccandless@google.com> | Thu Jan 23 10:48:41 2025 -0800 |
committer | dart-internal-monorepo <dart-internal-monorepo@dart-ci-internal.iam.gserviceaccount.com> | Thu Jan 23 11:42:38 2025 -0800 |
tree | 99367f3e65888bd698a043866c8bd867432df217 | |
parent | 942b50ed5e6f90070301fed17dcb1ddc2d360308 [diff] |
Autocomplete keyboard navigation (#159455) I noticed some problems with Autocomplete keyboard navigation: * Previously, when wrapping from the top to bottom or vice-versa, scrolling wouldn't happen until after you hit the arrow key a few extra times. This is due to the way we were doing scrolling and the fact that those items were not yet built by ListView.builder. I fixed this. <details> <summary>Video of scrolling bug</summary> [Screencast from 2024-11-25 16-21-06.webm](https://github.com/user-attachments/assets/ce01065a-1a03-4f37-b0f6-2d6273852ac4) </details> * This wrapping feature itself seemed to not be part of the `<select>` tag on web ([try it on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select)), which Autocomplete is kind of based on, so I removed it. It now stops at the top/bottom. * We were missing a couple of keyboard shortcuts (https://github.com/flutter/flutter/issues/85233) Fixes https://github.com/flutter/flutter/issues/85233 https://dart.googlesource.com/external/github.com/flutter/flutter/+/3baa356f52809abc8e195c19896817cf50340d04
Monorepo is:
With depot_tools installed and on your path, create a directory for your monorepo checkout and run these commands to create a gclient solution in that directory:
mkdir monorepo cd monorepo gclient config --unmanaged https://dart.googlesource.com/monorepo gclient sync -D
This gives you a checkout in the monorepo directory that contains:
monorepo/ DEPS - the DEPS used for this gclient checkout commits.json - the pinned commits for Dart, flutter/engine, and flutter/flutter tools/ - scripts used to create monorepo DEPS engine/src/ - the flutter/buildroot repo flutter/ - the flutter/engine repo out/ - the build directory, where Flutter engine builds are created third_party/ - Flutter dependencies checked out by DEPS dart/ - the Dart SDK checkout. third_party - Dart dependencies, also used by Flutter flutter/ - the flutter/flutter repo
Flutter's instructions for building the engine are at Compiling the engine
They can be followed closely, with a few changes:
goma_ctl ensure_start
is sufficient.Example build commands that work on linux:
MONOREPO_PATH=$PWD if [[ ! $PATH =~ (^|:)$MONOREPO_PATH/flutter/bin(:|$) ]]; then PATH=$MONOREPO_PATH/flutter/bin:$PATH fi export GOMA_DIR=$(dirname $(command -v gclient))/.cipd_bin goma_ctl ensure_start pushd engine/src flutter/tools/gn --goma --no-prebuilt-dart-sdk --unoptimized --full-dart-sdk autoninja -C out/host_debug_unopt popd
The Flutter commands used to build and run apps will use the locally built Flutter engine and Dart SDK, instead of the one downloaded by the Flutter tool, if the --local-engine
option is provided.
For example, to build and run the Flutter spinning square sample on the web platform,
MONOREPO_PATH=$PWD cd flutter/examples/layers flutter --local-engine=host_debug_unopt \ -d chrome run widgets/spinning_square.dart cd $MONOREPO_PATH
To build for desktop, specify the desktop platform device in flutter run
as -d macos
or -d linux
or -d windows
. You may also need to run the command
flutter create --platforms=windows,macos,linux
on existing apps, such as sample apps. New apps created with flutter create
already include these support files. Details of desktop support are at Desktop Support for Flutter
Tests in the Flutter source tree can be run with the flutter test
command, run in the directory of a package containing tests. For example:
MONOREPO_PATH=$PWD cd flutter/packages/flutter flutter test --local-engine=host_debug_unopt cd $MONOREPO_PATH
Please file an issue or email the dart-engprod team with any problems with or questions about using monorepo.
We will update this documentation to address them.
flutter
commands may download the engine and Dart SDK files for the configured channel, even though they will be using the local engine and its SDK.gclient sync
needs to be run in an administrator session, because some installed dependencies create symlinks.