- 24 Jan, 2024 6 commits
-
-
Greg Price authored
Much of the new wording here is borrowed from [ChipTheme], [SliderTheme], or [RadioThemeData], which I think are pretty good. I believe a lot of other theme classes have similar wording too. I've also made some tweaks of my own, notably the references to [MaterialApp.theme]. This started from a desire to have clearer cross-references pointing at what to do with a FooThemeData to make it take effect: https://github.com/flutter/flutter/pull/135879#discussion_r1355851481 but then as I started writing I kept finding more and more small things I wanted to adjust, including a couple of bits that were extraneous or obsolete.
-
LongCatIsLooong authored
Fixes #138773, port autocomplete to OverlayPortal
-
Jesús S Guerrero authored
Revert "[web] - Fix broken `TextField` in semantics mode when it's a sibling of `Navigator`" (#142129) Reverts flutter/flutter#138446 b/322136071
-
yim authored
Fixes #141448
-
Polina Cherkasova authored
-
Jackson Gardner authored
Reverts flutter/flutter#135529 This had some failures in postsubmit: https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20gradle_plugin_light_apk_test/17054/overview and https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20gradle_plugin_fat_apk_test/17262/overview We should revert and then investigate.
-
- 23 Jan, 2024 12 commits
-
-
Gray Mackall authored
Fixes https://github.com/flutter/flutter/issues/135173, and could also be interpreted as fixing https://github.com/flutter/flutter/issues/83596 based on @chinmaygarde 's comment.
-
Andrew Kolos authored
consolidate AssetBundle::entries and AssetBundle::entryKinds into a new type, `AssetBundleEntry` (#142029) Part of work on https://github.com/flutter/flutter/pull/141194 The [`AssetBundle`](https://github.com/flutter/flutter/blob/0833929c997c8a9db11c1e0df9a731ab17b77606/packages/flutter_tools/lib/src/asset.dart#L80) class contains two members, `entries` and `entryKinds`. `entries` contains asset data indexed by asset key. `entryKinds` contains the "kinds" of these assets, again indexed by asset key. **Change.** Rather than have two separate maps, this PR proposes combining these maps into one by wrapping the asset data and kind into a single data type `AssetBundleEntry`. **Purpose.** In https://github.com/flutter/flutter/pull/141194, I am considering associating more information with an asset. In particular, what transformers are meant to be applied to it when copying it to the build output. Rather than adding another map member onto `AssetBundle` (e.g. `entryTransformers`), I decided to make things neater by introducing the `AssetBundleEntry` type.
-
Christopher Fujino authored
Part of https://github.com/flutter/flutter/issues/85160
-
Ian Hickson authored
This is part 1 of a broken down version of the #140101 refactor.
-
Lau Ching Jun authored
This is used when the native assets are built by a separate build system. Context: b/286799303
-
hangyu authored
fixes: https://github.com/flutter/flutter/issues/142012
-
Qun Cheng authored
Fixes #141347 This PR is to add a "clear text" tooltip for the clear button on `SearchAnchor`'s search view and also add a `clearButtonTooltip` entry for `material_localizations`.
-
Michael Goderbauer authored
Fixes https://github.com/flutter/flutter/issues/141606. OverflowBar doesn't do any clipping and therefore there's no need to specify a clip behavior.
-
Bruno Leroux authored
## Description This PR adds the share button to text selection toolbar buttons on Android ~~and iOS~~ for `SelectableRegion` (and therefore `SelectionArea`). https://github.com/flutter/flutter/pull/139479 adds this button for `EditableText` (which is used by `TextField` and `SelectableText` but not by `SelectionArea`). **Edit**: supporting this on iOS will need more work (see https://github.com/flutter/flutter/pull/141447#issuecomment-1889942622 and https://github.com/flutter/flutter/issues/141775). ## Related Issue Follow up for https://github.com/flutter/flutter/issues/138728 ## Tests Adds 1 test.
-
Ian Hickson authored
This is part 2 of a broken down version of the #140101 refactor. This particular change wasn't in that original refactor but is a note to myself so that I remember how to test each of these changes in the future.
-
Ian Hickson authored
-
auto-submit[bot] authored
Reverts flutter/flutter#141541 Initiated by: yusuf-goog This change reverts the following previous change: Original Description: This PR introduces the first app in this repo that fully uses Gradle Kotlin DSL. It also fixes a bug I found in the process – fields of `FlutterExtensions` must be `public`.
-
- 22 Jan, 2024 14 commits
-
-
Justin McCandless authored
Explains what a "floating cursor" is in the docs.
-
Gustl22 authored
Part of #137040 and #80374 - Rename _filterPluginsByPlatform to _createPluginMapOfPlatform - Move method in chronological order - Cleanup platform strings
-
Bartek Pacia authored
This PR introduces the first app in this repo that fully uses Gradle Kotlin DSL. It also fixes a bug I found in the process â fields of `FlutterExtensions` must be `public`.
-
-
Jesús S Guerrero authored
Reverts flutter/flutter#141533 b/321743868
-
Matan Lurey authored
Fixes https://github.com/flutter/flutter/issues/141823 Before this change, when a test would fail, the terminal would hang (by default for 30s) until killed by the test runner. Basically, [`runZonedGuarded`](https://api.flutter.dev/flutter/dart-async/runZonedGuarded.html) _does_ document (though not clearly) that a returned future should not be awaited: ```txt The zone will always be an error-zone ([Zone.errorZone](https://api.flutter.dev/flutter/dart-async/Zone/errorZone.html)), so returning a future created inside the zone, and waiting for it outside of the zone, will risk the future not being seen to complete. ``` For example, you can see other places in Dart and Flutter that we circumvent that problem: - https://github.com/flutter/flutter/blob/5987563e4aecb34fca446ea804943bb8d27d8fcd/packages/flutter_tools/test/general.shard/base/async_guard_test.dart#L279-L306 - https://github.com/dart-lang/dartdoc/blob/b04c9c127fea5f3fdf600aa205f50d81d1c779c5/lib/src/dartdoc.dart#L258-L264 - https://github.com/flutter/engine/blob/d1afda52d254f5f1faf79e51fe430d912d6db3ee/lib/web_ui/dev/browser_process.dart#L20-L22 I'm open to suggestions on how to test this :) /cc @natebosch @jakemac53 @lrhn if you have any color commentary for us.
-
Greg Spencer authored
## Description This removes an unneeded expectation in the test for the AppLifecycleListener. It's unneeded because the test immediately resets the state anyhow. I'm removing it because the web implementation sets the value when initializing, so it's never initially null there. ## Related PR - https://github.com/flutter/engine/pull/44720#issuecomment-1898482363
-
Jonas Uekötter authored
It's confusing that `debugPrint` also prints in release mode, given that a lot (most?) other things prefixed with `debug` don't do anything in release mode. Therefore, this adds some documentation that this is indeed logging in release mode and adds an example how to disable this. *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
-
Taha Tesser authored
fixes [Null-check operator on RangeSlider's _startSemanticsNode](https://github.com/flutter/flutter/issues/141953)
-
Hassan Toor authored
When a `TextField` is rendered before a `Navigator`, it breaks in semantics mode. This is because the framework generates the incorrect semantics tree (excludes the TextField) and when that tree gets sent to the engine, we don't get the signal to create the corresponding `<input>` element. This happens for a few reasons: * `ModalBarrier` uses `BlockSemantics` to drop the semantics of routes beneath the current route in `Navigator` * `ModalBarrier` mistakenly recognizes the widget outside of the `Navigator` to be its sibling * So we end up dropping the semantics node of the `TextField` rendered before it. The fix is to let `Navigator` generate a semantics node so that `ModalBarrier` doesn't mistakenly think widgets outside of `Navigator` are its siblings. `Navigator` doesn't currently do this, which causes all the nodes generated from its widget subtree to be directly attached to the parent semantics node above `Navigator` - since this is also the parent of `TextField`, it considers them siblings. Fixes https://github.com/flutter/flutter/issues/129324
-
Tess Strickland authored
This PR adds the Dart VM `vm:platform-const-if` pragma introduced in https://github.com/dart-lang/sdk/commit/57a1168875 to the `defaultTargetPlatform` property, allowing it to be computed as if it was a constant field in non-debug AOT builds. In particular, this means that platform-specific code executed conditionally based on this property can be tree-shaken in release builds. Note that this PR changes `defaultTargetPlatform` to only allow overriding via `debugDefaultTargetPlatformOverride` in debug builds, and makes it so that compilation throws an error if code assigns to`debugDefaultTargetPlatformOverride` in other build modes. Related issue: #14233 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] All existing and new tests are passing.
-
Taha Tesser authored
This updates the previous attempt https://github.com/flutter/flutter/pull/135855 and removes the complications when testing M3 ink sparkle effect. Thanks to this [PR](https://github.com/flutter/flutter/pull/138757) by @Piinks fixes [ExpansionTile InkSplash doesn't respect Shape's borderRadius](https://github.com/flutter/flutter/issues/125779) fixes [`ExpansionTile.backgroundColor` & `ExpansionTile.collapsedBackgroundColor` removes splash effect](https://github.com/flutter/flutter/issues/107113) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return const MaterialApp( debugShowCheckedModeBanner: false, home: Example(), ); } } class Example extends StatelessWidget { const Example({super.key}); @override Widget build(BuildContext context) { return const Scaffold( body: Center( child: Padding( padding: EdgeInsets.symmetric(horizontal: 24.0), child: ExpansionTile( collapsedBackgroundColor: Color(0x25ff0000), backgroundColor: Color(0x250000ff), collapsedShape: RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(30.0)), side: BorderSide(color: Colors.black, width: 2.0), ), shape: RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(30.0)), side: BorderSide(color: Colors.black, width: 2.0), ), clipBehavior: Clip.hardEdge, title: Text('Expansion Tile'), children: <Widget>[ FlutterLogo(size: 50), FlutterLogo(size: 50), FlutterLogo(size: 50), FlutterLogo(size: 50), ], ), )), ); } } ``` </details> ### Before <img width="789" alt="Screenshot 2024-01-18 at 18 16 15" src="https://github.com/flutter/flutter/assets/48603081/8c6a6f1e-6986-4acf-8dec-e223a682c0d7"> <img width="789" alt="Screenshot 2024-01-18 at 18 16 44" src="https://github.com/flutter/flutter/assets/48603081/f55f6a26-2128-48a1-b24d-3c14e4f6ecdc"> ### After <img width="789" alt="Screenshot 2024-01-18 at 18 20 27" src="https://github.com/flutter/flutter/assets/48603081/7ec8b888-7319-460d-8488-9cd44c9246a6"> <img width="789" alt="Screenshot 2024-01-18 at 18 20 53" src="https://github.com/flutter/flutter/assets/48603081/80d66d5b-7eb2-4f47-ab4d-d7f469a731fa">
-
Daco Harkes authored
Fixes https://github.com/flutter/flutter/issues/141827 Reland: https://dart-review.googlesource.com/c/sdk/+/346960 has rolled into g3, so the imports should now resolve in g3 as well. > [!CAUTION] > _Do NOT merge if "Google Testing" bot didn't run!_ Rolls the packages from https://github.com/dart-lang/native in the native assets implementation. Most notable we're refactoring `package:native_assets_cli` for `build.dart` use. Therefore, all imports to that package for Flutter/Dart should be to the implementation internals that are no longer visible for `build.dart` writers. Hence all the import updates. No behavior in Flutter apps should change. This PR also updates the template to use the latests version of `package:native_assets_cli` which no longer exposes all the implementation details.
-
Taha Tesser authored
Updated unit tests for `ToggleButtons`, `ExpansionPanel`, and `ExpandIcon` to have M2 and M3 versions. More info in #139076
-
- 21 Jan, 2024 2 commits
-
-
Christopher Fujino authored
Fixes https://github.com/flutter/flutter/issues/141743 I should have made this change in https://github.com/flutter/flutter/pull/124039, but it escaped my grep search.
-
林洵锋 authored
On `Podfile`: ```ruby flutter_application_path = '../flutter_module' load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb') target 'OCProject' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! # Pods for OCProject # install_all_flutter_pods(flutter_application_path) # install_flutter_engine_pod(flutter_application_path) # install_flutter_application_pod(flutter_application_path) install_flutter_plugin_pods(flutter_application_path) end post_install do |installer| flutter_post_install(installer) end ``` Encountering the following error after executing `pod install`: ```shell pod install [!] Invalid `Podfile` file: undefined method `flutter_relative_path_from_podfile' for #<Pod::Podfile:0x000000010e74c520 @defined_in_file=#<Pathname:/Users/lxf/gitHub/flutter_hybrid_bug/OCProject/Podfile>, @internal_hash={}, @root_target_definitions=[#<Pod::Podfile::TargetDefinition label=Pods>], @current_target_definition=#<Pod::Podfile::TargetDefinition label=Pods>> relative = flutter_relative_path_from_podfile(export_script_directory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^. # from /Users/lxf/gitHub/flutter_hybrid_bug/OCProject/Podfile:17 # ------------------------------------------- # # install_flutter_plugin_pods(flutter_application_path) > install_flutter_application_pod(flutter_application_path) # # ------------------------------------------- ``` The `flutter_relative_path_from_podfile` method is in `flutter_tools/bin/podhelper.rb`, but now `flutter_tools/bin/podhelper.rb` is only required in `install_all_flutter_pods` in `podhelper.rb.tmpl`. Sometimes we only need to use the `install_flutter_plugin_pods` method in podhelper.rb. For example, using `Shorebird` in an iOS hybird app scenario, we need to build `Flutter.xcframework` and `App.xcframework` and embed them into the iOS native project. In order to avoid unnecessary conflicts, use `install_flutter_plugin_pods` method to install Flutter plugin pods. [Shorebird - Code Push In Hybrid Apps](https://docs.shorebird.dev/guides/hybrid-app/ios) So I adjust the position of `require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)`.
-
- 20 Jan, 2024 1 commit
-
-
LongCatIsLooong authored
Remove more `textScaleFactor` references from flutter/flutter. - Some changes are related to label scaling: the padding EdgeInsets values of some chip subclasses scale linearly between predetermined "max" padding values and "min" padding values. Before they scale with the `textScaleFactor` scalar, now they scale with the font size and are still capped at the original "max" and "min" values. - The rest of them are tests or size heuristics that depend on `textScaleFactor`, these are replaced by an effective text scale factor computed using a default font size (which is determined in a pretty random fashion, but it will only make a difference on Android 14+). No API changes in this batch. There are still some references left that I intend to remove in a different batch that would introduce API changes.
-
- 19 Jan, 2024 5 commits
-
-
Taha Tesser authored
fixes [Disabled chips with `onDeleted` callback shows "Delete" tooltip on hover](https://github.com/flutter/flutter/issues/141336) ### Code sample <details> <summary>expand to view the code sample</summary> ```dart import 'package:flutter/material.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return const MaterialApp( debugShowCheckedModeBanner: false, home: Example(), ); } } class Example extends StatefulWidget { const Example({super.key}); @override State<Example> createState() => _ExampleState(); } class _ExampleState extends State<Example> { bool _isEnable = false; @override Widget build(BuildContext context) { return Scaffold( body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: <Widget>[ RawChip( label: const Text('RawChip'), onPressed: () {}, isEnabled: _isEnable, onDeleted: () {}, ), FilterChip( label: const Text('FilterChip'), selected: false, onSelected: _isEnable ? (bool value) {} : null, onDeleted: () {}, ), InputChip( label: const Text('InputChip'), isEnabled: _isEnable, onDeleted: () {}, ), ], ), ), floatingActionButton: FloatingActionButton.extended( onPressed: () { setState(() { _isEnable = !_isEnable; }); }, label: Text(_isEnable ? 'Disable' : 'Enable'), ), ); } } ``` </details> ### Preview | Before | After | | --------------- | --------------- | | <img src="https://github.com/flutter/flutter/assets/48603081/f80ae5f7-0a6d-4041-ade3-cbc2b5c78188" height="450" /> | <img src="https://github.com/flutter/flutter/assets/48603081/04e62854-e3f1-4b65-9753-183d288f3cfe" height="450" /> |
-
Qun Cheng authored
-
Reid Baker authored
packages Roller breakage https://ci.chromium.org/ui/p/flutter/builders/try/Linux_android%20android_build_all_packages%20master/5504/overview Fixes flutter/flutter/issues/141897 ``` FAILURE: Build failed with an exception. * Where: Script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 168 * What went wrong: Could not compile script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy'. > startup failed: script '/b/s/w/ir/x/w/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy': 168: primitive type parameters not allowed here; solution: use the corresponding wrapper type, such as Integer for int @ line 168, column 41. e static final Map<String, int> ABI_VERS ``` Covered by tests in packages.
-
Daco Harkes authored
Packages the native assets for iOS and MacOS in frameworks. Issue: * https://github.com/flutter/flutter/issues/140544 * https://github.com/flutter/flutter/issues/129757 ## Details * [x] This packages dylibs from the native assets feature in frameworks. It packages every dylib in a separate framework. * [x] The dylib name is updated to use `@rpath` instead of `@executable_path`. * [x] The dylibs for flutter-tester are no longer modified to change the install name. (Previously it was wrongly updating the install name to the location the dylib would have once deployed in an app.) * [x] Use symlinking on MacOS.
-
Ian Hickson authored
Revert "Make tests more resilient to Skia gold failures and refactor flutter_goldens for extensive technical debt removal (#140101)" (#141814) Reverts https://github.com/flutter/flutter/pull/140101 That PR somehow made non-matching gold tests not fail at HEAD. Fixes https://github.com/flutter/flutter/issues/141880 - Blocked by https://github.com/flutter/flutter/issues/140169 - https://github.com/flutter/flutter/pull/141427
-