Navigation & Routing
Navigator 1.0/2.0, routes, MaterialPageRoute, Router API, go_router, deep linking, named routes
1Which method should be used to navigate to a new screen with Navigator 1.0?
Which method should be used to navigate to a new screen with Navigator 1.0?
Jawaban
Navigator.push() adds a new route to the navigation stack, allowing navigation to a new screen while keeping the previous screen in the stack. This method takes context and a Route (usually MaterialPageRoute) as parameters. Push stacks the new route, while pop removes it from the stack.
2What does Navigator.pop() return when sending data back to the previous screen?
What does Navigator.pop() return when sending data back to the previous screen?
Jawaban
Navigator.pop() can take an optional argument that will be returned to the previous screen via the Future returned by Navigator.push(). This allows sending a result (confirmation, selection, modified data) back to the screen that initiated navigation. Use await with push() to retrieve this result.
3What is the role of MaterialPageRoute in Flutter navigation?
What is the role of MaterialPageRoute in Flutter navigation?
Jawaban
MaterialPageRoute is a route that uses Material Design transitions (slide from right on iOS, fade on Android). It takes a builder that returns the destination widget. It automatically handles transition animations and respects platform conventions for a native user experience.
How to define named routes in a Flutter application?
What is the difference between Navigator.pushReplacement() and Navigator.push()?
+19 pertanyaan wawancara
Topik wawancara Flutter lainnya
Dart Basics
Dart Language Essentials
Flutter Fundamentals
Widget Lifecycle
Local Storage
Application Lifecycle
Layouts & Constraints
ListView & GridView
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
Kuasai Flutter untuk wawancara berikutnya
Akses semua pertanyaan, flashcards, tes teknis, latihan code review dan simulator wawancara.
Mulai gratis