flutter set default parameter value code example
Example 1: flutter default fvalue
int findVolume(int length, int breadth, {int height = 12}) {
return length*breadth*height;
}
Example 2: flutter constructor default value
class Customer {
String name;
int age;
String location;
Customer(this.name, [this.age, this.location = "US"]);
@override
String toString() {
return "Customer [name=${this.name},age=${this.age},location=${this.location}]";
}
}