21978 Commits

Author SHA1 Message Date
Taha Tesser
90c524dcdf
Update chip docs to clarify how to specify a shape with no border & explain default values for Material 3 (#134298)
fixes [Update chip docs for Material 3 defaults.](https://github.com/flutter/flutter/issues/134296)

Addresses a [comment](https://github.com/flutter/flutter/pull/133856#discussion_r1313513284) from @HansMuller as well
2023-09-08 19:41:18 +00:00
chunhtai
f851e7faf0
Add ios analyzer command for universal links (#134155)
ios version of https://github.com/flutter/flutter/pull/131009/files
2023-09-08 19:22:44 +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
Greg Spencer
3ce6174e6b
Update links to iOS embedder docs to point to new Doxygen docs (#134246)
## Description

Now that we are using Doxygen for building docs for the embedders, this updates the links to point to the correct URLs.

## Related Issues
 - https://github.com/flutter/flutter/issues/124833

## Related PRs
 - https://github.com/flutter/engine/pull/45561
2023-09-08 16:42:50 +00:00
Taha Tesser
bb8de2167a
Fix Drawer examples are missing dartpad tag (#134219)
fixes [`Drawer` examples are misssing `dartpad` tag]( https://github.com/flutter/flutter/issues/134217)

these examples were updated in https://github.com/flutter/flutter/pull/130523
2023-09-08 08:14:05 +00:00
Polina Cherkasova
3ff0beb5fa
_TabBarViewState should dispose created instances of PageController. (#134091) 2023-09-07 17:50:45 -07:00
Polina Cherkasova
237ddcc339
Remove non needed controllers in SegmentedButton. (#134064) 2023-09-07 17:50:23 -07:00
Polina Cherkasova
161c7090ff
EditableTextState should dispose cursorVisibilityNotifier. (#133858) 2023-09-07 17:49:59 -07:00
Polina Cherkasova
0d30546c74
TestWidgetsFlutterBinding should dispose old RestorationManager on reset. (#133999) 2023-09-07 17:49:33 -07:00
Polina Cherkasova
cc95ace32c
CupertinoAlertDialog should not create ScrollController on every build, if null values are passed in constructor. (#134075)
Relanding of https://github.com/flutter/flutter/pull/134071

Verified failed tests succeeded now:
2023-09-07 23:59:58 +00:00
Polina Cherkasova
1c0b4ad53a
_SearchBarState should dispose FocusNode, if it created it. (#134076)
Relanding of revert: https://github.com/flutter/flutter/pull/134072

Verified failed tests succeeded now:
2023-09-07 23:27:12 +00:00
Gray Mackall
827b5dff02
[integration_test] Allow capture of screenshots for FlutterFragmentActivitys (#132406)
Fixes https://github.com/flutter/flutter/issues/89683.

The changes to `getFlutterView` in `FlutterDeviceScreenshot` are the fix that was required, everything else was done to get tests running (such as re-generating some lockfiles and modifying the android manifest).

The code was all currently not unit tested, and there were no other easy examples to base these java unit tests off in flutter/flutter, so let me know if this approach to testing is wrong.
2023-09-07 22:32:48 +00:00
Taha Tesser
30234a00ee
Fix ExpansionTile properties cannot be updated with setState (#134218)
fixes [`ExpansionTile` properties aren't updated with `setState`](https://github.com/flutter/flutter/issues/24493)

### 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> {
  ShapeBorder collapsedShape = const RoundedRectangleBorder(
    borderRadius: BorderRadius.all(Radius.circular(4)),
  );
  Color collapsedTextColor = const Color(0xffffffff);
  Color collapsedBackgroundColor = const Color(0xffff0000);
  Color collapsedIconColor = const Color(0xffffffff);
  ShapeBorder shape = const RoundedRectangleBorder(
    borderRadius: BorderRadius.all(Radius.circular(16)),
  );
  Color backgroundColor = const Color(0xffff0000);
  Color textColor = const Color(0xffffffff);
  Color iconColor = const Color(0xffffffff);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Padding(
          padding: const EdgeInsets.symmetric(horizontal: 16.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ExpansionTile(
                shape: shape,
                backgroundColor: backgroundColor,
                textColor: textColor,
                iconColor: iconColor,
                collapsedShape: collapsedShape,
                collapsedTextColor: collapsedTextColor,
                collapsedBackgroundColor: collapsedBackgroundColor,
                collapsedIconColor: collapsedIconColor,
                title: const Text('Collapsed ExpansionTile'),
                children: const [
                  ListTile(
                    title: Text('Revealed!'),
                  ),
                ],
              ),
              const SizedBox(height: 16),
              ExpansionTile(
                shape: shape,
                backgroundColor: backgroundColor,
                textColor: textColor,
                iconColor: iconColor,
                initiallyExpanded: true,
                title: const Text('Expanded ExpansionTile'),
                children: const [
                  ListTile(
                    title: Text('Revealed!'),
                  ),
                ],
              ),
              const SizedBox(height: 16),
              FilledButton(
                onPressed: () {
                  setState(() {
                    collapsedShape = const RoundedRectangleBorder(
                      borderRadius: BorderRadius.all(Radius.circular(50)),
                    );
                    collapsedTextColor = const Color(0xfff00000);
                    collapsedBackgroundColor = const Color(0xffffff00);
                    collapsedIconColor = const Color(0xfff00000);

                    shape = const RoundedRectangleBorder();
                    backgroundColor = const Color(0xfffff000);
                    textColor = const Color(0xfff00000);
                    iconColor = const Color(0xfff00000);
                  });
                },
                child: const Text('Update properties'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
```

</details> 

### Before

https://github.com/flutter/flutter/assets/48603081/b29aed98-38ff-40a3-9ed3-c4342ada35b6

### After

https://github.com/flutter/flutter/assets/48603081/5e0b6a34-c577-40ed-8456-7ef55caa277b
2023-09-07 21:55:32 +00:00
Polina Cherkasova
12e6ff2c54
DropdownRoutePage should dispose the created ScrollController. (#133941) 2023-09-07 11:30:43 -07:00
Kostia Sokolovskyi
aca91df6b7
Cover some test/widgets tests with leak tracking (#133803) 2023-09-07 11:24:29 -07:00
Polina Cherkasova
0d198c7ba6
SearchDelegate should dispose resources. (#133948) 2023-09-07 11:13:55 -07:00
Matheus Kirchesch
2867b31f5e
Fixed [NavigationRailDestination]'s label opacity while disabled not being coherent with the icon (#132345)
Fixing the opacity of the NavigationRailDestination widget label while
it is disabled, right now it doesn't get affected by the disabled
attribute, which doesn't match the icon that gets affected

* https://github.com/flutter/flutter/issues/132344

I believe this PR should be marked as [test-exempt]

## 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.
2023-09-07 10:21:52 -07:00
Taha Tesser
f5355af4a3
Fix TabBar doesn't use labelStyle & unselectedLabelStyle color (#133989)
Fixes [TabBar labelStyle.color and unselectedLabelStyle.color does not take effect](https://github.com/flutter/flutter/issues/109484)

### Code sample

<details>
<summary>expand to view the code sample</summary> 

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

/// Flutter code sample for [TabBar].

const Color labelColor = Color(0xFFFF0000);
const Color unselectedLabelColor = Color(0x95FF0000);
const TextStyle labelStyle = TextStyle(
  color: Color(0xff0000ff),
  fontWeight: FontWeight.bold,
);
const TextStyle unselectedLabelStyle = TextStyle(
  color: Color(0x950000ff),
  fontStyle: FontStyle.italic,
);

void main() => runApp(const TabBarApp());

class TabBarApp extends StatelessWidget {
  const TabBarApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(useMaterial3: true),
      home: const TabBarExample(),
    );
  }
}

class TabBarExample extends StatelessWidget {
  const TabBarExample({super.key});

  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
      initialIndex: 1,
      length: 3,
      child: Scaffold(
        appBar: AppBar(
          title: const Text('TabBar Sample'),
          bottom: const TabBar(
            // labelColor: labelColor,
            // unselectedLabelColor: unselectedLabelColor,
            labelStyle: labelStyle,
            unselectedLabelStyle: unselectedLabelStyle,
            tabs: <Widget>[
              Tab(
                icon: Icon(Icons.cloud_outlined),
                text: 'Cloudy',
              ),
              Tab(
                icon: Icon(Icons.beach_access_sharp),
                text: 'Sunny',
              ),
              Tab(
                icon: Icon(Icons.brightness_5_sharp),
                text: 'Rainy',
              ),
            ],
          ),
        ),
        body: const TabBarView(
          children: <Widget>[
            Center(
              child: Text("It's cloudy here"),
            ),
            Center(
              child: Text("It's rainy here"),
            ),
            Center(
              child: Text("It's sunny here"),
            ),
          ],
        ),
      ),
    );
  }
}
```

</details>

#### When `labelStyle` and `unselectedLabelStyle` are specified with a color.

### Before
![image](https://github.com/flutter/flutter/assets/48603081/4138f928-aa63-40bc-9d4e-4d2aeefe72c1)

### After

![image](https://github.com/flutter/flutter/assets/48603081/2ce552c5-3972-4b5d-9492-eb487764e58f)
2023-09-07 09:19:05 +00:00
Taha Tesser
75797a8a7e
Fix DataTable's headingTextStyle & dataTextStyle are not merged with default text style (#134138)
fixes [Inconsistent text color on DataTable in different platforms](https://github.com/flutter/flutter/issues/114470)

### Code sample

<details>
<summary>expand to view the code sample</summary> 

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

/// Flutter code sample for [DataTable].

void main() => runApp(const DataTableExampleApp());

class DataTableExampleApp extends StatelessWidget {
  const DataTableExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      themeMode: ThemeMode.dark,
      theme: ThemeData(),
      darkTheme: ThemeData.dark(),
      home: Scaffold(
        appBar: AppBar(title: const Text('DataTable Sample')),
        body: const DataTableExample(),
      ),
    );
  }
}

class DataTableExample extends StatelessWidget {
  const DataTableExample({super.key});

  @override
  Widget build(BuildContext context) {
    return DataTable(
      headingTextStyle: const TextStyle(),
      dataTextStyle: const TextStyle(),
      columns: const <DataColumn>[
        DataColumn(
          label: Expanded(
            child: Text(
              'Name',
              style: TextStyle(fontStyle: FontStyle.italic),
            ),
          ),
        ),
        DataColumn(
          label: Expanded(
            child: Text(
              'Age',
              style: TextStyle(fontStyle: FontStyle.italic),
            ),
          ),
        ),
        DataColumn(
          label: Expanded(
            child: Text(
              'Role',
              style: TextStyle(fontStyle: FontStyle.italic),
            ),
          ),
        ),
      ],
      rows: const <DataRow>[
        DataRow(
          cells: <DataCell>[
            DataCell(Text('Sarah')),
            DataCell(Text('19')),
            DataCell(Text('Student')),
          ],
        ),
        DataRow(
          cells: <DataCell>[
            DataCell(Text('Janine')),
            DataCell(Text('43')),
            DataCell(Text('Professor')),
          ],
        ),
        DataRow(
          cells: <DataCell>[
            DataCell(Text('William')),
            DataCell(Text('27')),
            DataCell(Text('Associate Professor')),
          ],
        ),
      ],
    );
  }
}

```

</details>

### Before

| Desktop | Mobile |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/19c3908d-6b6a-4408-9c6b-da83c8efaa4a"  /> | <img src="https://github.com/flutter/flutter/assets/48603081/efda08fb-05f9-437e-be5c-6b6861babe19" width="350"  /> |

### After

| Desktop | Mobile |
| --------------- | --------------- |
| <img src="https://github.com/flutter/flutter/assets/48603081/6bd3433f-d61f-4f35-8a2a-f7539a74f93e" /> | <img src="https://github.com/flutter/flutter/assets/48603081/5123a79b-6c2a-4bea-9fbc-64ed3e599826" width="350" /> |
2023-09-07 08:55:53 +00:00
Taha Tesser
ded8b8e31c
Reland "Fix Chip.shape's side is not used when provided in Material 3" (#133856)
fixes [Chip border side color not working in Material3](https://github.com/flutter/flutter/issues/132922)
Relands https://github.com/flutter/flutter/pull/132941 with an updated fix and a regression test.

<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 MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(useMaterial3: true),
      home: const Example(),
    );
  }
}

class Example extends StatelessWidget {
  const Example({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Chips'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: <Widget>[
            const RawChip(
              shape: RoundedRectangleBorder(
                side: BorderSide(color: Colors.amber),
              ),
              side: BorderSide(color: Colors.red),
              label: Text('RawChip'),
            ),
            const Chip(
              shape: RoundedRectangleBorder(
                side: BorderSide(color: Colors.amber),
              ),
              side: BorderSide(color: Colors.red),
              label: Text('Chip'),
            ),
            ActionChip(
              shape: const RoundedRectangleBorder(
                side: BorderSide(color: Colors.amber),
              ),
              side: const BorderSide(color: Colors.red),
              label: const Text('ActionChip'),
              onPressed: () {},
            ),
            FilterChip(
              shape: const RoundedRectangleBorder(
                side: BorderSide(color: Colors.amber),
              ),
              side: const BorderSide(color: Colors.red),
              label: const Text('FilterChip'),
              onSelected: (value) {},
            ),
            ChoiceChip(
              shape: const RoundedRectangleBorder(
                side: BorderSide(color: Colors.amber),
              ),
              side: const BorderSide(color: Colors.red),
              label: const Text('ChoiceChip'),
              selected: false,
              onSelected: (value) {},
            ),
            InputChip(
              shape: const RoundedRectangleBorder(
                side: BorderSide(color: Colors.amber),
              ),
              side: const BorderSide(color: Colors.red),
              label: const Text('InputChip'),
              onSelected: (value) {},
            ),
          ],
        ),
      ),
    );
  }
}
```

</details>

<img src="https://github.com/flutter/flutter/assets/48603081/f713fd84-cf9a-4e52-8cdb-5faba63d8e91" height="450" /> <img src="https://github.com/flutter/flutter/assets/48603081/a142efc7-041e-4e6e-87cf-e6c4ebe735f3" height="450" />

<img src="https://github.com/flutter/flutter/assets/48603081/377df55b-499f-403f-96c5-0be0334795dc" height="450" /> <img src="https://github.com/flutter/flutter/assets/48603081/731a2752-7822-4605-8e9c-db0a71dd6f08" height="450" />
2023-09-07 07:58:00 +00:00
Polina Cherkasova
1f0730e67a
DraggableScrollableActuator should dispose notifier. (#133917) 2023-09-06 22:07:07 +00:00
Polina Cherkasova
420aa9f7f1
Clean the fixed TODOs. (#133859)
https://github.com/flutter/flutter/issues/130354 is fixed, but the test still fails, so converted it back to 'testWidgets' to investigate later.
2023-09-06 20:10:56 +00:00
Burak İmdat
cd9a257d74
Fix subtitleTextStyle.color isn't applied to the ListTile.subtitle in Material 2 (#133422)
The difference between header text style and subtitle text style and the reason why it doesn't work is the code difference below. If we make the subtitle text style the same as the title text style it will work

<details>
  <summary>Title Text Style</summary>
  
  ###  All Code
  
  ```dart
  TextStyle titleStyle = titleTextStyle
      ?? tileTheme.titleTextStyle
      ?? defaults.titleTextStyle!;
    final Color? titleColor = effectiveColor;
    titleStyle = titleStyle.copyWith(
      color: titleColor,
      fontSize: _isDenseLayout(theme, tileTheme) ? 13.0 : null,
    );
    final Widget titleText = AnimatedDefaultTextStyle(
      style: titleStyle,
      duration: kThemeChangeDuration,
      child: title ?? const SizedBox(),
    );
  ```
  
  ## Different Code Section
  
  ```dart
  final Color? titleColor = effectiveColor;
  ```
</details>

<details>
  <summary>Subtitle Text Style</summary>
  
  ## All Code
  
  ```dart
  subtitleStyle = subtitleTextStyle
        ?? tileTheme.subtitleTextStyle
        ?? defaults.subtitleTextStyle!;
      final Color? subtitleColor = effectiveColor
        ?? (theme.useMaterial3 ? null : theme.textTheme.bodySmall!.color);
      subtitleStyle = subtitleStyle.copyWith(
        color: subtitleColor,
        fontSize: _isDenseLayout(theme, tileTheme) ? 12.0 : null,
      );
      subtitleText = AnimatedDefaultTextStyle(
        style: subtitleStyle,
        duration: kThemeChangeDuration,
        child: subtitle!,
      );
  ```
  
  ## Different Code Section
  
  ```dart
  final Color? subtitleColor = effectiveColor
        ?? (theme.useMaterial3 ? null : theme.textTheme.bodySmall!.color);
  ```

### Description for code 
- The value `theme.textTheme.bodySmall!.color` is given because the `effectiveColor` value is `null` and the `theme.useMaterial3` value is `false`
</details>

<details>
  <summary>Problem solved code</summary>
  
  ## All Code
  
  ```dart
  subtitleStyle = subtitleTextStyle
        ?? tileTheme.subtitleTextStyle
        ?? defaults.subtitleTextStyle!;
      final Color? subtitleColor = effectiveColor;
      subtitleStyle = subtitleStyle.copyWith(
        color: subtitleColor,
        fontSize: _isDenseLayout(theme, tileTheme) ? 12.0 : null,
      );
      subtitleText = AnimatedDefaultTextStyle(
        style: subtitleStyle,
        duration: kThemeChangeDuration,
        child: subtitle!,
      );
  ```
</details>

<details>
<summary>Screenshot of the result after making the necessary change</summary>
<img src="https://github.com/flutter/flutter/assets/70351342/b552fd4c-fdcd-4bf5-b4ba-d6b2cfe527cc" width=250>
</details>

#133412

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
2023-09-06 18:54:45 +00:00
Tirth
b0e5a5ca67
Add CheckedPopupMenuItem.onTap callback (#134000)
Adds parent prop `onTap` to CheckedPopupMenuItem.

Fixes #127800
2023-09-06 18:33:00 +00:00
Polina Cherkasova
ee0a15d4f5
MinimumTextContrastGuideline should dispose image. (#133861) 2023-09-06 11:00:56 -07:00
Christopher Fujino
195dca02c0
[flutter_tools] Fix "FormatException: Invalid date format" during version freshness check (#134088)
Fixes https://github.com/flutter/flutter/issues/134067
2023-09-06 17:22:13 +00:00
Polina Cherkasova
61a388a448
Fix not disposed items in Cupertino app and route. (#134085) 2023-09-06 09:14:57 -07:00
Polina Cherkasova
03b60ac75b
_DropdownMenuState should dispose TextEditingController. (#133914) 2023-09-06 08:12:10 -07:00
Victoria Ashworth
6c5642167f
Retry connecting to device in CI after lost connection (#133769)
Sometimes `ios-deploy` loses connection to the device after installing, starting debugserver, and launching. This is shown with an error message like:
```
Process 579 exited with status = -1 (0xffffffff) lost connection
```
This happens frequently in our CI system: https://github.com/flutter/flutter/issues/120808

Usually in CI, on retry it'll work and pass - so this is an attempt to retry without failing the test first. It's not guaranteed to fix since we're unable to recreate this error locally.
2023-09-05 21:48:50 +00:00
Polina Cherkasova
a425e56252
Revert "CupertinoAlertDialog should not create ScrollController on every build, if null values are passed in constructor." (#134071)
Reverts flutter/flutter#133918 as it causes build failures.
2023-09-05 21:03:54 +00:00
Polina Cherkasova
e30f9c4218
Revert "_SearchBarState should dispose FocusNode, if it created it." (#134072)
Reverts flutter/flutter#133947 as it causes build failures.
2023-09-05 21:03:53 +00:00
Tong Mu
e66ec8e0b0
Dispose AnimationSheetRecorder to avoid leaks (#133365)
This PR adds `AnimationSheetRecorder.dispose`, which disposes all the images generated by the recorder, eliminating leaks.

Fixes https://github.com/flutter/flutter/issues/133071.
2023-09-05 20:49:05 +00:00
Polina Cherkasova
a7dbec31f1
Cover more tests with leak tracking. (#133958) 2023-09-05 13:45:12 -07:00
Polina Cherkasova
7625c10f44
_MaterialAppState should dispose MaterialHeroController. (#133951) 2023-09-05 13:41:10 -07:00
Polina Cherkasova
af1b7494d8
RenderParagraph should dispose instances of SelectableFragments. (#133915) 2023-09-05 13:40:14 -07:00
Polina Cherkasova
c9f70e9fd2
_SearchBarState should dispose FocusNode, if it created it. (#133947) 2023-09-05 13:12:28 -07:00
Polina Cherkasova
7cdf314d06
CupertinoAlertDialog should not create ScrollController on every build, if null values are passed in constructor. (#133918) 2023-09-05 13:01:51 -07:00
Polina Cherkasova
cb0a613ec6
SegmentedButton should not create new MaterialStatesController in every build. (#133949) 2023-09-05 11:00:22 -07:00
Christopher Fujino
85bece2689
[flutter_tools] Fix TypeError when a FileSystemException happens during flutter doctor (#133373)
Fixes https://github.com/flutter/flutter/issues/133086
2023-09-05 18:00:07 +00:00
Renzo Olivares
ef9befc9da
Reland leak fix for EditableTextState (#133806)
Relands: https://github.com/flutter/flutter/pull/131377
Reverted in: https://github.com/flutter/flutter/pull/133804
2023-09-03 18:23:20 +00:00
Zachary Anderson
3896912d44
Fix for new analyzer lint (#133923)
For https://github.com/flutter/flutter/issues/133922
2023-09-02 12:47:28 -07:00
Polina Cherkasova
248645a2b2
RestorableProperty should dispatch creation in constructor. (#133883) 2023-09-01 17:59:25 -07:00
Polina Cherkasova
a3362a9ff8
MaterialStatesController should dispatch creation in constructor. (#133826)
This PR also updates other tests to use matcher.
2023-09-01 17:29:47 -07:00
Polina Cherkasova
80f737d1e0
Mark leak in _DayPickerState. (#133863) 2023-09-01 17:10:41 -07:00
Renzo Olivares
b1f691c9fc
Remove deprecated TestWindow.platformBrightnessTestValue/TestWindow.clearPlatformBrightnessTestValue (#133178)
Part of: https://github.com/flutter/flutter/issues/133171
2023-09-01 20:35:58 +00:00
Renzo Olivares
959cdb79fb
Remove deprecated TestWindow.textScaleFactorTestValue/TestWindow.clearTextScaleFactorTestValue (#133176)
Part of: https://github.com/flutter/flutter/issues/133171
2023-09-01 20:31:16 +00:00
Polina Cherkasova
78ff1226c9
Test cover more tests with leak tracking. (#133828) 2023-09-01 08:53:53 -07:00
chunhtai
0f3bd90d9b
Adds a parent scope TraversalEdgeBehavior and fixes modal route to no… (#130841)
…t trap the focus

fixes https://github.com/flutter/flutter/issues/112567

Several things I done:

1. add new enum `parentScope`
2. refactor _sortAllDescendants so that it doesn't recursively looking
into its descendant when it encounter a FocusScopeNode.
3. When the nextFocus try to focus into a FocusScopeNode, it will try to
find the first focusable FocusNode in traversal order and focus it
instead if it doesn't have a first focus.
4. Change the default in Navigator to always be `parentScope`
5. Only the root navigator will use `leaveFlutterView` if platform is
web.


Previously 2 and 3 are not needed because once a focusscope trapped the
focus, there isn't a chance where the parent focusscope have to deal
with next focus.

If we don't do 2 and 3 after the change, it will cause it to stuck in
the current scope again. Because once the focus leave the current scope,
it needs to also remove the first focus in that scope (so that it can
start fresh when focus traversal back to the scope in the future). At
this point the current scope will have the primary focus without the
first focus. The parent scope will then try to find the next focus, and
it will place the focus to the first traversal child in the current
scope again.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [ ] I signed the [CLA].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-09-01 08:37:38 -07:00
Mark O'Sullivan
1b1c8a1607
Fixed PaginatedDataTable not using dataRowMinHeight and dataRowMaxHeight from Theme (#133634)
`PaginatedDataTable` will now make use of `dataRowMinHeight` and `dataRowMaxHeight` from the Theme

*List which issues are fixed by this PR. You must list at least one issue.*

Resolves #133633
2023-09-01 15:36:48 +00:00
Bruno Leroux
e326199923
Add more documentation for SystemChannels.keyboard getKeyboardState (#133663)
## Description

This PR adds some documentation to SystemChannels.keyboard getKeyboardState.
This method was added in https://github.com/flutter/flutter/pull/122885.

## Related Issue

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

## Tests

Documentation only.
2023-09-01 09:24:33 +00:00