1. 21 Jun, 2023 12 commits
  2. 20 Jun, 2023 25 commits
  3. 19 Jun, 2023 3 commits
    • engine-flutter-autoroll's avatar
      Roll Flutter Engine from 84ecaa053ec6 to 55418e648958 (1 revision) (#129145) · b8590b23
      engine-flutter-autoroll authored
      https://github.com/flutter/engine/compare/84ecaa053ec6...55418e648958
      
      2023-06-19 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from gX0QkT_dMBCTbiAHY... to JewrT71vAzyDs8qRt... (flutter/engine#42988)
      
      Also rolling transitive DEPS:
        fuchsia/sdk/core/mac-amd64 from gX0QkT_dMBCT to JewrT71vAzyD
      
      If this roll has caused a breakage, revert this CL and stop the roller
      using the controls here:
      https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
      Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
      is aware of the problem.
      
      To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
      
      To report a problem with the AutoRoller itself, please file a bug:
      https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
      
      Documentation for the AutoRoller is here:
      https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
      b8590b23
    • engine-flutter-autoroll's avatar
      Roll Flutter Engine from 23a2c246600f to 84ecaa053ec6 (2 revisions) (#129142) · c9954026
      engine-flutter-autoroll authored
      https://github.com/flutter/engine/compare/23a2c246600f...84ecaa053ec6
      
      2023-06-19 skia-flutter-autoroll@skia.org Roll Skia from 41689ff01f97 to 9c2148cd1c82 (1 revision) (flutter/engine#42987)
      2023-06-19 skia-flutter-autoroll@skia.org Roll Dart SDK from 60adb12ffc30 to d87670619414 (1 revision) (flutter/engine#42986)
      
      If this roll has caused a breakage, revert this CL and stop the roller
      using the controls here:
      https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
      Please CC chinmaygarde@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
      is aware of the problem.
      
      To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
      
      To report a problem with the AutoRoller itself, please file a bug:
      https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
      
      Documentation for the AutoRoller is here:
      https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
      c9954026
    • Taha Tesser's avatar
      Introduce MaterialState `color` property for chips (#128584) · 467c970b
      Taha Tesser authored
      fixes https://github.com/flutter/flutter/issues/115827
      fixes https://github.com/flutter/flutter/issues/101325
      
      ### Description
      1. This PR adds a new MaterialState `color` property to all the chips (this makes it possible to customize chips in all states from the M3 specs).
      2. Updated defaults to use the new  MaterialState `color` property.
      3. Updated and added new tests to all the chip test classes.
      
      <details> 
      <summary>code sample</summary> 
      
      ```dart
      import 'package:flutter/material.dart';
      
      const Color disabledColor = Colors.black26;
      const Color backgroundColor = Colors.cyan;
      final Color disabledSelectedColor = Colors.red.shade100;
      const Color selectedColor = Colors.amber;
      final MaterialStateProperty<Color> color =
          MaterialStateProperty.resolveWith((Set<MaterialState> states) {
        if (states.contains(MaterialState.disabled) &&
            states.contains(MaterialState.selected)) {
          return disabledSelectedColor;
        }
        if (states.contains(MaterialState.disabled)) {
          return disabledColor;
        }
        if (states.contains(MaterialState.selected)) {
          return selectedColor;
        }
        return backgroundColor;
      });
      
      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,
              // chipTheme: ChipThemeData(color: color),
            ),
            home: const Example(),
          );
        }
      }
      
      class Example extends StatefulWidget {
        const Example({super.key});
      
        @override
        State<Example> createState() => _ExampleState();
      }
      
      class _ExampleState extends State<Example> {
        bool enabled = false;
        bool selected = true;
      
        @override
        Widget build(BuildContext context) {
          const Widget verticalSpace = SizedBox(height: 20);
      
          return Scaffold(
            body: Center(
              child: Column(
                children: <Widget>[
                  const SizedBox(height: 25),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                    children: <Widget>[
                      const Card(
                        elevation: 0.0,
                        color: disabledColor,
                        child: Padding(
                          padding: EdgeInsets.all(8.0),
                          child: Text('disabledColor'),
                        ),
                      ),
                      const Card(
                        elevation: 0.0,
                        color: backgroundColor,
                        child: Padding(
                          padding: EdgeInsets.all(8.0),
                          child: Text('backgroundColor'),
                        ),
                      ),
                      Card(
                        elevation: 0.0,
                        color: disabledSelectedColor,
                        child: const Padding(
                          padding: EdgeInsets.all(8.0),
                          child: Text('disabledSelectedColor'),
                        ),
                      ),
                      const Card(
                        elevation: 0.0,
                        color: selectedColor,
                        child: Padding(
                          padding: EdgeInsets.all(8.0),
                          child: Text('selectedColor'),
                        ),
                      ),
                    ],
                  ),
                  const Spacer(),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                    children: <Widget>[
                      Column(
                        mainAxisSize: MainAxisSize.min,
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: <Widget>[
                          RawChip(
                            selected: selected,
                            selectedColor: selectedColor,
                            color: color,
                            label: const Text('RawChip'),
                            isEnabled: enabled,
                            onSelected: enabled ? (bool value) {} : null,
                          ),
                          verticalSpace,
                          InputChip(
                            isEnabled: enabled,
                            selected: selected,
                            selectedColor: selectedColor,
                            color: color,
                            label: const Text('InputChip'),
                            onSelected: enabled ? (bool value) {} : null,
                          ),
                        ],
                      ),
                      Column(
                        mainAxisSize: MainAxisSize.min,
                        children: <Widget>[
                          FilterChip(
                            selected: selected,
                            selectedColor: selectedColor,
                            color: color,
                            label: const Text('FilterChip'),
                            onSelected: enabled ? (bool value) {} : null,
                          ),
                          verticalSpace,
                          FilterChip.elevated(
                            selected: selected,
                            selectedColor: selectedColor,
                            color: color,
                            label: const Text('FilterChip.elevated'),
                            onSelected: enabled ? (bool value) {} : null,
                          ),
                        ],
                      ),
                      Column(
                        mainAxisSize: MainAxisSize.min,
                        children: <Widget>[
                          ChoiceChip(
                            selected: selected,
                            selectedColor: selectedColor,
                            color: color,
                            label: const Text('ChoiceChip'),
                            onSelected: enabled ? (bool value) {} : null,
                          ),
                          verticalSpace,
                          ChoiceChip.elevated(
                            selected: selected,
                            selectedColor: selectedColor,
                            color: color,
                            label: const Text('ChoiceChip.elevated'),
                            onSelected: enabled ? (bool value) {} : null,
                          ),
                        ],
                      ),
                    ],
                  ),
                  const Spacer(),
                  Row(
                    children: <Widget>[
                      Flexible(
                        child: SwitchListTile(
                          title: const Text('Enabled'),
                          value: enabled,
                          onChanged: (bool value) {
                            setState(() => enabled = value);
                          },
                        ),
                      ),
                      Flexible(
                        child: SwitchListTile(
                          title: const Text('Selected'),
                          value: selected,
                          onChanged: (bool value) {
                            setState(() => selected = value);
                          },
                        ),
                      ),
                    ],
                  )
                ],
              ),
            ),
          );
        }
      }
      
      ``` 
      	
      </details>
      
      ### Before (not possible to customize disabled and selected chips)
      
      ![Screenshot 2023-06-13 at 16 27 13](https://github.com/flutter/flutter/assets/48603081/633f09f7-16a1-469e-b326-b9cc0ed59242)
      
      ### After (using disabled and selected chips using the new  MaterialState `color` property)
      
      ![Screenshot 2023-06-13 at 16 26 53](https://github.com/flutter/flutter/assets/48603081/7f5dffb7-4074-4268-87c0-c059c2da67a8)
      467c970b