fix potential call on null (#14731)
* fix potential call on null * review
This commit is contained in:
committed by
GitHub
parent
1686b6d56d
commit
297fd9431f
@@ -143,7 +143,7 @@ class _CupertinoPickerState extends State<CupertinoPicker> {
|
||||
/// the lens and partially grayed out around it.
|
||||
Widget _buildMagnifierScreen() {
|
||||
final Color foreground = widget.backgroundColor?.withAlpha(
|
||||
(widget.backgroundColor?.alpha * _kForegroundScreenOpacityFraction).toInt()
|
||||
(widget.backgroundColor.alpha * _kForegroundScreenOpacityFraction).toInt()
|
||||
);
|
||||
|
||||
return new IgnorePointer(
|
||||
|
||||
@@ -124,7 +124,7 @@ void main() {
|
||||
final GlobalKey<FormState> formKey = new GlobalKey<FormState>();
|
||||
final GlobalKey<FormFieldState<String>> fieldKey = new GlobalKey<FormFieldState<String>>();
|
||||
// Input 2's validator depends on a input 1's value.
|
||||
String errorText(String input) => fieldKey.currentState.value?.toString() + '/error';
|
||||
String errorText(String input) => '${fieldKey.currentState.value}/error';
|
||||
|
||||
Widget builder() {
|
||||
return new Directionality(
|
||||
|
||||
Reference in New Issue
Block a user