samples
samples copied to clipboard
Update m3 demo app
This PR adds the updated Chip and IconButton components to the M3 Demo App.
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.
The broken CI should clean up once https://github.com/flutter/samples/pull/1322 lands
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.
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?
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?
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_parametersWhich 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?
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
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 should this PR be closed?
@QuncCccccc should this PR be closed?
Yes, thanks for reminding me!