1. 07 Sep, 2023 1 commit
    • Taha Tesser's avatar
      Fix `ExpansionTile` properties cannot be updated with `setState` (#134218) · 30234a00
      Taha Tesser authored
      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
      30234a00
  2. 14 Aug, 2023 1 commit
  3. 22 Jul, 2023 1 commit
  4. 13 Jun, 2023 1 commit
    • Qun Cheng's avatar
      Update unit tests in material library for Material 3 (#128725) · a5f8b64e
      Qun Cheng authored
      Updates most of the unit tests in the packages/flutter/test/material folder so that they'll pass if ThemeData.useMaterial3 defaults to true.
      
      All of the tests have wired useMaterial3 to false and will need to be updated with a M3 version.
      
      related to #127064
      a5f8b64e
  5. 30 May, 2023 1 commit
  6. 10 Apr, 2023 1 commit
  7. 24 Mar, 2023 1 commit
  8. 23 Mar, 2023 1 commit
  9. 21 Mar, 2023 1 commit
  10. 28 Feb, 2023 1 commit
  11. 27 Feb, 2023 1 commit
  12. 24 Feb, 2023 1 commit
  13. 08 Feb, 2023 1 commit
  14. 07 Feb, 2023 1 commit
  15. 02 Feb, 2023 1 commit
  16. 03 Oct, 2022 1 commit
  17. 22 Aug, 2022 1 commit
  18. 02 Aug, 2022 1 commit
  19. 01 Aug, 2022 1 commit
  20. 14 Apr, 2022 1 commit
  21. 21 Jan, 2022 1 commit
  22. 12 Oct, 2021 1 commit
  23. 08 Oct, 2021 3 commits
  24. 09 Jun, 2021 1 commit
  25. 04 Jun, 2021 1 commit
  26. 28 Apr, 2021 1 commit
  27. 27 Apr, 2021 1 commit
  28. 21 Apr, 2021 1 commit
  29. 06 Apr, 2021 1 commit
  30. 25 Mar, 2021 2 commits
  31. 16 Mar, 2021 1 commit
  32. 04 Mar, 2021 1 commit
  33. 04 Feb, 2021 1 commit
  34. 03 Nov, 2020 1 commit
  35. 13 Oct, 2020 1 commit
  36. 11 Jun, 2020 1 commit
  37. 18 May, 2020 1 commit