Комментарии:
Updated version:
//Optional Positional Parameters
void printCountries(String name1,[String? name2, String? name3]){
print("Name 1 is $name1");
print("Name 2 is $name2");
print("Name 3 is $name3");
}
In Dart 3.0, the code in the video doesn't work. Dart 3.0 has null safety rules that won't allow: func([int parameter]). That function won't compile. So for the examples in the video to compile and run, you'll need to write it as: void printCountries(String name1, [String name2 = "Italy", String name3 = "England"]) { ... Note the equals string syntax.
ОтветитьRecent Rules void printCountries(String name1, [String? name2, String? name3])
ОтветитьReally awesome playlist with all the required information of dart language. Loving it
Ответитьshort videos full of knowledge, i am just loving it.
Ответить1.does optional parameters should be always be at the end, ??
2. can we have the only middle parameter as optional..??
AWESOME!
Ответитьyou didn't mention that optional parameters must be present at last
Ответитьyou are THEE BEST teacher in the world! thank you very much
Ответитьgreat tuto
Ответитьnice
ОтветитьNice 👌 Tutorial series ...!
Ответитьis it valid on return statements ?
Ответить👍
Ответитьa. thanks for the great tutorial
b. is there any way to turn parameter String name2 into optional without changing the order?
0m 30 sec
Thanks for your Slide about Parameters
👍👍👍👍👍
3m 35sec
Awesome
Optional Parameter
4m 19sec
Great Guide
Extenslding Optional Parameter
does somebody know if i can make like the first parameter opcional and the las one too but keep the second parameter required?
ОтветитьYou are awesome bro... Your videos are very detailed and well explained..
Ответитьhow to call function through parameter.
pls anyboddy help