Navigation Flutter-এ স্ক্রিনের মধ্যে (পৃষ্ঠা/রুট) চলাচল করা — Navigator (রুটের একটি স্ট্যাক) ব্যবহার করে মৌলিক নেভিগেশনের জন্য, অথবা আরও জটিল অ্যাপ্লিকেশনের জন্য ডিক্লারেটিভ routing প্যাকেজ। নেভিগেশন বোঝা মাল্টি-স্ক্রিন অ্যাপ তৈরির জন্য অপরিহার্য।
Navigator দিয়ে মৌলিক নেভিগেশন (একটি স্ট্যাক)
// the Navigator manages a STACK of routes (screens)
// PUSH a new screen onto the stack (navigate to it)
Navigator.push(
context,
MaterialPageRoute(builder: (context) => SecondScreen()),
);
// POP — go back (remove the top screen, return to the previous)
Navigator.pop(context);
Think of navigation as a STACK of screens:
→ PUSH adds a screen on top (navigate forward)
→ POP removes the top screen (go back)
→ the back button / gesture also pops
