Package Management
pubspec.yaml, pub.dev, dependencies, dev_dependencies, versioning, package creation
1Which file contains the dependency configuration in a Flutter project?
Which file contains the dependency configuration in a Flutter project?
Antwort
The pubspec.yaml file is the central configuration file of a Dart/Flutter project. It contains the project name, version, dependencies, dev_dependencies, assets and other metadata. This file is read by the pub tool to resolve and download the necessary packages.
2What is the difference between dependencies and dev_dependencies in pubspec.yaml?
What is the difference between dependencies and dev_dependencies in pubspec.yaml?
Antwort
Dependencies are packages required to run the application in production, while dev_dependencies are only used during development (tests, code generation, linting). Dev_dependencies are not included in the final app build, which reduces the bundle size.
3What does the ^ symbol before a package version mean (e.g., ^1.2.3)?
What does the ^ symbol before a package version mean (e.g., ^1.2.3)?
Antwort
The ^ (caret) symbol indicates a compatible version constraint according to semantic versioning. For ^1.2.3, it allows any version >= 1.2.3 and < 2.0.0. This allows automatic minor updates and patches while avoiding potentially incompatible major changes.
What is the purpose of the pubspec.lock file?
Which command fetches the dependencies declared in pubspec.yaml?
+13 Interview-Fragen
Weitere Flutter-Interviewthemen
Dart Basics
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
Memory & Performance
Streams & RxDart
Advanced State Management
Flutter Design Patterns
Performance Optimization
Platform Channels
Custom Painting
Flutter Application Architecture
Meistere Flutter für dein nächstes Interview
Zugang zu allen Fragen, Flashcards, technischen Tests, Code-Review-Übungen und Interview-Simulatoren.
Kostenlos starten