Learn how real teams build software together. Then organize your code with classes.
Press J anytime to jump to any section. Arrow keys to navigate.
Imagine you're playing a game. You save before fighting a boss. If you lose, you go back to the save point. Git does the SAME thing for your code.
Each save is called a commit. Git remembers EVERY save you ever made.
📌 Git = a time machine for your code. You can always go back.
Just 4 commands to start. That's it.
📂 Start tracking — Like opening a new notebook. "I want to track this project."
📦 Pick what to save — Like highlighting the pages you want to photocopy.
💾 Save point! — Take a snapshot. The message says WHAT you did.
🔍 What changed? — "Show me what files I changed since last save."
📌 Workflow: change code → git add → git commit. Repeat.
Git lives on YOUR computer. But what if your laptop breaks? What if your teammate needs the code? GitHub stores your code ONLINE so everyone can access it.
push = upload your code to GitHub
pull = download the latest code from GitHub
📌 Git = saves on your computer. GitHub = saves in the cloud that everyone can see.
Imagine a restaurant's recipe book. The main book has all the tested recipes. You want to try a new momo recipe? Make a copy (branch), experiment there. If it's good, add it back to the main book.
📌 Always create a branch for new features. Never mess with main directly.
In a company, you don't just add your recipe to the main book. You say: "Hey team, I made a new momo recipe. Can you check it before I add it?" That's a Pull Request (PR).
📌 In real companies, NO code goes to main without a Pull Request. This protects the project.
📌 Code review is not about criticism. It's about making the code better TOGETHER.
Passwords, big files, system junk — keep them private.
.env — Has passwords. Never share!node_modules/ — Everyone downloads their own.DS_Store — Mac junk, nobody needs itbuild/ — Can be regenerated📌 Create .gitignore BEFORE your first commit. Rule: if it's generated or secret, ignore it.
This is how teams at companies like eSewa, Khalti, and Daraz actually build software.
📌 This is EXACTLY what you'll do today with your team project.
git push do?4 groups. 1 restaurant. Each group builds one part. Then we combine everything.
Each group works on their OWN branch. Then we merge everything together. Just like a real company.
Everyone starts with this. It's the restaurant's basic data.
Your job: show the menu in different ways.
All 4 groups' code combined. Click each feature.
menuItems.where((item) => prices[item]! > 100).toList() return?.fold(0, (sum, x) => sum + x) do?prices[item] ?? 0 with ???We need a better way to organize our data.
Think about ordering at a restaurant. The waiter has a blank ORDER FORM. Every customer gets the SAME form, but fills in DIFFERENT items. The form is the CLASS. Each filled form is an OBJECT.
One template → many filled copies. That's classes and objects!
📌 One object = one thing. No more scattered variables.
📌 Named constructors = shortcuts. MenuItem.special() is clearer than passing lots of parameters.
MenuItem(this.name, this.price, this.category) do?MenuItem.special('Buff Momo', 180)?Like a house with an extra floor built on top. You keep everything below and add more.
📌 extends = "is a". SpecialOrder IS an Order with extra powers. super calls the parent.
A child class can change how a parent's method works.
📌 @override = same method name, different behavior. super.method() calls the original version.
Everything from today — classes, methods, extending. Click each feature.
init, add, commit, status
push, pull, remote repos
branch, merge, pull requests, code review
where, map, fold, chaining
closures, pure functions, HOF
blueprint, properties, constructor, methods
default, named, shortcuts
getTotal, showOrder, getBill
extends, super, @override
filterByRating(int minRating) method
printReceipt() method with nice formatted output
Use branches! Create feature/your-name and submit a PR.
Before next class: Practice making PRs on your team repo.
Practice at dartpad.dev — build your own classes!