1. 31 Oct, 2023 4 commits
  2. 28 Oct, 2023 4 commits
  3. 27 Oct, 2023 4 commits
    • Greg Spencer's avatar
      Add `isLogicalKeyPressed` to `KeyEvent` (#136856) · 5907c975
      Greg Spencer authored
      ## Description
      
      Adds some convenience methods to `KeyEvent` that allow testing to see if a logical or physical key is pressed from the event object. These are similar to the ones already on `RawKeyEvent`, and will make migration the to `KeyEvent` easier (so it could more easily be a `flutter fix` migration).
      
      Added:
      
      - `bool isLogicalKeyPressed(LogicalKeyboardKey key)`
      - `bool isPhysicalKeyPressed(PhysicalKeyboardKey key)`
      - `bool get isControlPressed`
      - `bool get isShiftPressed`
      - `bool get isAltPressed`
      - `bool get isMetaPressed`
      
      ## Related Issues
       - https://github.com/flutter/flutter/issues/136419
      
      ## Tests
       - Added tests for the new methods.
      5907c975
    • LongCatIsLooong's avatar
    • Todd Volkert's avatar
      Add ConstrainedLayoutBuilder.updateShouldRebuild() (#136691) · 37da62a6
      Todd Volkert authored
      This method controls whether the builder needs to be called again again even if the layout constraints are the same.
      
      By default, the builder will always be called when the widget is updated because the logic in the callback might have changed. However, there are cases where subclasses of ConstrainedLayoutBuilder know that certain property updates only affect paint and not build. In these cases, we lack a way of expressing that the builder callback is not needed -- and we end up doing superfluous work.
      
      This PR gives subclasses the ability to know exactly when the callback needs to be called and when it can be skipped.
      37da62a6
    • Binni Goel's avatar
      Fix. typos (#137325) · 9e04246c
      Binni Goel authored
      ## Description
      
      This PR fixes typos in 
      - `actions.dart`
      - `app_bar.dart`
      - `basic.dart`
      - `button_bar_theme.dart`
      9e04246c
  4. 26 Oct, 2023 4 commits
  5. 25 Oct, 2023 2 commits
  6. 24 Oct, 2023 2 commits
    • lirantzairi's avatar
      TextField - allow to customize cursor color in error state (#136121) · 7cd6fd43
      lirantzairi authored
      The color of the TextField's cursor in error state is the same as the error text color by default. However we should be allowed to customize it
      
      Fixes #135580
      7cd6fd43
    • cui fliter's avatar
      fix some typos (#137144) · c5e71b3e
      cui fliter authored
      *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*
      
      fix some typos
      
      *List which issues are fixed by this PR. You must list at least one issue.*
      
      *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
      c5e71b3e
  7. 23 Oct, 2023 7 commits
  8. 22 Oct, 2023 1 commit
    • Todd Volkert's avatar
      Add timeline events for post frame callbacks (#136435) · cb9a3f69
      Todd Volkert authored
      Before this change, long-running post-frame callbacks wouldn't show up in the timeline at all.  This adds a timeline event for post-frame callbacks, with a debug flag that will add timeline events for each individual callback.
      
      #testexempt -- we have no way to test calls to the timeline.
      cb9a3f69
  9. 20 Oct, 2023 1 commit
  10. 19 Oct, 2023 6 commits
  11. 18 Oct, 2023 5 commits
    • Greg Spencer's avatar
      Add code for updating `focusedChild` when removing grandchildren from scope (#136771) · 24922425
      Greg Spencer authored
      ## Description
      
      This adds code to make sure that grandchildren are removed from the `focusedChild` of a scope when the child is detached.
      
      ## Related Issues
       - Fixes https://github.com/flutter/flutter/issues/136758
      
      ## Tests
       - Added regression test.
      24922425
    • Greg Spencer's avatar
      Convert menus to use OverlayPortal (#130534) · 13a0d475
      Greg Spencer authored
      ## Description
      
      This converts the `MenuAnchor` class to use `OverlayPortal` instead of directly using the overlay.
      
      ## Related Issues
       - Fixes https://github.com/flutter/flutter/issues/124830
      
      ## Tests
       - No tests yet (hence it is a draft)
      13a0d475
    • chunhtai's avatar
    • Taha Tesser's avatar
      Fix `Slider` `onChanged` callback order & never calls `onChangeStart` on ... · 4f959b97
      Taha Tesser authored
      Fix `Slider` `onChanged` callback order & never calls `onChangeStart` on  `SliderInteraction.slideOnly` allowed interaction (#136720)
      
      fixes [Slider will call onChanged before onChangeStart when sliding.](https://github.com/flutter/flutter/issues/136707)
      
      This fixes a regression from https://github.com/flutter/flutter/pull/121483
      
      ### 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> {
        double _sliderValue = 0.5;
      
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            body: Center(
              child: Slider(
                // allowedInteraction: SliderInteraction.tapAndSlide,
                // allowedInteraction: SliderInteraction.tapOnly,
                // allowedInteraction: SliderInteraction.slideOnly
                // allowedInteraction: SliderInteraction.slideThumb,
                value: _sliderValue,
                onChangeStart: (newValue) {
                  print("onChangeStart ......");
                },
                onChanged: (newValue) {
                  print("onChanged ......");
                  setState(() {
                    _sliderValue = newValue;
                  });
                },
                onChangeEnd: (newValue) {
                  print("onChangeEnd ......");
                },
              ),
            ),
          );
        }
      }
      ```
      
      </details>
      4f959b97
    • Arash's avatar
      [Feat] Stroke color for Slider value indicator (#135986) · a9567313
      Arash authored
      Consider a scenario where the background color and indicator's background color are the same. 
      
      Adding a stroke color to the value indicator would be a valuable for the following reasons:
      - **Visual Clarity:** It would allow developers to make the value indicator stand out more against the background, making it easier for users to notice.
      - **Customization:** It would provide more flexibility in customizing the appearance of the sliding widget, allowing developers to match the design requirements of their apps.
      - **Accessibility:** Improved visual distinction can enhance the accessibility of the sliding widget for users with various needs.
      
      *List which issues are fixed by this PR. You must list at least one issue.*
      
      Fixes #135984
      a9567313