What is the point of writing this immutable class and normal class and how it is thread safe?
class SomeClass{
final String name;
const SomeClass(this.name);
}
class SomeClass2{
String name;
SomeClass2(this.name);
}
What is the point of writing this immutable class and normal class and how it is thread safe?
class SomeClass{
final String name;
const SomeClass(this.name);
}
class SomeClass2{
String name;
SomeClass2(this.name);
}
Dart is a single thread programming language because it's been developed to compile Javascript which is also a single thread programming language so it is not about that. If we were to consider your second question it is little bit complex so you can check this for an answer.