Dart হল প্রোগ্রামিং ভাষা যা Flutter অ্যাপ তৈরি করতে ব্যবহৃত হয় — এটি Google দ্বারা ডিজাইন করা একটি আধুনিক, অবজেক্ট-ওরিয়েন্টেড ভাষা যা UI তৈরির জন্য। Dart এর মূল বৈশিষ্ট্যগুলি বোঝা (এর সিনট্যাক্স, null সেফটি, async সাপোর্ট এবং কীভাবে এটি কম্পাইল হয়) Flutter ডেভেলপমেন্টের জন্য প্রয়োজনীয়।
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
}
