From 1a797324d08bee6f7a1d0ac9f0824bc3ed0317b6 Mon Sep 17 00:00:00 2001 From: HONGFEI YANG Date: Tue, 22 Feb 2022 17:30:05 +1100 Subject: [PATCH] fix: fixed casting null to Tuple2 when link dialog is dismissed without any input (e.g. barrier dismissed) --- lib/src/widgets/toolbar/link_style_button.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/toolbar/link_style_button.dart b/lib/src/widgets/toolbar/link_style_button.dart index e479481c..9ca83fb6 100644 --- a/lib/src/widgets/toolbar/link_style_button.dart +++ b/lib/src/widgets/toolbar/link_style_button.dart @@ -120,7 +120,11 @@ class _LinkStyleButtonState extends State { return _LinkDialog( dialogTheme: widget.dialogTheme, link: link, text: text); }, - ).then(_linkSubmitted); + ).then( + (value) { + if (value != null) _linkSubmitted(value); + }, + ); } String? _getLinkAttributeValue() {