Dart என்பது Flutter ஆப்ளிகேஷன்களை உருவாக்க பயன்படுத்தப்படும் நிரலாக்க மொழி — Google மூலம் UI-களை உருவாக்குவதற்கு வடிவமைக்கப்பட்ட நவீன, object-oriented மொழி. Dart-இன் முக்கிய அம்சங்களைப் புரிந்துகொள்வது (அதன் வாக்கியமைப்பு, null safety, async ஆதரவு, மற்றும் அது எவ்வாறு compile செய்யப்படுகிறது) Flutter development-க்கு அপরिहार்யம்.
Dart என்றால் என்ன
Dart = Google's language for Flutter (and more):
→ OBJECT-ORIENTED, statically typed (with type inference)
→ familiar C-style/Java-like syntax (easy for many developers to pick up)
→ designed for UI development; compiles to native code (mobile) and JavaScript (web)
முக்கிய Dart அம்சங்கள்
// variables and types (statically typed with inference)
var name = 'Ann'; // inferred String
int age = 30; // explicit type
final pi = 3.14; // final (can't reassign)
const max = 100; // compile-time constant
// null safety — types are non-nullable by default
String name; // can't be null
String? nickname; // nullable (the ? allows null) — prevents null errors
// functions (including arrow syntax)
int add(int a, int b) => a + b;
// classes
class Person {
final String name;
Person(this.name); // concise constructor
}
