Curly brackets {} are used to specify optional, named parameters in Dart.
or use [] to specify optional parameters aswell
readFile(String name, {String mode, String charset = 'utf-8'}) {
}
Named parameters are referenced by name,
which means that they can be used during the function
invocation in an order different from the function declaration.
readFile('hello.dart','14');
readFile('hello.dart', mode: 'w+');
readFile('hello.dart', charset: 'iso8859-1');
readFile('hello.dart', charset: 'iso8859-1', mode: 'w+');
readFile('hello.dart', mode: 'w+', charset: 'iso8859-1');
readFile2(String name, [String? mode]) {
}
readFile2('hello.dart','w+');
readFile2('hello.dart');