1. 15 Dec, 2023 2 commits
  2. 14 Dec, 2023 9 commits
  3. 13 Dec, 2023 3 commits
  4. 12 Dec, 2023 2 commits
  5. 11 Dec, 2023 9 commits
  6. 08 Dec, 2023 3 commits
    • Michael Goderbauer's avatar
      Add Overlay.wrap for convenience (#139823) · 1d5e23a2
      Michael Goderbauer authored
      Towards https://github.com/flutter/flutter/issues/137875.
      
      The convenient `Overlay.wrap` function makes it easy to wrap a child with an Overlay so other visual elements can float on top of the child. This is useful if you want to get things like text selection working (i.e. with a SelectionArea) without using a Navigator.
      1d5e23a2
    • Bruno Leroux's avatar
      Add 'Share' button to the selection toolbar on Android (#139479) · e070417a
      Bruno Leroux authored
      ## Description
      
      This PR adds the 'Share' button to the text selection toolbar on Android.
      
      ## Related Issue
      
      Fixes https://github.com/flutter/flutter/issues/138728
      
      ## Tests
      
      Refactor a lot of existing tests in order to:
      - make them more readable (avoid duplication by introducing helper functions, specify explictly check which buttons are expected).
      - make them more accurate (check that expected buttons are visible instead of just checking the number of buttons).
      
      For instance, previous tests contained sections such as:
      
      ```dart
      
            // Collapsed toolbar shows 3 buttons.
            expect(
              find.byType(CupertinoButton),
              isContextMenuProvidedByPlatform ? findsNothing : isTargetPlatformIOS ? findsNWidgets(6) : findsNWidgets(3)
            );
      
      ```
      
      Where the comment is obsolete, the two cases (6 widgets and 3 widgets) are not explicit (which buttons are expected?), and not accurate (will pass if the number of buttons is right but the buttons are the wrong ones).
      e070417a
    • Ian Hickson's avatar
      Animate TextStyle.fontVariations (#138881) · c6741614
      Ian Hickson authored
      Fixes https://github.com/flutter/flutter/issues/105120
      
      I also exposed the relevant dart:ui types which had the effect of removing a large number of dart:ui imports from examples.
      c6741614
  7. 07 Dec, 2023 8 commits
  8. 06 Dec, 2023 4 commits
    • Qun Cheng's avatar
      Remove deprecated parameters from `ElevatedButton.styleFrom()`,... · 2230c091
      Qun Cheng authored
      Remove deprecated parameters from `ElevatedButton.styleFrom()`, `OutlinedButton.styleFrom()`, and `TextButton.styleFrom()` (#139267)
      
      2230c091
    • Ian Hickson's avatar
      Roll dependencies (#139606) · fca7bc9e
      Ian Hickson authored
      test-exempt: rolling dependencies
      fca7bc9e
    • Taha Tesser's avatar
      Add `AnimationStyle` to `ExpansionTile` (#139664) · f794cf9d
      Taha Tesser authored
      fixes [Expose animation parameters for the [ExpansionTile] widget](https://github.com/flutter/flutter/issues/138047)
      
      ### Description
      Add `AnimationStyle` to the `ExpansionTile` widget to override the default expand and close animation.
      
      Syntax:
      ```dart
              child: ExpansionTile(
                title: const Text('Tap to expand'),
                expansionAnimationStyle: AnimationStyle(
                  duration: Durations.extralong1,
                  curve: Easing.emphasizedAccelerate,
                ),
                children: const <Widget>[FlutterLogo(size: 200)],
              ),
      ```
      
      ### Code sample
      
      <details>
      <summary>expand to view the code sample</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:flutter/material.dart';
      
      /// Flutter code sample for [ExpansionTile] and [AnimationStyle].
      
      void main() {
        runApp(const ExpansionTileAnimationStyleApp());
      }
      
      enum AnimationStyles { defaultStyle, custom, none }
      const List<(AnimationStyles, String)> animationStyleSegments = <(AnimationStyles, String)>[
        (AnimationStyles.defaultStyle, 'Default'),
        (AnimationStyles.custom, 'Custom'),
        (AnimationStyles.none, 'None'),
      ];
      
      class ExpansionTileAnimationStyleApp extends StatefulWidget {
        const ExpansionTileAnimationStyleApp({super.key});
      
        @override
        State<ExpansionTileAnimationStyleApp> createState() => _ExpansionTileAnimationStyleAppState();
      }
      
      class _ExpansionTileAnimationStyleAppState extends State<ExpansionTileAnimationStyleApp> {
        Set<AnimationStyles> _animationStyleSelection = <AnimationStyles>{AnimationStyles.defaultStyle};
        AnimationStyle? _animationStyle;
      
        @override
        Widget build(BuildContext context) {
          return MaterialApp(
            home: Scaffold(
              body: SafeArea(
                child: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    SegmentedButton<AnimationStyles>(
                      selected: _animationStyleSelection,
                      onSelectionChanged: (Set<AnimationStyles> styles) {
                        setState(() {
                          _animationStyleSelection = styles;
                          switch (styles.first) {
                            case AnimationStyles.defaultStyle:
                              _animationStyle = null;
                            case AnimationStyles.custom:
                              _animationStyle = AnimationStyle(
                                curve: Easing.emphasizedAccelerate,
                                duration: Durations.extralong1,
                              );
                            case AnimationStyles.none:
                              _animationStyle = AnimationStyle.noAnimation;
                          }
                        });
                      },
                      segments: animationStyleSegments
                        .map<ButtonSegment<AnimationStyles>>(((AnimationStyles, String) shirt) {
                          return ButtonSegment<AnimationStyles>(value: shirt.$1, label: Text(shirt.$2));
                        })
                        .toList(),
                    ),
                    const SizedBox(height: 20),
                    ExpansionTile(
                      expansionAnimationStyle: _animationStyle,
                      title: const Text('ExpansionTile'),
                      children: const <Widget>[
                        ListTile(title: Text('Expanded Item 1')),
                        ListTile(title: Text('Expanded Item 2')),
                      ],
                    )
                  ],
                ),
              ),
            ),
          );
        }
      }
      ```
      
      </details>
      
      Related to https://github.com/flutter/flutter/pull/138721.
      f794cf9d
    • Taha Tesser's avatar
      Update `Tooltip` tests for Material 3 (#139145) · 3c8700c2
      Taha Tesser authored
      Updated unit tests for `Tooltip` to have M2 and M3 versions.
      
      More info in #139076
      3c8700c2