Unverified Commit 297fd943 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by GitHub

fix potential call on null (#14731)

* fix potential call on null

* review
parent 1686b6d5
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment