838 Commits

Author SHA1 Message Date
Binni Goel
77c19f50c1
Test cover cupertino for memory leaks and fix Opacity Layer not disposed. (#136576) 2023-10-15 12:26:52 -07:00
Binni Goel
0f5550461e
Test cover cupertino for memory leaks tracking -2 (#136577) 2023-10-15 12:25:27 -07:00
Kostia Sokolovskyi
2c3db435a8
_RouterState should dispose created _RestorableRouteInformation. (#136556)
### Description
- Fixes https://github.com/flutter/flutter/issues/134205.

### Tests
- Removes ignoring the `_RestorableRouteInformation` leak from `cupertino/app_test.dart`;
- Removes ignoring the `_RestorableRouteInformation` leak from `material/app_test.dart`;
- Removes ignoring the `_RestorableRouteInformation` leak from `widgets/app_test.dart`;
- Removes ignoring the `_RestorableRouteInformation` leak from `widgets/route_notification_messages_test.dart`;
- Removes ignoring the `_RestorableRouteInformation` leak from `widgets/router_restoration_test.dart`;
- Updates `widgets/router_test.dart` to use `testWidgetsWithLeakTracking`.
2023-10-14 02:58:17 +00:00
Polina Cherkasova
ad05949971
Fix flakiness: finalize dropped gestures in tests to release resources, and update doc-comment. (#136136) 2023-10-10 18:11:23 -07:00
Polina Cherkasova
74f8b4f777
Allow leaks around tap down/up, while flackiness is not fixed. (#136133) 2023-10-07 11:22:53 -07:00
derdilla
1437aa2c7b
Cover some cupertino tests with leak tracking (#135230) 2023-10-02 17:44:50 -06:00
derdilla
397da0649a
leak track tab_scaffold_test.dart (#135309) 2023-10-02 17:39:47 -06:00
Kostia Sokolovskyi
ff68b62599
Fix a couple of CupertinoTextField tests to avoid leak-tracking test failures. (#135851) 2023-10-02 15:29:37 -06:00
derdilla
783672588b
Test cover cupertino text field for memory leaks. (#135804) 2023-10-01 19:41:59 -07:00
derdilla
71acf24201
leak track page_test.dart (#135352) 2023-10-01 16:45:02 -07:00
derdilla
994f71c267
Leak track cupertino widgets (#135353) 2023-10-01 16:42:45 -07:00
LongCatIsLooong
6a9df55d9f
Add a basic golden test for CupertinoTextSelectionToolbar (#135267)
Goden tests are easier to understand than `paints..` since the toolbar has a relatively complex path, and this should make PRs that make visual changes easier to review. 

The current goldens don't look correct since I messed up the y offset of the tip of the arrow when the arrow is pointing up. Should be fixed in https://github.com/flutter/flutter/pull/133386
2023-09-25 04:37:02 +00:00
Tomasz Gucio
0377e80de8
Size CupertinoTextSelectionToolbar to children (#133386) 2023-09-22 07:49:06 +02:00
Kostia Sokolovskyi
ffecedbca4
Cover more test/widgets tests with leak tracking #11 (#135231) 2023-09-21 16:30:32 -07:00
derdilla
beeb3ce923
Cover some cupertino tests with leak tracing (#135149) 2023-09-21 06:30:21 -07:00
Bruno Leroux
07cc3f7a61
Form fields onChange callback should be called on reset (#134295)
## Description

This PR fixes form fields in order to call the `onChange` callback when the form is reset.

This change is based on the work done in https://github.com/flutter/flutter/pull/123108.

I considered adding the `onChange` callback to the `FormField` superclass but it would break existing code because two of the three subclasses defines the `onChange` callback with `ValueChanged<String>?` type and the third one defines it with `ValueChanged<String?>?`. 

## Related Issue

Fixes https://github.com/flutter/flutter/issues/123009.

## Tests

Adds 3 tests.
2023-09-21 05:54:19 +00:00
derdilla
a96bf714cb
Cover cupertino/form_section_test with leak tracing (#135158) 2023-09-20 13:29:41 -07:00
Polina Cherkasova
658710b6f9
Cover more tests with leak tracking. (#134805) 2023-09-18 13:45:38 -07:00
Kostia Sokolovskyi
854bbb901c
Fix memory leak in CupertinoActionSheet (#134885) 2023-09-16 14:59:13 -07:00
LongCatIsLooong
b2f3404ca0
Remove Path.combine call from CupertionoTextSelectionToolbar (#134369)
Hopefully this fixes https://github.com/flutter/flutter/issues/110076 by removing the `Path.combine` call. Not sure how I can verify in a test that `Path.combine` is not called.
2023-09-13 23:27:13 +00:00
LongCatIsLooong
804a7b285f
Make CupertinoTextField at least as tall as its first line of placeholder (#134198)
Fixes https://github.com/flutter/flutter/issues/133241
and some CupertinoTextField cleanup.
2023-09-08 16:52:57 +00:00
Polina Cherkasova
61a388a448
Fix not disposed items in Cupertino app and route. (#134085) 2023-09-06 09:14:57 -07:00
Justin McCandless
dfd4147cea
Fix stuck predictive back platform channel calls (#133368)
Fix a Google test flakiness increase.
2023-08-28 09:23:52 -07:00
Justin McCandless
f68d03f1cd
Reland root predictive back (#132249)
Root predictive back (https://github.com/flutter/flutter/pull/120385) was reverted in https://github.com/flutter/flutter/pull/132167.  This PR is an attempt to reland it.

The reversion happened due to failed Google tests (b/295073110).
2023-08-17 23:55:05 +00:00
LouiseHsu
3f34b480c8
[Framework] Add Share to selection controls (#132599)
In native iOS, users are able to select text and initiate a share menu, which provides several standard services, such as copy, sharing to social media, direct ability to send to various contacts through messaging apps, etc. 

https://github.com/flutter/engine/assets/36148254/d0af7034-31fd-412e-8636-a06bbff54765

This PR is the framework portion of the changes that will allow Share to be implemented.
The corresponding merged engine PR is [here](https://github.com/flutter/engine/pull/44554)
This PR addresses https://github.com/flutter/flutter/issues/107578
More details are available in this [design doc](https://github.com/flutter/engine/pull/flutter.dev/go/add-missing-features-to-selection-controls)
2023-08-17 23:36:11 +00:00
Renzo Olivares
0e15ab54d1
Triple tap selection should not move beyond text boundary at the tapped location (#132357)
This PR makes sure we do not select beyond the text boundary at the tapped position unless, we tap at the end of the text which in that case we should select the previous text boundary.

```dart
    // if x is a boundary defined by `textBoundary`, most textBoundaries (except
    // LineBreaker) guarantees `x == textBoundary.getLeadingTextBoundaryAt(x)`.
    // Use x - 1 here to make sure we don't get stuck at the fixed point x.
    final int start = textBoundary.getLeadingTextBoundaryAt(extent.offset - 1) ?? 0;
```

This was originally carried over from f468f3366c/packages/flutter/lib/src/widgets/editable_text.dart (L4167-L4179) which used this `x - 1` to be able to move to the previous word boundary when navigating with a keyboard. When selecting by tapping/clicking we do not want to move past the text boundary at the tapped position so this adjustment is not needed.

Fixes #132126
2023-08-16 23:05:16 +00:00
LongCatIsLooong
3f831b694f
Making TextPainter rounding hack disabled by default (#132094)
Migrate tests in flutter/flutter. Once the tests here and in `*_customer_testing` are migrated, the default value of the migration flag will be changed from false to true, making the rounding hack disabled by default.
2023-08-10 00:30:52 +00:00
Jesús S Guerrero
2728ba0f23
Revert of #120385 (#132167)
Breaking google testing 
revert of: https://github.com/flutter/flutter/pull/120385
b/295065534
2023-08-08 16:16:52 -07:00
LouiseHsu
d9cb50e63d
[framework] Add Search Web to selection controls for iOS (#131898)
This PR adds framework support for the Search Web feature in iOS. 

https://github.com/flutter/flutter/assets/36148254/c159f0d9-8f14-45e7-b295-e065b0826fab

The corresponding merged engine PR can be found [here](https://github.com/flutter/engine/pull/43324).
This PR addresses https://github.com/flutter/flutter/issues/82907 
More details are available in this [design doc](https://docs.google.com/document/d/1QizXwBiO-2REIcEovl5pK06BaLPOWYmNwOE5jactJZA/edit?resourcekey=0-1pb9mJiAq29Gesmt25GAug)
2023-08-08 17:34:17 +00:00
Kate Lovett
f054f5aa09
Move mock canvas to flutter_test (#131631)
Fixes https://github.com/flutter/flutter/issues/59413

This relocates `mock_canvas.dart` and `recording_canvas.dart` from `flutter/test/rendering` to `flutter_test`. 

The testing functionality afforded by mock_canvas should be available to everyone, not just the framework. :)

mock_canvas.dart needed a bit of cleanup - things like formatting and super parameters.
2023-08-07 23:43:03 +00:00
xhzq233
ff5b0e1457
CupertinoContextMenu improvement (#131030)
Fixes overlapping gestures in CupertinoContextMenu's subtree
2023-08-07 09:30:21 -07:00
Justin McCandless
dedd100ebd
Predictive back support for root routes (#120385)
This PR aims to support Android's predictive back gesture when popping the entire Flutter app.  Predictive route transitions between routes inside of a Flutter app will come later.

<img width="200" src="https://user-images.githubusercontent.com/389558/217918109-945febaa-9086-41cc-a476-1a189c7831d8.gif" />

### Trying it out

If you want to try this feature yourself, here are the necessary steps:

  1. Run Android 33 or above.
  1. Enable the feature flag for predictive back on the device under "Developer
     options".
  1. Create a Flutter project, or clone [my example project](https://github.com/justinmc/flutter_predictive_back_examples).
  1. Set `android:enableOnBackInvokedCallback="true"` in
     android/app/src/main/AndroidManifest.xml (already done in the example project).
  1. Check out this branch.
  1. Run the app. Perform a back gesture (swipe from the left side of the
     screen).

You should see the predictive back animation like in the animation above and be able to commit or cancel it.

### go_router support

go_router works with predictive back out of the box because it uses a Navigator internally that dispatches NavigationNotifications!

~~go_router can be supported by adding a listener to the router and updating SystemNavigator.setFrameworkHandlesBack.~~

Similar to with nested Navigators, nested go_routers is supported by using a PopScope widget.

<details>

<summary>Full example of nested go_routers</summary>

```dart
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:go_router/go_router.dart';

import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';

void main() => runApp(_MyApp());

class _MyApp extends StatelessWidget {
  final GoRouter router = GoRouter(
    routes: <RouteBase>[
      GoRoute(
        path: '/',
        builder: (BuildContext context, GoRouterState state) => _HomePage(),
      ),
      GoRoute(
        path: '/nested_navigators',
        builder: (BuildContext context, GoRouterState state) => _NestedGoRoutersPage(),
      ),
    ],
  );

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routerConfig: router,
    );
  }
}

class _HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Nested Navigators Example'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text('Home Page'),
            const Text('A system back gesture here will exit the app.'),
            const SizedBox(height: 20.0),
            ListTile(
              title: const Text('Nested go_router route'),
              subtitle: const Text('This route has another go_router in addition to the one used with MaterialApp above.'),
              onTap: () {
                context.push('/nested_navigators');
              },
            ),
          ],
        ),
      ),
    );
  }
}

class _NestedGoRoutersPage extends StatefulWidget {
  @override
  State<_NestedGoRoutersPage> createState() => _NestedGoRoutersPageState();
}

class _NestedGoRoutersPageState extends State<_NestedGoRoutersPage> {
  late final GoRouter _router;
  final GlobalKey<NavigatorState> _nestedNavigatorKey = GlobalKey<NavigatorState>();

  // If the nested navigator has routes that can be popped, then we want to
  // block the root navigator from handling the pop so that the nested navigator
  // can handle it instead.
  bool get _popEnabled {
    // canPop will throw an error if called before build. Is this the best way
    // to avoid that?
    return _nestedNavigatorKey.currentState == null ? true : !_router.canPop();
  }

  void _onRouterChanged() {
    // Here the _router reports the location correctly, but canPop is still out
    // of date.  Hence the post frame callback.
    SchedulerBinding.instance.addPostFrameCallback((Duration duration) {
      setState(() {});
    });
  }

  @override
  void initState() {
    super.initState();

    final BuildContext rootContext = context;
    _router = GoRouter(
      navigatorKey: _nestedNavigatorKey,
      routes: [
        GoRoute(
          path: '/',
          builder: (BuildContext context, GoRouterState state) => _LinksPage(
            title: 'Nested once - home route',
            backgroundColor: Colors.indigo,
            onBack: () {
              rootContext.pop();
            },
            buttons: <Widget>[
              TextButton(
                onPressed: () {
                  context.push('/two');
                },
                child: const Text('Go to another route in this nested Navigator'),
              ),
            ],
          ),
        ),
        GoRoute(
          path: '/two',
          builder: (BuildContext context, GoRouterState state) => _LinksPage(
            backgroundColor: Colors.indigo.withBlue(255),
            title: 'Nested once - page two',
          ),
        ),
      ],
    );

    _router.addListener(_onRouterChanged);
  }

  @override
  void dispose() {
    _router.removeListener(_onRouterChanged);
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return PopScope(
      popEnabled: _popEnabled,
      onPopped: (bool success) {
        if (success) {
          return;
        }
        _router.pop();
      },
      child: Router<Object>.withConfig(
        restorationScopeId: 'router-2',
        config: _router,
      ),
    );
  }
}

class _LinksPage extends StatelessWidget {
  const _LinksPage ({
    required this.backgroundColor,
    this.buttons = const <Widget>[],
    this.onBack,
    required this.title,
  });

  final Color backgroundColor;
  final List<Widget> buttons;
  final VoidCallback? onBack;
  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: backgroundColor,
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(title),
            //const Text('A system back here will go back to Nested Navigators Page One'),
            ...buttons,
            TextButton(
              onPressed: onBack ?? () {
                context.pop();
              },
              child: const Text('Go back'),
            ),
          ],
        ),
      ),
    );
  }
}
```

</details>

### Resources

Fixes https://github.com/flutter/flutter/issues/109513
Depends on engine PR https://github.com/flutter/engine/pull/39208 ✔️ 
Design doc: https://docs.google.com/document/d/1BGCWy1_LRrXEB6qeqTAKlk-U2CZlKJ5xI97g45U7azk/edit#
Migration guide: https://github.com/flutter/website/pull/8952
2023-08-04 20:44:44 +00:00
LouiseHsu
f019789565
[framework] Add Look Up to selection controls for iOS (#131798)
This PR adds framework support for the Look Up feature in iOS. 

https://github.com/flutter/flutter/assets/36148254/d301df79-4e23-454f-8742-2f8e39c2960c

The corresponding merged engine PR can be found [here](https://github.com/flutter/engine/pull/43308).
This PR addresses https://github.com/flutter/flutter/issues/82907 
More details are available in this [design doc.](flutter.dev/go/add-missing-features-to-selection-controls)

This is the same PR as https://github.com/flutter/flutter/pull/130532, this is an attempt to fix the Google Testing issue
2023-08-02 20:20:39 +00:00
LongCatIsLooong
b2e22d3558
Replaces textScaleFactor with TextScaler (#128522)
Deprecate `textScaleFactor` in favor of `textScaler`, in preparation for Android 14 [Non-linear font scaling to 200%](https://developer.android.com/about/versions/14/features#non-linear-font-scaling). The `TextScaler` class can be moved to `dart:ui` in the future, if we decide to use the Android platform API or AndroidX to get the scaling curve instead of hard coding the curve in the framework.

I haven't put the Flutter version in the deprecation message so the analyzer checks are failing. Will do so after I finish the migration guide.

**Why `TextScaler.textScaleFactor`**
The author of a `TextScaler` subclass should provide a fallback `textScaleFactor`. By making `TextScaler` also contain the `textScaleFactor` information it also makes it easier to migrate: if a widget overrides `MediaQueryData.textScaler` in the tree, for unmigrated widgets in the subtree it would also have to override `MediaQueryData.textScaleFactor`, and that makes it difficult to remove `MediaQueryData.textScaleFactor` in the future.

## A full list of affected APIs in this PR

Deprecated: The method/getter/setter/argument is annotated with a `@Deprecated()` annotation in this PR, and the caller should replace it with `textScaler` instead. Unless otherwise specified there will be a Flutter fix available to help with migration but it's still recommended to migrate case-by-case.
**Replaced**:  The method this `textScaleFactor` argument belongs to is rarely called directly by user code and is not overridden by any of the registered custom tests, so the argument is directly replaced by `TextScaler`.
**To Be Deprecated**:  The method/getter/setter/argument can't be deprecated in this PR because a registered customer test depends on it and a Flutter fix isn't available (or the test was run without applying flutter fixes first). This method/getter/setter/argument will be deprecated in a followup PR once the registered test is migrated.

### `Painting` Library

| Affected API | State of `textScaleFactor` | Comment | 
| --- | --- | --- |
| `InlineSpan.build({ double textScaleFactor = 1.0 })` argument | **Replaced** | | 
| `TextStyle.getParagraphStyle({ double TextScaleFactor = 1.0 })` argument | **Replaced** | |
| `TextStyle.getTextStyle({ double TextScaleFactor = 1.0 })`  argument| Deprecated | Can't replace: c47fd38dca/super_editor/lib/src/infrastructure/super_textfield/desktop/desktop_textfield.dart (L1903-L1905)|
| `TextPainter({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | |
| `TextPainter.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet |
| `TextPainter.computeWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | |
| `TextPainter.computeMaxIntrinsicWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | |

### `Rendering` Library

| Affected API | State of `textScaleFactor` | Comment | 
| --- | --- | --- |
| `RenderEditable({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | |
| `RenderEditable.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet |
| `RenderParagraph({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | |
| `RenderParagraph.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet |

### `Widgets` Library

| Affected API | State of `textScaleFactor` | Comment | 
| --- | --- | --- |
| `MediaQueryData({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | cd7b93532e/packages/flutter_markdown/test/text_scale_factor_test.dart (LL39C21-L39C35) |
| `MediaQueryData.textScaleFactor` getter | Deprecated | |
| `MediaQueryData.copyWith({ double? TextScaleFactor })` argument | Deprecated | |
| `MediaQuery.maybeTextScaleFactorOf(BuildContext context)` static method | Deprecated | No Flutter Fix, not expressible yet  |
| `MediaQuery.textScaleFactorOf(BuildContext context)` static method | **To Be Deprecated** | cd7b93532e/packages/flutter_markdown/lib/src/_functions_io.dart (L68-L70), No Flutter Fix, not expressible yet |
| `RichText({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | cd7b93532e/packages/flutter_markdown/lib/src/builder.dart (L829-L843) |
| `RichText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away|
| `Text({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | 914d120da1/packages/rfw/lib/src/flutter/core_widgets.dart (L647) , No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 |
| `Text.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 |
| `Text.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away |
| `EditableText({ double? TextScaleFactor = 1.0 })` constructor argument | Deprecated | No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 |
| `EditableText.textScaleFactor` getter | Deprecated | |

### `Material` Library

| Affected API | State of `textScaleFactor` | Comment | 
| --- | --- | --- |
| `SelectableText({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | cd7b93532e/packages/flutter_markdown/lib/src/builder.dart (L829-L843), No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 |
| `SelectableText.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 |
| `SelectableText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away |

A lot of material widgets (`Slider`, `RangeSlider`, `TimePicker`, and different types of buttons) also change their layout based on `textScaleFactor`. These need to be handled in a case-by-case fashion and will be migrated in follow-up PRs.
2023-07-17 17:56:07 +00:00
LongCatIsLooong
f2574ba1de
Use the new rounding hack migration flag in TextPainter (#130548) 2023-07-14 21:12:24 +00:00
Gil Nobrega
a189d95ac2
Reland [a11y] CupertinoSwitch On/Off labels (#130173)
This original PR (https://github.com/flutter/flutter/pull/127776) was reverted (https://github.com/flutter/flutter/pull/130166) due to a Google test failure.

This reopens the PR as per the discussion in https://github.com/flutter/flutter/pull/130166#issuecomment-1626105218.

Fixes issue #4830.
2023-07-12 20:50:18 +00:00
Jesús S Guerrero
acb0855432
Revert "[a11y] CupertinoSwitch On/Off labels" (#130166)
Reverts flutter/flutter#127776
Currently breaking google testing
2023-07-07 20:04:00 +00:00
Gil Nobrega
4f6c887751
[a11y] CupertinoSwitch On/Off labels (#127776)
Adds optional visual labels to Cupertino's on/off switch for accessibility.
2023-07-06 11:18:13 -07:00
luckysmg
e0ad12969f
[framework] Add textField OCR support for framework side (#96637)
iOS OCR keyboard input support.
2023-07-06 08:51:06 -07:00
Hans Muller
26ad4a4a79
Updated some golden image tests for M2/M3 (#129794)
Updated some of the golden image tests that were temporarily changed in https://github.com/flutter/flutter/pull/128914 to have M2 and M3 versions. 

Updated the linear_gradient_0 example to M3 (which will require updating its golden image as well).

More info in https://github.com/flutter/flutter/issues/127064
2023-06-30 18:09:56 +00:00
Luccas Clezar
a90c33fd61
iOS TextSelectionToolbar fidelity (#127757)
CupertinoTextSelectionToolbar is different from the native one, with some UI and UX issues. More details on the linked issue.

https://github.com/flutter/flutter/issues/127756

Currently the only problem that I listed on the linked issue that I couldn't fix was the horizontal scrolling, but to workaround this I added a GestureDetector to change pages when swiping the toolbar. It's not exactly the same as native as there is no scroll animation, but it works.

I'm creating this PR a little early to have some feedback as these changes were more complex than the ones in my last PR. Probably best if @justinmc is involved 😅

|Version|Video|
|-|-|
|Flutter Old|<video src="https://github.com/flutter/flutter/assets/12024080/7cf81075-46ec-4970-b118-cc27b60ddac0"></video>|
|Flutter New|<video src="https://github.com/flutter/flutter/assets/12024080/c9e27a53-f94c-4cb0-9b76-e47b73841dcb"></video>|
|Native|<video src="https://github.com/flutter/flutter/assets/12024080/468c7d5b-ba93-4bd4-8f6e-8ec2644b9866"></video>|
2023-06-27 17:50:07 +00:00
Qun Cheng
c3b2175a40
Update golden tests (#128914) 2023-06-15 13:09:43 -07:00
Kate Lovett
a3ddead1a4
Remove scrollbar deprecations isAlwaysShown and hoverThickness (#127351)
The deprecated `[RawScrollbar/Scrollbar/CupertinoScrollbar/ScrollbarThemeData].isAlwaysShown` has expired and is removed in thi PR.
Also, `Scrollbar.hoverThickness` is also removed after having expired.

The replacement for `isAlwaysShown` is `thumbVisibility`. This deprecation was introduced in #96957. The name change came from new behaviors like a track that is conditionally visible. Since the original API only referred to the thumb, the name was changed to reflect this intention. This change is supported by dart fix. ✅ 

The replacement for `hoverThickness` is `ScrollbarThemeData.thickness`, which is a MaterialStateProperty that allows for the thickness to respond to multiple states including hover. This deprecation was introduced in #97173. This change is not supported by dart fix. 😞  

Part of https://github.com/flutter/flutter/issues/127042
2023-06-05 21:15:32 +00:00
LongCatIsLooong
43de3365f5
Remove rounding from TextPainter (#127099)
To opt-in, run the tests with: `SKPARAGRAPH_REMOVE_ROUNDING_HACK=1 flutter test --dart-define=SKPARAGRAPH_REMOVE_ROUNDING_HACK=1 `

Migration plans:
1. Turn the flags on in CI, migrate customer tests if needed
1. Migrate internal customers
2. Remove the flag from skparagraph. Remove the framework flag with a manual engine roll.

Also fixes https://github.com/flutter/flutter/issues/52038
2023-05-26 00:09:51 +00:00
Mitchell Goodwin
678f40cf04
Add checkmark style to CupertinoRadio (#126480)
Fixes: #102813

Adds a checkmark style to the Cupertino Radio. Also allows the Radio.adaptive and RadioListTile.adaptive widgets to control whether they use the checkmark style for their Cupertino widgets or not.

This is how it looks in action:

https://github.com/flutter/flutter/assets/58190796/b409b270-42dd-404a-9350-d2c3e1d7fa4e
2023-05-16 21:54:20 +00:00
st merlhin
6753a852d0
expose CupertinoDatePicker and CupertinoTimerPicker itemExtent … (#125852)
…property

This PR expose `CupertinoDatePicker` and `CupertinoTimerPicker` `itemExtent` property to allow setting custom one depending on `tMediaQuery.of(context).textScaleFactor`.
Fixes: #125127
2023-05-16 16:30:08 +00:00
Tomasz Gucio
99c7e9f088
Add spaces after flow control statements (#126320) 2023-05-15 11:07:30 +02:00
nt4f04uNd
ae82f3cbce
Fix crash from invalid ListWheelViewport assertion (#126539)
Fixes https://github.com/flutter/flutter/issues/126491
2023-05-13 04:08:05 +00:00
Taha Tesser
b9e3aef239
Add FocusNode, onFocusChange, and autofocus to CupertinoSwitch (#126684)
fixes https://github.com/flutter/flutter/issues/126679 

### Description
Control cupertino widgets like `CupertinoCheckbox` and `CupertinoRadio` have `focusNode` and `autofocus`, while these are missing in `CupertinoSwitch`.

This is blocking https://github.com/flutter/flutter/issues/126637 
(`switch.dart` currently maintains its focus node for `CupertinoSwitch` when using `Switch.adaptive` which causes a bug)
2023-05-12 17:12:20 +00:00
Justin McCandless
6ffcc9e55a
Hide the context menu on tap down (#126295)
Desktop text selection toolbar no longer flashes before closing.
2023-05-12 10:04:27 -07:00