Using the call
method, you can achieve what you want with:
nullableFunctionInstance?.call(blah)
There’s also the apply
method if you want to pass arguments.
More Related Contents:
- Error: The instance member … can’t be accessed in an initializer
- Difference between assigning the values in parameter list and initializer list
- how to solve flutter CERTIFICATE_VERIFY_FAILED error while performing a POST request?
- How do I initialize non-nullable members in a constructor body?
- How can I get the size of the Text widget in Flutter
- Flutter TextFormField hidden by keyboard
- How do you round a double in Dart to a given degree of precision AFTER the decimal point?
- List use of double dot (.) in dart?
- How do I determine the width and height of an image in Flutter?
- How to remove scroll glow?
- Flutter: disable screenshot capture for app
- How do I share an image on iOS and Android using Flutter?
- forEach vs for in: Different Behavior When Calling a Method
- How to Pick files and Images for upload with flutter web
- Creating function with variable number of arguments or parameters in Dart
- How do I run a reoccurring function, in Dart?
- How do I check if the Flutter application is in the foreground or not?
- How to pass data from child widget to its parent
- How do get a random element from a List in Dart?
- Default stringify for objects, equivalent to Java’s toString?
- Creating an instance of a generic type in DART
- How to schedule background tasks in Flutter?
- How to use InputFormatter on Flutter TextField?
- Flutter – How to set status bar color when AppBar not present
- How to detect orientation change in layout in Flutter?
- Flutter: Is it somehow possible to create App Widgets (Android) and Today Extensions (iOS)? [duplicate]
- convert a String of “uint8list” to a Unit8List
- Why only static fields can be declared as ‘const’?
- how to add or remove item to the the existing array in firestore ?
- How to convert a List to List in null safe Dart?