Skip to content

Commit 5e347e4

Browse files
committed
[google_sign_in_web] Simplify onChanged callback in example
Simplifies the `onChanged` callback in the `RadioGroup` widget by using a null-aware `call` instead of a null-coalescing operator with an empty function.
1 parent aaba578 commit 5e347e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/google_sign_in/google_sign_in_web/example/lib/src/button_configuration_column.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Widget _renderRadioListTileCard<T extends Enum>({
174174
children: <Widget>[
175175
RadioGroup<T>(
176176
groupValue: selected,
177-
onChanged: (T? v) => (onChanged ?? (_) {})(v),
177+
onChanged: (T? v) => onChanged?.call(v),
178178
child: Column(
179179
mainAxisSize: MainAxisSize.min,
180180
children:

0 commit comments

Comments
 (0)