Null safety
پاراستن لە بێنرخ
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە Definitionپێناسە
A language rule that a variable can hold null only if its type says so, for example int? instead of int. The compiler then stops many crashes caused by missing values. Dart has had sound null safety since Dart 3.
یاسایەکی زمانە کە گۆڕاوێک تەنها کاتێک دەتوانێت null هەڵبگرێت کە جۆرەکەی ئەوە بڵێت، بۆ نموونە int? لە جیاتی int. بەم شێوەیە ڕێگری لە زۆر دەکات کە بەهۆی نەبوونی نرخەوە ڕوو دەدەن. Dart لە Dart 3ـەوە هەیە.
Exampleنموونە
int? age; may be null; int count = 0; never can. Use age ?? 0 for a default.
int? age; دەکرێت بێت؛ int count = 0; هەرگیز. age ?? 0 بۆ نرخی بنەڕەتی بەکار بهێنە.
int? age; // may be null
int count = 0; // never null
print(age ?? 0); // 0Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە
Proposed: پاراستن (protection) + the registry's null «بێنرخ».
Related termsزاراوە پەیوەندیدارەکان
Videosڤیدیۆکان
Learn more inزیاتر فێربە لە
- Meet Dartناسینی Dart
- Dart Basics: Variables, Types and Control Flowبنەماکانی Dart: گۆڕاوەکان، جۆرەکان و ڕێڕەوی کۆنترۆڵ
- What Is Flutter?Flutter چییە؟
- Widgets and the Widget Treeویجێتەکان و داری ویجێتەکان
- MaterialApp and ScaffoldMaterialApp و Scaffold
- Setting Up Flutter and Your First Projectئامادەکردنی Flutter و یەکەم پڕۆژەکەت
- Container: Size, Padding, Margin and AlignmentContainer: قەبارە، بۆشایی ناوەوە، پەراوێز و ڕێکخستنی شوێن
- The Consumer Widgetویجێتی Consumer
- FutureProvider and StreamProviderFutureProvider و StreamProvider