浏览代码

Added comment

ashilkn 2 年之前
父节点
当前提交
aa02f0a875
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      lib/models/search/button_result.dart

+ 5 - 1
lib/models/search/button_result.dart

@@ -1,7 +1,11 @@
 import "package:photos/ui/components/button_widget.dart";
 
 class ButtonResult {
+  ///action can be null when action for the button that is returned when popping
+  ///the widget (dialog, actionSheet) which uses a ButtonWidget isn't
+  ///relevant/useful and so is not assigned a value when an instance of
+  ///ButtonWidget is created.
   final ButtonAction? action;
   final Exception? exception;
-  ButtonResult({required this.action, this.exception});
+  ButtonResult([this.action, this.exception]);
 }