samples icon indicating copy to clipboard operation
samples copied to clipboard

Update m3 demo app

Open QuncCccccc opened this issue 3 years ago • 8 comments
trafficstars

This PR adds the updated Chip and IconButton components to the M3 Demo App.

Screen Shot 2022-07-07 at 5 37 58 PM

Pre-launch Checklist

  • [x] I read the [Flutter Style Guide] recently, and have followed its advice.
  • [x] I signed the [CLA].
  • [x] I read the [Contributors Guide].
  • [ ] I updated/added relevant documentation (doc comments with ///).
  • [x] All existing and new tests are passing.

QuncCccccc avatar Jul 07 '22 19:07 QuncCccccc

The broken CI should clean up once https://github.com/flutter/samples/pull/1322 lands

domesticmouse avatar Jul 07 '22 23:07 domesticmouse

Looks like this PR is significantly behind main. You need to bring this up to date, as the latest PR contains a fix for the CI breakage.

domesticmouse avatar Jul 08 '22 01:07 domesticmouse

Looks like this PR is significantly behind main. You need to bring this up to date, as the latest PR contains a fix for the CI breakage.

Just rebased master, but seems the tests are still failing. Do you have any suggestions?

QuncCccccc avatar Jul 08 '22 03:07 QuncCccccc

Looks like this PR is significantly behind main. You need to bring this up to date, as the latest PR contains a fix for the CI breakage.

Just rebased master, but seems the tests are still failing. Do you have any suggestions?

Looking at the CI logs for Flutter `stable, I see the following:

== Testing 'material_3_demo' on Flutter's stable channel ==
~/work/samples/samples/material_3_demo ~/work/samples/samples
Running "flutter pub get" in material_3_demo...                  1,019ms
Analyzing material_3_demo...
  error - lib/component_screen.dart:117:15 - The named parameter 'foregroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'foregroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:118:15 - The named parameter 'backgroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'backgroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:126:15 - The named parameter 'foregroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'foregroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:128:15 - The named parameter 'backgroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'backgroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:166:15 - The named parameter 'foregroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'foregroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:167:15 - The named parameter 'backgroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'backgroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:176:15 - The named parameter 'foregroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'foregroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:178:15 - The named parameter 'backgroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'backgroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:614:7 - The named parameter 'isSelected' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'isSelected'. - undefined_named_parameter
  error - lib/component_screen.dart:616:7 - The named parameter 'selectedIcon' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'selectedIcon'. - undefined_named_parameter
  error - lib/component_screen.dart:618:7 - The named parameter 'style' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'style'. - undefined_named_parameter
  error - lib/component_screen.dart:624:10 - A value of type 'dynamic' can't be returned from the function 'enabledFilledButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:624:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:642:10 - A value of type 'dynamic' can't be returned from the function 'disabledFilledButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:642:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:649:10 - A value of type 'dynamic' can't be returned from the function 'enabledFilledTonalButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:649:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:667:10 - A value of type 'dynamic' can't be returned from the function 'disabledFilledTonalButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:667:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:674:10 - A value of type 'dynamic' can't be returned from the function 'enabledOutlinedButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:674:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:701:10 - A value of type 'dynamic' can't be returned from the function 'disabledOutlinedButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:701:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:731:15 - A value of type 'Null' can't be assigned to a parameter of type 'void Function()' in a const constructor. Try using a subtype, or removing the keyword 'const'. - const_constructor_param_type_mismatch
  error - lib/component_screen.dart:731:15 - Evaluation of this constant expression throws an exception. - const_eval_throws_exception
  error - lib/component_screen.dart:731:21 - The named parameter 'onPressed' is required, but there's no corresponding argument. Try adding the required argument. - missing_required_argument
  error - lib/component_screen.dart:803:15 - A value of type 'Null' can't be assigned to a parameter of type 'void Function()' in a const constructor. Try using a subtype, or removing the keyword 'const'. - const_constructor_param_type_mismatch
  error - lib/component_screen.dart:803:15 - Evaluation of this constant expression throws an exception. - const_eval_throws_exception
  error - lib/component_screen.dart:803:21 - The named parameter 'onPressed' is required, but there's no corresponding argument. Try adding the required argument. - missing_required_argument
   info - lib/component_screen.dart:[688](https://github.com/flutter/samples/runs/7244865421?check_suite_focus=true#step:5:689):44 - Avoid annotating types for function expression parameters. - avoid_types_on_closure_parameters

Which leads me to ask the odd sounding question, which version of Flutter are you developing on?

domesticmouse avatar Jul 08 '22 05:07 domesticmouse

Looks like this PR is significantly behind main. You need to bring this up to date, as the latest PR contains a fix for the CI breakage.

Just rebased master, but seems the tests are still failing. Do you have any suggestions?

Looking at the CI logs for Flutter `stable, I see the following:

== Testing 'material_3_demo' on Flutter's stable channel ==
~/work/samples/samples/material_3_demo ~/work/samples/samples
Running "flutter pub get" in material_3_demo...                  1,019ms
Analyzing material_3_demo...
  error - lib/component_screen.dart:117:15 - The named parameter 'foregroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'foregroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:118:15 - The named parameter 'backgroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'backgroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:126:15 - The named parameter 'foregroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'foregroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:128:15 - The named parameter 'backgroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'backgroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:166:15 - The named parameter 'foregroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'foregroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:167:15 - The named parameter 'backgroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'backgroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:176:15 - The named parameter 'foregroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'foregroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:178:15 - The named parameter 'backgroundColor' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'backgroundColor'. - undefined_named_parameter
  error - lib/component_screen.dart:614:7 - The named parameter 'isSelected' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'isSelected'. - undefined_named_parameter
  error - lib/component_screen.dart:616:7 - The named parameter 'selectedIcon' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'selectedIcon'. - undefined_named_parameter
  error - lib/component_screen.dart:618:7 - The named parameter 'style' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'style'. - undefined_named_parameter
  error - lib/component_screen.dart:624:10 - A value of type 'dynamic' can't be returned from the function 'enabledFilledButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:624:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:642:10 - A value of type 'dynamic' can't be returned from the function 'disabledFilledButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:642:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:649:10 - A value of type 'dynamic' can't be returned from the function 'enabledFilledTonalButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:649:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:667:10 - A value of type 'dynamic' can't be returned from the function 'disabledFilledTonalButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:667:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:674:10 - A value of type 'dynamic' can't be returned from the function 'enabledOutlinedButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:674:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:701:10 - A value of type 'dynamic' can't be returned from the function 'disabledOutlinedButtonStyle' because it has a return type of 'ButtonStyle'. - return_of_invalid_type
  error - lib/component_screen.dart:701:21 - The method 'styleFrom' isn't defined for the type 'IconButton'. Try correcting the name to the name of an existing method, or defining a method named 'styleFrom'. - undefined_method
  error - lib/component_screen.dart:731:15 - A value of type 'Null' can't be assigned to a parameter of type 'void Function()' in a const constructor. Try using a subtype, or removing the keyword 'const'. - const_constructor_param_type_mismatch
  error - lib/component_screen.dart:731:15 - Evaluation of this constant expression throws an exception. - const_eval_throws_exception
  error - lib/component_screen.dart:731:21 - The named parameter 'onPressed' is required, but there's no corresponding argument. Try adding the required argument. - missing_required_argument
  error - lib/component_screen.dart:803:15 - A value of type 'Null' can't be assigned to a parameter of type 'void Function()' in a const constructor. Try using a subtype, or removing the keyword 'const'. - const_constructor_param_type_mismatch
  error - lib/component_screen.dart:803:15 - Evaluation of this constant expression throws an exception. - const_eval_throws_exception
  error - lib/component_screen.dart:803:21 - The named parameter 'onPressed' is required, but there's no corresponding argument. Try adding the required argument. - missing_required_argument
   info - lib/component_screen.dart:[688](https://github.com/flutter/samples/runs/7244865421?check_suite_focus=true#step:5:689):44 - Avoid annotating types for function expression parameters. - avoid_types_on_closure_parameters

Which leads me to ask the odd sounding question, which version of Flutter are you developing on?

I'm using the master branch:) I guess the new code is not in stable channel yet. In this case, should I wait until the recent code merge into stable channel?

QuncCccccc avatar Jul 08 '22 08:07 QuncCccccc

In this case, should I wait until the recent code merge into stable channel?

Just to confirm, we can update the CI config to ignore this for stable, but I'd like to wait until this passes on beta before landing this PR

domesticmouse avatar Jul 18 '22 10:07 domesticmouse

In this case, should I wait until the recent code merge into stable channel?

Just to confirm, we can update the CI config to ignore this for stable, but I'd like to wait until this passes on beta before landing this PR

Got it. Thanks!

QuncCccccc avatar Jul 18 '22 17:07 QuncCccccc

@QuncCccccc should this PR be closed?

domesticmouse avatar Aug 13 '22 15:08 domesticmouse

@QuncCccccc should this PR be closed?

Yes, thanks for reminding me!

QuncCccccc avatar Aug 15 '22 16:08 QuncCccccc