1. 22 Nov, 2023 1 commit
  2. 17 Nov, 2023 1 commit
  3. 15 Nov, 2023 1 commit
    • Srujan Gaddam's avatar
      Pin package:web 0.4.0 (#138428) · d8ffc739
      Srujan Gaddam authored
      This version is needed so that dart:js_interop can move to extension
      types. Also adds some code to handle some breaking changes:
      
      - Body -> Response. Body was an IDL interface mixin type we exposed in
      dart:html. Going forward, users should either use Request or Response.
      - Casts to JSAny. These are temporary until we move package:web types to
      extension types. Currently, package:web types can't implement JSObject
      as JSObject will move to be an extension type itself.
      Co-authored-by: 's avatarKevin Moore <kevmoo@users.noreply.github.com>
      d8ffc739
  4. 13 Nov, 2023 2 commits
  5. 10 Nov, 2023 1 commit
    • Nate Bosch's avatar
      Use merge-base in find_commit.dart (#138033) · fa3a37c7
      Nate Bosch authored
      Closes #97595
      
      The prior approach of manually diffing the entire log chain is less
      efficient, and only found the original branch point ignoring subsequent
      merges. The limitation forced PR workflows into rebasing and force
      pushing new history to get the branch point far enough for CI to pass.
      
      Use `git merge-base` to find the latest common commit with the main
      branch.
      Add an `allowFailure` argument to the `git` utility to use a more
      specific failure in the case of no shared history when this command will
      fail with a generic error.
      
      Use `^branch` with the `git log` commands to exclude shared history and
      more easily count the unique commits on each branch.
      
      Drop the `Commit` abstraction. Parse directly to timestamp or line counts.
      fa3a37c7
  6. 07 Nov, 2023 1 commit
    • Qun Cheng's avatar
      Adaptive `Switch` (#130425) · ed70f4e2
      Qun Cheng authored
      Currently, `Switch.factory` delegates to `CupertinoSwitch` when platform
      is iOS or macOS. This PR is to:
      * have the factory configure the Material `Switch` for the expected look
      and feel.
      * introduce `Adaptation` class to customize themes for the adaptive
      components.
      ed70f4e2
  7. 03 Nov, 2023 1 commit
  8. 02 Nov, 2023 1 commit
  9. 01 Nov, 2023 2 commits
  10. 31 Oct, 2023 1 commit
  11. 25 Oct, 2023 2 commits
  12. 24 Oct, 2023 1 commit
  13. 20 Oct, 2023 1 commit
  14. 19 Oct, 2023 1 commit
  15. 16 Oct, 2023 1 commit
  16. 13 Oct, 2023 1 commit
  17. 12 Oct, 2023 1 commit
  18. 11 Oct, 2023 1 commit
  19. 29 Sep, 2023 1 commit
  20. 20 Sep, 2023 2 commits
  21. 19 Sep, 2023 1 commit
    • Greg Spencer's avatar
      Remove 'must be non-null' and 'must not be null' comments from non-framework libraries (#134994) · 4ce7fdd9
      Greg Spencer authored
      ## Description
      
      This removes all of the comments that are of the form "so-and-so must not be null" or "so-and-so must be non-null" from the cases where those values are defines as non-nullable values.
      
      This PR removes them from the library in the repo that don't have anything to do with the framework.
      
      This was done by hand, since it really didn't lend itself to scripting, so it needs to be more than just spot-checked, I think. I was careful to leave any comment that referred to parameters that were nullable, but I may have missed some.
      
      In addition to being no longer relevant after null safety has been made the default, these comments were largely fragile, in that it was easy for them to get out of date, and not be accurate anymore anyhow.
      
      This did create a number of constructor comments which basically say "Creates a [Foo].", but I don't really know how to avoid that in a large scale change, since there's not much you can really say in a lot of cases.  I think we might consider some leniency for constructors to the "Comment must be meaningful" style guidance (which we de facto have already, since there are a bunch of these).
      
      ## Related PRs
      - https://github.com/flutter/flutter/pull/134984
      - https://github.com/flutter/flutter/pull/134991
      - https://github.com/flutter/flutter/pull/134992
      - https://github.com/flutter/flutter/pull/134993
      
      ## Tests
       - Documentation only change.
      4ce7fdd9
  22. 12 Sep, 2023 1 commit
  23. 30 Aug, 2023 2 commits
    • Taha Tesser's avatar
      Add `cancelButtonStyle` & `confirmButtonStyle` to the `DatePickerThemeData` (#132847) · 1e770c38
      Taha Tesser authored
      fixes [Unable to adjust the color for "Cancel" and "Ok" button in datePicker dialog](https://github.com/flutter/flutter/issues/127739)
      
      ### 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 MaterialApp(
            debugShowCheckedModeBanner: false,
            theme: ThemeData(
              useMaterial3: true,
              datePickerTheme: DatePickerThemeData(
                cancelButtonStyle: TextButton.styleFrom(
                  shape: const RoundedRectangleBorder(
                    borderRadius: BorderRadius.all(Radius.circular(16)),
                    side: BorderSide(color: Colors.red),
                  ),
                  backgroundColor: Colors.white,
                  foregroundColor: Colors.red,
                  elevation: 3,
                  shadowColor: Colors.red,
                ),
                confirmButtonStyle: TextButton.styleFrom(
                  shape: const RoundedRectangleBorder(
                    borderRadius: BorderRadius.all(Radius.circular(16)),
                  ),
                  backgroundColor: Colors.green[700],
                  foregroundColor: Colors.white,
                  elevation: 3,
                  shadowColor: Colors.green[700],
                ),
              ),
            ),
            home: const Example(),
          );
        }
      }
      
      class Example extends StatelessWidget {
        const Example({super.key});
      
        @override
        Widget build(BuildContext context) {
          return Scaffold(
            body: Center(
              child: DatePickerDialog(
                initialDate: DateTime.now(),
                firstDate: DateTime(2020),
                lastDate: DateTime(2030),
              ),
            ),
          );
        }
      }
      ``` 
      
      </details>
      
      ### Before 
      
      Not possible to customize action buttons from the `DatePickerThemeData`.
      
      ### After 
      
      ![Screenshot 2023-08-18 at 16 42 00](https://github.com/flutter/flutter/assets/48603081/4ec01e93-c661-491d-9253-d687da8b76f3)
      1e770c38
    • Xilai Zhang's avatar
      [flutter roll] Revert "Fix `Chip.shape`'s side is not used when provided in Material 3" (#133615) · 6fd42536
      Xilai Zhang authored
      Reverts flutter/flutter#132941
      context: b/298110031
      
      The rounded rectangle borders don't appear in some of the internal
      golden image tests.
      6fd42536
  24. 29 Aug, 2023 1 commit
  25. 28 Aug, 2023 1 commit
  26. 25 Aug, 2023 2 commits
    • Kenzie Davisson's avatar
      Update flutter packages to pick up latest vm_service (#133335) · 61d9f556
      Kenzie Davisson authored
      Generated by running `flutter update-packages --force-upgrade`
      61d9f556
    • Taha Tesser's avatar
      Fix `Chip.shape`'s side is not used when provided in Material 3 (#132941) · 612117a6
      Taha Tesser authored
      fixes [Chip border side color not working in Material3](https://github.com/flutter/flutter/issues/132922)
      
      ### 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 MaterialApp(
            theme: ThemeData(
              useMaterial3: true,
              chipTheme: const ChipThemeData(
                  // shape: RoundedRectangleBorder(
                  //   side: BorderSide(color: Colors.amber),
                  //   borderRadius: BorderRadius.all(Radius.circular(12)),
                  // ),
                  // side: BorderSide(color: Colors.red),
                  ),
            ),
            home: const Example(),
          );
        }
      }
      
      class Example extends StatelessWidget {
        const Example({super.key});
      
        @override
        Widget build(BuildContext context) {
          return const Scaffold(
            body: Center(
              child: RawChip(
                shape: RoundedRectangleBorder(
                  side: BorderSide(color: Colors.amber),
                  borderRadius: BorderRadius.all(Radius.circular(12)),
                ),
                // side: BorderSide(color: Colors.red),
                label: Text('Chip'),
              ),
            ),
          );
        }
      }
      
      ``` 
      
      </details>
      
      ---
      
      ### Before
      
      When `RawChip.shape` is provided with a `BorderSide`.
      
      ```dart
            body: Center(
              child: RawChip(
                shape: RoundedRectangleBorder(
                  side: BorderSide(color: Colors.amber),
                  borderRadius: BorderRadius.all(Radius.circular(12)),
                ),
                label: Text('Chip'),
              ),
            ),
      ```
      
      ![Screenshot 2023-08-24 at 17 54 54](https://github.com/flutter/flutter/assets/48603081/89e2c9b5-44c2-432e-97ff-8bb95b0d0fb1)
      
      When `RawChip.shape` is provided with a `BorderSide` and also `RawChip.side` is provided. The  `RawChip.side` overrides the shape's side.
      
      ```dart
            body: Center(
              child: RawChip(
                shape: RoundedRectangleBorder(
                  side: BorderSide(color: Colors.amber),
                  borderRadius: BorderRadius.all(Radius.circular(12)),
                ),
                side: BorderSide(color: Colors.red),
                label: Text('Chip'),
              ),
            ),
      ```
      
      ![Screenshot 2023-08-24 at 17 55 37](https://github.com/flutter/flutter/assets/48603081/938803cc-d514-464b-b06b-e4841b9ad040)
      
      ---
      
      ### After
      
      When `RawChip.shape` is provided with a `BorderSide`.
      
      ```dart
            body: Center(
              child: RawChip(
                shape: RoundedRectangleBorder(
                  side: BorderSide(color: Colors.amber),
                  borderRadius: BorderRadius.all(Radius.circular(12)),
                ),
                label: Text('Chip'),
              ),
            ),
      ```
      
      ![Screenshot 2023-08-24 at 17 51 29](https://github.com/flutter/flutter/assets/48603081/d6fcaaa9-8f5d-4180-ad14-062dd459ec45)
      
      When `RawChip.shape` is provided with a `BorderSide` and also `RawChip.side` is provided. The  `RawChip.side` overrides the shape's side.
      
      ```dart
            body: Center(
              child: RawChip(
                shape: RoundedRectangleBorder(
                  side: BorderSide(color: Colors.amber),
                  borderRadius: BorderRadius.all(Radius.circular(12)),
                ),
                side: BorderSide(color: Colors.red),
                label: Text('Chip'),
              ),
            ),
      ```
      
      ![Screenshot 2023-08-24 at 17 52 31](https://github.com/flutter/flutter/assets/48603081/3fa46341-43f0-4fe7-a922-f1d8ba34028c)
      
      ---
      612117a6
  27. 24 Aug, 2023 1 commit
  28. 22 Aug, 2023 1 commit
    • Taha Tesser's avatar
      Update default menu text styles for Material 3 (#131930) · 1bc79169
      Taha Tesser authored
      Related https://github.com/flutter/flutter/issues/131676
      
      ## Description
      
      #### Fix default input text style for `DropdownMenu`
      
      ![dropdown_input](https://github.com/flutter/flutter/assets/48603081/301f8243-155a-4b8f-84a8-5e6b7bebb3bc)
      
      ### Fix default text style for  `MenuAnchor`'s menu items (which `DropdownMenu` uses for menu items)
      
      ![dropdown_item](https://github.com/flutter/flutter/assets/48603081/6b5be81a-72fc-4705-a577-074c7a4cad8f)
      
      ###  Default  `DropdownMenu` Input text style 
      
      ![Screenshot 2023-08-04 at 16 48 28](https://github.com/flutter/flutter/assets/48603081/bcd9da98-e74d-491e-ae64-6268ae0b3893)
      
      ### Default `DropdownMenu` menu item text style
      
      ![Screenshot 2023-08-04 at 16 50 19](https://github.com/flutter/flutter/assets/48603081/9592ca43-2854-45b5-8648-203ab65d9745)
      
      ### Default `MenuAnchor` menu item text style
      
      ![Screenshot 2023-08-04 at 14 34 28](https://github.com/flutter/flutter/assets/48603081/e87e1073-05f8-4dc7-a435-d864e9cce6ab)
      
      ### Code sample
      
      <details> 
      <summary>expand to view the code sample</summary> 
      
      ```dart
      import 'package:flutter/material.dart';
      
      /// Flutter code sample for [DropdownMenu]s. The first dropdown menu has an outlined border.
      
      void main() => runApp(const DropdownMenuExample());
      
      class DropdownMenuExample extends StatefulWidget {
        const DropdownMenuExample({super.key});
      
        @override
        State<DropdownMenuExample> createState() => _DropdownMenuExampleState();
      }
      
      class _DropdownMenuExampleState extends State<DropdownMenuExample> {
        final TextEditingController colorController = TextEditingController();
        final TextEditingController iconController = TextEditingController();
        ColorLabel? selectedColor;
        IconLabel? selectedIcon;
      
        @override
        Widget build(BuildContext context) {
          final List<DropdownMenuEntry<ColorLabel>> colorEntries =
              <DropdownMenuEntry<ColorLabel>>[];
          for (final ColorLabel color in ColorLabel.values) {
            colorEntries.add(
              DropdownMenuEntry<ColorLabel>(
                  value: color, label: color.label, enabled: color.label != 'Grey'),
            );
          }
      
          final List<DropdownMenuEntry<IconLabel>> iconEntries =
              <DropdownMenuEntry<IconLabel>>[];
          for (final IconLabel icon in IconLabel.values) {
            iconEntries
                .add(DropdownMenuEntry<IconLabel>(value: icon, label: icon.label));
          }
      
          return MaterialApp(
            theme: ThemeData(
              useMaterial3: true,
              colorSchemeSeed: Colors.green,
              // textTheme: const TextTheme(
              //   bodyLarge: TextStyle(
              //     fontWeight: FontWeight.bold,
              //     fontStyle: FontStyle.italic,
              //     decoration: TextDecoration.underline,
              //   ),
              // ),
            ),
            home: Scaffold(
              body: SafeArea(
                child: Column(
                  children: <Widget>[
                    const Text('DropdownMenus'),
                    Padding(
                      padding: const EdgeInsets.symmetric(vertical: 20),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: <Widget>[
                          DropdownMenu<ColorLabel>(
                            controller: colorController,
                            label: const Text('Color'),
                            dropdownMenuEntries: colorEntries,
                            onSelected: (ColorLabel? color) {
                              setState(() {
                                selectedColor = color;
                              });
                            },
                          ),
                          const SizedBox(width: 20),
                          DropdownMenu<IconLabel>(
                            controller: iconController,
                            enableFilter: true,
                            leadingIcon: const Icon(Icons.search),
                            label: const Text('Icon'),
                            dropdownMenuEntries: iconEntries,
                            inputDecorationTheme: const InputDecorationTheme(
                              filled: true,
                              contentPadding: EdgeInsets.symmetric(vertical: 5.0),
                            ),
                            onSelected: (IconLabel? icon) {
                              setState(() {
                                selectedIcon = icon;
                              });
                            },
                          ),
                        ],
                      ),
                    ),
                    const Text('Plain TextFields'),
                    Padding(
                      padding: const EdgeInsets.symmetric(vertical: 20),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: <Widget>[
                          SizedBox(
                            width: 150,
                            child: TextField(
                                controller: TextEditingController(text: 'Blue'),
                                decoration: const InputDecoration(
                                  suffixIcon: Icon(Icons.arrow_drop_down),
                                  labelText: 'Color',
                                  border: OutlineInputBorder(),
                                )),
                          ),
                          const SizedBox(width: 20),
                          SizedBox(
                            width: 150,
                            child: TextField(
                                controller: TextEditingController(text: 'Smile'),
                                decoration: const InputDecoration(
                                  prefixIcon: Icon(Icons.search),
                                  suffixIcon: Icon(Icons.arrow_drop_down),
                                  filled: true,
                                  labelText: 'Icon',
                                )),
                          ),
                        ],
                      ),
                    ),
                    if (selectedColor != null && selectedIcon != null)
                      Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: <Widget>[
                          Text(
                              'You selected a ${selectedColor?.label} ${selectedIcon?.label}'),
                          Padding(
                            padding: const EdgeInsets.symmetric(horizontal: 5),
                            child: Icon(
                              selectedIcon?.icon,
                              color: selectedColor?.color,
                            ),
                          )
                        ],
                      )
                    else
                      const Text('Please select a color and an icon.')
                  ],
                ),
              ),
            ),
          );
        }
      }
      
      enum ColorLabel {
        blue('Blue', Colors.blue),
        pink('Pink', Colors.pink),
        green('Green', Colors.green),
        yellow('Yellow', Colors.yellow),
        grey('Grey', Colors.grey);
      
        const ColorLabel(this.label, this.color);
        final String label;
        final Color color;
      }
      
      enum IconLabel {
        smile('Smile', Icons.sentiment_satisfied_outlined),
        cloud(
          'Cloud',
          Icons.cloud_outlined,
        ),
        brush('Brush', Icons.brush_outlined),
        heart('Heart', Icons.favorite);
      
        const IconLabel(this.label, this.icon);
        final String label;
        final IconData icon;
      }
      
      ``` 
      	
      </details>
      1bc79169
  29. 21 Aug, 2023 1 commit
  30. 18 Aug, 2023 1 commit
  31. 17 Aug, 2023 1 commit
  32. 16 Aug, 2023 3 commits