Dart Basics
Variables, const/final, data types, null safety, collections, control flow, functions, closures
1What is the difference between var and dynamic in Dart?
What is the difference between var and dynamic in Dart?
Odpowiedź
var determines the type at compile time based on the assigned value and remains fixed afterwards, while dynamic allows changing the type at any moment during runtime. Using var when the type is known provides better type safety and optimal performance as the compiler can perform static checks.
2What is the difference between const and final in Dart?
What is the difference between const and final in Dart?
Odpowiedź
final allows assigning a value only once, but this value can be determined at runtime. const creates a compile-time constant whose value must be known before execution. const is more restrictive and enables additional optimizations as const objects are canonicalized and shared in memory.
3What does the ? suffix mean in a Dart type like String?
What does the ? suffix mean in a Dart type like String?
Odpowiedź
The ? suffix indicates that a variable can contain null in addition to its normal value. This is the foundation of null safety introduced in Dart 2.12. Without this suffix, the variable can never be null, eliminating NullPointerExceptions at compile time. This approach ensures null errors are detected before execution.
Which operator should be used to safely access a property of a potentially null object?
What does the ?? operator do in Dart?
+22 pytań z rozmów
Inne tematy rekrutacyjne Flutter
Dart Language Essentials
Flutter Fundamentals
Widget Lifecycle
Local Storage
Application Lifecycle
Layouts & Constraints
ListView & GridView
Navigation & Routing
Basic State Management
Provider Pattern
Networking & HTTP
JSON Serialization
Local Database
Forms & Validation
Animations
Firebase Integration
Unit Testing
Widget Testing
Build & Deployment
Package Management
Memory & Performance
Streams & RxDart
Advanced State Management
Flutter Design Patterns
Performance Optimization
Platform Channels
Custom Painting
Flutter Application Architecture
Opanuj Flutter na następną rozmowę
Uzyskaj dostęp do wszystkich pytań, flashcards, testów technicznych, ćwiczeń code review i symulatorów rozmów.
Zacznij za darmo