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]);
 }