Skip to main content

Command Palette

Search for a command to run...

Dart Function Anonymous Function & Lambda Exprerssion

Published
1 min read
Dart Function Anonymous Function & Lambda Exprerssion
J

i am Jeet Bhalu i am flutter App developer

Lambda Expression

  • Lambda functions are a short and simple way to express tiny functions.

  • Lambda functions are also known as anonymous functions or closures.

  • They are functions without a name that can be used inline within the code.

  •   return_type var_name = (parameters)=> expression;
    

Dart Anonymous Function

  • An anonymous function can have zero or more parameters with optional type annotations.

  • An anonymous function consists of self-contained blocks of code and that can be passed around in our code as a function parameter.

  •   Syntax:
      (parameter_list)
      {
           statement(s)
    
      }
    

More from this blog

J

Jeet Bhalu

191 posts