├── .gitignore ├── Code Snapshots ├── 01 Getting Started │ ├── 01 First App │ │ └── lib │ │ │ └── main.dart │ └── 02 First App Adjusted │ │ └── lib │ │ └── main.dart ├── 02 Flutter & Dart Basics I │ ├── 01 Starting Setup │ │ ├── lib │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 02 Building a More Complex Widget Tree │ │ ├── lib │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 03 How To Configure Widget & Objects │ │ ├── lib │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 04 Practice Solution - Styling Text │ │ ├── lib │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 05 Building Custom Widgets │ │ ├── lib │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 06 Splitting Code Across Files │ │ ├── lib │ │ │ ├── gradient_container.dart │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 07 Practice Solution - Create A Custom Widget │ │ ├── lib │ │ │ ├── gradient_container.dart │ │ │ ├── main.dart │ │ │ └── styled_text.dart │ │ └── pubspec.yaml │ ├── 08 Var, Final, Const │ │ ├── lib │ │ │ ├── gradient_container.dart │ │ │ ├── main.dart │ │ │ ├── styled_text.dart │ │ │ └── variables.dart │ │ └── pubspec.yaml │ ├── 09 Instance Variables & Properties │ │ ├── lib │ │ │ ├── gradient_container.dart │ │ │ ├── main.dart │ │ │ ├── styled_text.dart │ │ │ └── variables.dart │ │ └── pubspec.yaml │ ├── 10 Practice Solution - Reusable Widgets │ │ ├── lib │ │ │ ├── gradient_container.dart │ │ │ ├── main.dart │ │ │ ├── styled_text.dart │ │ │ └── variables.dart │ │ └── pubspec.yaml │ ├── 11 Image & Multiple Constructors │ │ ├── assets │ │ │ └── images │ │ │ │ ├── dice-1.png │ │ │ │ ├── dice-2.png │ │ │ │ ├── dice-3.png │ │ │ │ ├── dice-4.png │ │ │ │ ├── dice-5.png │ │ │ │ └── dice-6.png │ │ ├── lib │ │ │ ├── gradient_container.dart │ │ │ ├── main.dart │ │ │ ├── styled_text.dart │ │ │ └── variables.dart │ │ └── pubspec.yaml │ ├── 12 Styling Buttons │ │ ├── assets │ │ │ └── images │ │ │ │ ├── dice-1.png │ │ │ │ ├── dice-2.png │ │ │ │ ├── dice-3.png │ │ │ │ ├── dice-4.png │ │ │ │ ├── dice-5.png │ │ │ │ └── dice-6.png │ │ ├── lib │ │ │ ├── gradient_container.dart │ │ │ ├── main.dart │ │ │ ├── styled_text.dart │ │ │ └── variables.dart │ │ └── pubspec.yaml │ ├── 13 Introducing Stateful Widget │ │ ├── assets │ │ │ └── images │ │ │ │ ├── dice-1.png │ │ │ │ ├── dice-2.png │ │ │ │ ├── dice-3.png │ │ │ │ ├── dice-4.png │ │ │ │ ├── dice-5.png │ │ │ │ └── dice-6.png │ │ ├── lib │ │ │ ├── dice_roller.dart │ │ │ ├── gradient_container.dart │ │ │ ├── main.dart │ │ │ └── styled_text.dart │ │ └── pubspec.yaml │ ├── 14 Generating Random Numbers │ │ ├── assets │ │ │ └── images │ │ │ │ ├── dice-1.png │ │ │ │ ├── dice-2.png │ │ │ │ ├── dice-3.png │ │ │ │ ├── dice-4.png │ │ │ │ ├── dice-5.png │ │ │ │ └── dice-6.png │ │ ├── lib │ │ │ ├── dice_roller.dart │ │ │ ├── gradient_container.dart │ │ │ ├── main.dart │ │ │ └── styled_text.dart │ │ └── pubspec.yaml │ └── 15 Finished │ │ ├── images │ │ ├── dice-1.png │ │ ├── dice-2.png │ │ ├── dice-3.png │ │ ├── dice-4.png │ │ ├── dice-5.png │ │ └── dice-6.png │ │ ├── lib │ │ ├── dice_roller.dart │ │ ├── gradient_container.dart │ │ ├── main.dart │ │ └── styled_text.dart │ │ └── pubspec.yaml ├── 03 Flutter & Dart Basics II │ ├── 01 Starting Setup │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 02 Challenge Solution │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── main.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 03 Adding Transparency │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── main.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 04 Adding a Stateful Widget │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 05 initState │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 06 Ternary Expressions │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 07 if Statements │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 08 Question Model & Dummy Questions │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 09 Creating a Custom Button │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 10 Maping Lists │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 11 Mutating Values in Memory │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 12 Managing the Questions Index │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 13 Google Fonts │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 14 Passing Data via Functions │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 15 More Conditions │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 16 Getting Started with the Results Screen │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ ├── results_screen.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 17 Accessing Map Values │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── quiz.dart │ │ │ ├── results_screen.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 18 Expanded │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── questions_summary.dart │ │ │ ├── quiz.dart │ │ │ ├── results_screen.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 19 Filtering & Analyzing Lists │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── questions_summary.dart │ │ │ ├── quiz.dart │ │ │ ├── results_screen.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 20 SingleChildScrollView │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── questions_summary.dart │ │ │ ├── quiz.dart │ │ │ ├── results_screen.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ ├── 21 Time to Practice Solution │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── questions_summary │ │ │ │ ├── question_identifier.dart │ │ │ │ ├── questions_summary.dart │ │ │ │ └── summary_item.dart │ │ │ ├── quiz.dart │ │ │ ├── results_screen.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ └── 22 More Dart Features │ │ ├── assets │ │ └── images │ │ │ └── quiz-logo.png │ │ ├── lib │ │ ├── answer_button.dart │ │ ├── data │ │ │ └── questions.dart │ │ ├── main.dart │ │ ├── models │ │ │ └── quiz_question.dart │ │ ├── questions_screen.dart │ │ ├── questions_summary │ │ │ ├── question_identifier.dart │ │ │ ├── questions_summary.dart │ │ │ └── summary_item.dart │ │ ├── quiz.dart │ │ ├── results_screen.dart │ │ └── start_screen.dart │ │ └── pubspec.yaml ├── 04 Debugging │ ├── 01 Starting Setup │ │ ├── assets │ │ │ └── images │ │ │ │ └── quiz-logo.png │ │ ├── lib │ │ │ ├── answer_button.dart │ │ │ ├── data │ │ │ │ └── questions.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── quiz_question.dart │ │ │ ├── questions_screen.dart │ │ │ ├── questions_summary │ │ │ │ ├── question_identifier.dart │ │ │ │ ├── questions_summary.dart │ │ │ │ └── summary_item.dart │ │ │ ├── quiz.dart │ │ │ ├── results_screen.dart │ │ │ └── start_screen.dart │ │ └── pubspec.yaml │ └── 02 Finished │ │ ├── assets │ │ └── images │ │ │ └── quiz-logo.png │ │ ├── lib │ │ ├── answer_button.dart │ │ ├── data │ │ │ └── questions.dart │ │ ├── main.dart │ │ ├── models │ │ │ └── quiz_question.dart │ │ ├── questions_screen.dart │ │ ├── questions_summary │ │ │ ├── question_identifier.dart │ │ │ ├── questions_summary.dart │ │ │ └── summary_item.dart │ │ ├── quiz.dart │ │ ├── results_screen.dart │ │ └── start_screen.dart │ │ └── pubspec.yaml ├── 05 Interactivity & Theming │ ├── 01 Starting Setup │ │ ├── lib │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 02 Added Expense Data Model │ │ ├── lib │ │ │ ├── expenses.dart │ │ │ ├── main.dart │ │ │ └── models │ │ │ │ └── expense.dart │ │ └── pubspec.yaml │ ├── 03 Dummy Expenses │ │ ├── lib │ │ │ ├── expenses.dart │ │ │ ├── main.dart │ │ │ └── models │ │ │ │ └── expense.dart │ │ └── pubspec.yaml │ ├── 04 ListView │ │ ├── lib │ │ │ ├── expenses.dart │ │ │ ├── expenses_list.dart │ │ │ ├── main.dart │ │ │ └── models │ │ │ │ └── expense.dart │ │ └── pubspec.yaml │ ├── 05 Using Icons & Formatting Dates │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ └── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ └── pubspec.yaml │ ├── 06 AppBar │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ └── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ └── pubspec.yaml │ ├── 07 Adding Modal Sheet │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ └── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ └── pubspec.yaml │ ├── 08 Handling User Input with TextField │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 09 Getting Values on Keystroke │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 10 TextEditingController │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 11 Exercise Solution │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 12 Working with Futures │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 13 DropdownButton │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 14 Validating User Input │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 15 Saving New Expenses │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 16 Dimissible │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 17 Showing & Managing a Snackbar │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 18 Setting & Using a Color Scheme │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 19 Setting Text Themes │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 20 Using Theme in Widgets │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 21 Dark Mode │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 22 Adding Alternative Constructor Functions │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 23 Added Chart Widgets │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── chart │ │ │ │ ├── chart.dart │ │ │ │ └── chart_bar.dart │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ └── 24 Finished │ │ ├── lib │ │ ├── main.dart │ │ ├── models │ │ │ └── expense.dart │ │ └── widgets │ │ │ ├── chart │ │ │ ├── chart.dart │ │ │ └── chart_bar.dart │ │ │ ├── expenses.dart │ │ │ ├── expenses_list │ │ │ ├── expense_item.dart │ │ │ └── expenses_list.dart │ │ │ └── new_expense.dart │ │ └── pubspec.yaml ├── 06 Responsive & Adaptive │ ├── 01 Starting Setup │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── chart │ │ │ │ ├── chart.dart │ │ │ │ └── chart_bar.dart │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 02 Locking Device Orientation │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── chart │ │ │ │ ├── chart.dart │ │ │ │ └── chart_bar.dart │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 03 Updating the UI Based on Available Space │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── chart │ │ │ │ ├── chart.dart │ │ │ │ └── chart_bar.dart │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 04 Handling Screen Overlays │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── chart │ │ │ │ ├── chart.dart │ │ │ │ └── chart_bar.dart │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 05 SafeArea │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── chart │ │ │ │ ├── chart.dart │ │ │ │ └── chart_bar.dart │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ ├── 06 LayoutBuilder │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── expense.dart │ │ │ └── widgets │ │ │ │ ├── chart │ │ │ │ ├── chart.dart │ │ │ │ └── chart_bar.dart │ │ │ │ ├── expenses.dart │ │ │ │ ├── expenses_list │ │ │ │ ├── expense_item.dart │ │ │ │ └── expenses_list.dart │ │ │ │ └── new_expense.dart │ │ └── pubspec.yaml │ └── 07 Adaptive Apps & Widgets │ │ ├── lib │ │ ├── main.dart │ │ ├── models │ │ │ └── expense.dart │ │ └── widgets │ │ │ ├── chart │ │ │ ├── chart.dart │ │ │ └── chart_bar.dart │ │ │ ├── expenses.dart │ │ │ ├── expenses_list │ │ │ ├── expense_item.dart │ │ │ └── expenses_list.dart │ │ │ └── new_expense.dart │ │ └── pubspec.yaml ├── 07 Flutter Internals │ ├── 01 Starting Setup │ │ ├── lib │ │ │ ├── main.dart │ │ │ └── ui_updates_demo.dart │ │ └── pubspec.yaml │ ├── 02 Refactor & Extract Widgets │ │ ├── lib │ │ │ ├── demo_buttons.dart │ │ │ ├── keys │ │ │ │ ├── checkable_todo_item.dart │ │ │ │ ├── keys.dart │ │ │ │ └── todo_item.dart │ │ │ ├── main.dart │ │ │ └── ui_updates_demo.dart │ │ └── pubspec.yaml │ ├── 03 Keys │ │ ├── lib │ │ │ ├── demo_buttons.dart │ │ │ ├── keys │ │ │ │ ├── checkable_todo_item.dart │ │ │ │ ├── keys.dart │ │ │ │ └── todo_item.dart │ │ │ ├── main.dart │ │ │ └── ui_updates_demo.dart │ │ └── pubspec.yaml │ └── 04 Finished │ │ ├── lib │ │ ├── demo_buttons.dart │ │ ├── keys │ │ │ ├── checkable_todo_item.dart │ │ │ ├── keys.dart │ │ │ └── todo_item.dart │ │ ├── main.dart │ │ └── ui_updates_demo.dart │ │ └── pubspec.yaml ├── 08 Navigation │ ├── 01 Starting Setup │ │ ├── lib │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 02 Widgets vs Screens │ │ ├── lib │ │ │ ├── categories.dart │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 03 Displaying Category Items │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── category.dart │ │ │ ├── screens │ │ │ │ └── categories.dart │ │ │ └── widgets │ │ │ │ └── category_grid_item.dart │ │ └── pubspec.yaml │ ├── 04 InkWell │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── category.dart │ │ │ ├── screens │ │ │ │ └── categories.dart │ │ │ └── widgets │ │ │ │ └── category_grid_item.dart │ │ └── pubspec.yaml │ ├── 05 Loading Meals Data │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ └── meals.dart │ │ │ └── widgets │ │ │ │ └── category_grid_item.dart │ │ └── pubspec.yaml │ ├── 06 Adding Cross-Screen Navigation │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ └── meals.dart │ │ │ └── widgets │ │ │ │ └── category_grid_item.dart │ │ └── pubspec.yaml │ ├── 07 Passing Data to Routes │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ └── meals.dart │ │ │ └── widgets │ │ │ │ └── category_grid_item.dart │ │ └── pubspec.yaml │ ├── 08 Added MealItems │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ └── meals.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 09 Navigating to MealDetailScreen │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── meal_details.dart │ │ │ │ └── meals.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 10 Updating the MealDetailsScreen │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── meal_details.dart │ │ │ │ └── meals.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 11 Tab Navigation │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 12 Passing Functions Through Widget Layers │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 13 Managing App-wide State │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 14 Drawer │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 15 Replacing Screens │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 16 Filters Screen │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ └── 17 Finished │ │ ├── lib │ │ ├── data │ │ │ └── dummy_data.dart │ │ ├── main.dart │ │ ├── models │ │ │ ├── category.dart │ │ │ └── meal.dart │ │ ├── screens │ │ │ ├── categories.dart │ │ │ ├── filters.dart │ │ │ ├── meal_details.dart │ │ │ ├── meals.dart │ │ │ └── tabs.dart │ │ └── widgets │ │ │ ├── category_grid_item.dart │ │ │ ├── main_drawer.dart │ │ │ ├── meal_item.dart │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml ├── 09 State Management │ ├── 01 Starting Setup │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 02 Using a Provider │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── providers │ │ │ │ └── meals_provider.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 03 Triggering a Notifier Method │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── providers │ │ │ │ ├── favorites_provider.dart │ │ │ │ └── meals_provider.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 04 Combining Local & Provider State │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── providers │ │ │ │ ├── favorites_provider.dart │ │ │ │ ├── filters_provider.dart │ │ │ │ └── meals_provider.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 05 Outsourcing State to a Provider │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── providers │ │ │ │ ├── favorites_provider.dart │ │ │ │ ├── filters_provider.dart │ │ │ │ └── meals_provider.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 06 Connecting Multiple Providers │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── providers │ │ │ │ ├── favorites_provider.dart │ │ │ │ ├── filters_provider.dart │ │ │ │ └── meals_provider.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ └── 07 Finished │ │ ├── lib │ │ ├── data │ │ │ └── dummy_data.dart │ │ ├── main.dart │ │ ├── models │ │ │ ├── category.dart │ │ │ └── meal.dart │ │ ├── providers │ │ │ ├── favorites_provider.dart │ │ │ ├── filters_provider.dart │ │ │ └── meals_provider.dart │ │ ├── screens │ │ │ ├── categories.dart │ │ │ ├── filters.dart │ │ │ ├── meal_details.dart │ │ │ ├── meals.dart │ │ │ └── tabs.dart │ │ └── widgets │ │ │ ├── category_grid_item.dart │ │ │ ├── main_drawer.dart │ │ │ ├── meal_item.dart │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml ├── 10 Animations │ ├── 01 Starting Setup │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── providers │ │ │ │ ├── favorites_provider.dart │ │ │ │ ├── filters_provider.dart │ │ │ │ └── meals_provider.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 02 First explicit animation │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── providers │ │ │ │ ├── favorites_provider.dart │ │ │ │ ├── filters_provider.dart │ │ │ │ └── meals_provider.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 03 finished explicit │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── providers │ │ │ │ ├── favorites_provider.dart │ │ │ │ ├── filters_provider.dart │ │ │ │ └── meals_provider.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ ├── 04 implicit │ │ ├── lib │ │ │ ├── data │ │ │ │ └── dummy_data.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── meal.dart │ │ │ ├── providers │ │ │ │ ├── favorites_provider.dart │ │ │ │ ├── filters_provider.dart │ │ │ │ └── meals_provider.dart │ │ │ ├── screens │ │ │ │ ├── categories.dart │ │ │ │ ├── filters.dart │ │ │ │ ├── meal_details.dart │ │ │ │ ├── meals.dart │ │ │ │ └── tabs.dart │ │ │ └── widgets │ │ │ │ ├── category_grid_item.dart │ │ │ │ ├── main_drawer.dart │ │ │ │ ├── meal_item.dart │ │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml │ └── 05 Finished │ │ ├── lib │ │ ├── data │ │ │ └── dummy_data.dart │ │ ├── main.dart │ │ ├── models │ │ │ ├── category.dart │ │ │ └── meal.dart │ │ ├── providers │ │ │ ├── favorites_provider.dart │ │ │ ├── filters_provider.dart │ │ │ └── meals_provider.dart │ │ ├── screens │ │ │ ├── categories.dart │ │ │ ├── filters.dart │ │ │ ├── meal_details.dart │ │ │ ├── meals.dart │ │ │ └── tabs.dart │ │ └── widgets │ │ │ ├── category_grid_item.dart │ │ │ ├── main_drawer.dart │ │ │ ├── meal_item.dart │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml ├── 11 User Input & Forms │ ├── 01 Starting Setup │ │ ├── lib │ │ │ ├── data │ │ │ │ ├── categories.dart │ │ │ │ └── dummy_items.dart │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 02 Solution 1 - Adding Models │ │ ├── lib │ │ │ ├── data │ │ │ │ ├── categories.dart │ │ │ │ └── dummy_items.dart │ │ │ ├── main.dart │ │ │ └── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ └── pubspec.yaml │ ├── 03 Solution 2 - Building the List │ │ ├── lib │ │ │ ├── data │ │ │ │ ├── categories.dart │ │ │ │ └── dummy_items.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ └── grocery_list.dart │ │ └── pubspec.yaml │ ├── 04 Adding the New Item Screen │ │ ├── lib │ │ │ ├── data │ │ │ │ ├── categories.dart │ │ │ │ └── dummy_items.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 05 Form & DropdownButton │ │ ├── lib │ │ │ ├── data │ │ │ │ ├── categories.dart │ │ │ │ └── dummy_items.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 06 Buttons │ │ ├── lib │ │ │ ├── data │ │ │ │ ├── categories.dart │ │ │ │ └── dummy_items.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 07 Validation Logic │ │ ├── lib │ │ │ ├── data │ │ │ │ ├── categories.dart │ │ │ │ └── dummy_items.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 08 Getting Form Access gia GlobalKey │ │ ├── lib │ │ │ ├── data │ │ │ │ ├── categories.dart │ │ │ │ └── dummy_items.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 09 Extracting Entered Values │ │ ├── lib │ │ │ ├── data │ │ │ │ ├── categories.dart │ │ │ │ └── dummy_items.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 10 Passing Data Between Screens │ │ ├── lib │ │ │ ├── data │ │ │ │ └── categories.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ └── 11 Finished │ │ ├── lib │ │ ├── data │ │ │ └── categories.dart │ │ ├── main.dart │ │ ├── models │ │ │ ├── category.dart │ │ │ └── grocery_item.dart │ │ └── widgets │ │ │ ├── grocery_list.dart │ │ │ └── new_item.dart │ │ └── pubspec.yaml ├── 12 Backend & Http │ ├── 01 Starting Setup │ │ ├── lib │ │ │ ├── data │ │ │ │ └── categories.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 02 POST Request │ │ ├── lib │ │ │ ├── data │ │ │ │ └── categories.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 03 Fetching & Transforming Data │ │ ├── lib │ │ │ ├── data │ │ │ │ └── categories.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 04 Avoiding Unnecessary Requests │ │ ├── lib │ │ │ ├── data │ │ │ │ └── categories.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 05 Managing the Loading State │ │ ├── lib │ │ │ ├── data │ │ │ │ └── categories.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 06 Error Response Handling │ │ ├── lib │ │ │ ├── data │ │ │ │ └── categories.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 07 Sending Delete Requests │ │ ├── lib │ │ │ ├── data │ │ │ │ └── categories.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 08 Handling the No Data Case │ │ ├── lib │ │ │ ├── data │ │ │ │ └── categories.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ ├── 09 Better Error Handling │ │ ├── lib │ │ │ ├── data │ │ │ │ └── categories.dart │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ ├── category.dart │ │ │ │ └── grocery_item.dart │ │ │ └── widgets │ │ │ │ ├── grocery_list.dart │ │ │ │ └── new_item.dart │ │ └── pubspec.yaml │ └── 10 Alternative - FutureBuilder │ │ ├── lib │ │ ├── data │ │ │ └── categories.dart │ │ ├── main.dart │ │ ├── models │ │ │ ├── category.dart │ │ │ └── grocery_item.dart │ │ └── widgets │ │ │ ├── grocery_list.dart │ │ │ └── new_item.dart │ │ └── pubspec.yaml ├── 13 Native Device Features │ ├── 01 Starting Setup │ │ ├── lib │ │ │ └── main.dart │ │ └── pubspec.yaml │ ├── 02 Adding a Places Screen │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── places.dart │ │ │ │ └── places_detail.dart │ │ │ └── widgets │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 03 AddPlace Screen │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── places.dart │ │ │ │ └── places_detail.dart │ │ │ └── widgets │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 04 Added riverpod │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── places.dart │ │ │ │ └── places_detail.dart │ │ │ └── widgets │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 05 PlaceDetail screen │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── place_detail.dart │ │ │ │ └── places.dart │ │ │ └── widgets │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 06 Using the Device Camera │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── place_detail.dart │ │ │ │ └── places.dart │ │ │ └── widgets │ │ │ │ ├── image_input.dart │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 07 Previewing the Picked Image │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── place_detail.dart │ │ │ │ └── places.dart │ │ │ └── widgets │ │ │ │ ├── image_input.dart │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 08 Adding the Location Package │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── place_detail.dart │ │ │ │ └── places.dart │ │ │ └── widgets │ │ │ │ ├── image_input.dart │ │ │ │ ├── location_input.dart │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 09 Get Current Location │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── place_detail.dart │ │ │ │ └── places.dart │ │ │ └── widgets │ │ │ │ ├── image_input.dart │ │ │ │ ├── location_input.dart │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 10 Displaying a Location Preview │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── place_detail.dart │ │ │ │ └── places.dart │ │ │ └── widgets │ │ │ │ ├── image_input.dart │ │ │ │ ├── location_input.dart │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 11 Outputting the Location Data │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── place_detail.dart │ │ │ │ └── places.dart │ │ │ └── widgets │ │ │ │ ├── image_input.dart │ │ │ │ ├── location_input.dart │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 12 Adding a Map Screen │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── map.dart │ │ │ │ ├── place_detail.dart │ │ │ │ └── places.dart │ │ │ └── widgets │ │ │ │ ├── image_input.dart │ │ │ │ ├── location_input.dart │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 13 Using the Map Screen in the Form │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── map.dart │ │ │ │ ├── place_detail.dart │ │ │ │ └── places.dart │ │ │ └── widgets │ │ │ │ ├── image_input.dart │ │ │ │ ├── location_input.dart │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ ├── 14 Storing the Picked Image Locally │ │ ├── lib │ │ │ ├── main.dart │ │ │ ├── models │ │ │ │ └── place.dart │ │ │ ├── providers │ │ │ │ └── user_places.dart │ │ │ ├── screens │ │ │ │ ├── add_place.dart │ │ │ │ ├── map.dart │ │ │ │ ├── place_detail.dart │ │ │ │ └── places.dart │ │ │ └── widgets │ │ │ │ ├── image_input.dart │ │ │ │ ├── location_input.dart │ │ │ │ └── places_list.dart │ │ └── pubspec.yaml │ └── 15 Finished │ │ ├── lib │ │ ├── main.dart │ │ ├── models │ │ │ └── place.dart │ │ ├── providers │ │ │ └── user_places.dart │ │ ├── screens │ │ │ ├── add_place.dart │ │ │ ├── map.dart │ │ │ ├── place_detail.dart │ │ │ └── places.dart │ │ └── widgets │ │ │ ├── image_input.dart │ │ │ ├── location_input.dart │ │ │ └── places_list.dart │ │ └── pubspec.yaml └── 14 Chat App │ ├── 01 Starting Setup │ ├── lib │ │ └── main.dart │ └── pubspec.yaml │ ├── 02 Authentication Screen with Buttons │ ├── assets │ │ └── images │ │ │ └── chat.png │ ├── lib │ │ ├── main.dart │ │ └── screens │ │ │ └── auth.dart │ └── pubspec.yaml │ ├── 03 Signing Users Up │ ├── assets │ │ └── images │ │ │ └── chat.png │ ├── lib │ │ ├── firebase_options.dart │ │ ├── main.dart │ │ └── screens │ │ │ └── auth.dart │ └── pubspec.yaml │ ├── 04 Logging Users In │ ├── assets │ │ └── images │ │ │ └── chat.png │ ├── lib │ │ ├── firebase_options.dart │ │ ├── main.dart │ │ └── screens │ │ │ └── auth.dart │ └── pubspec.yaml │ ├── 05 Showing Different Screens │ ├── assets │ │ └── images │ │ │ └── chat.png │ ├── lib │ │ ├── firebase_options.dart │ │ ├── main.dart │ │ └── screens │ │ │ ├── auth.dart │ │ │ └── chat.dart │ └── pubspec.yaml │ ├── 06 Adding User Logout │ ├── assets │ │ └── images │ │ │ └── chat.png │ ├── lib │ │ ├── firebase_options.dart │ │ ├── main.dart │ │ └── screens │ │ │ ├── auth.dart │ │ │ ├── chat.dart │ │ │ └── splash.dart │ └── pubspec.yaml │ ├── 07 Uploading Images To Firebase │ ├── assets │ │ └── images │ │ │ └── chat.png │ ├── lib │ │ ├── firebase_options.dart │ │ ├── main.dart │ │ ├── screens │ │ │ ├── auth.dart │ │ │ ├── chat.dart │ │ │ └── splash.dart │ │ └── widgets │ │ │ └── user_image_picker.dart │ └── pubspec.yaml │ ├── 08 Storing a Username │ ├── assets │ │ └── images │ │ │ └── chat.png │ ├── lib │ │ ├── firebase_options.dart │ │ ├── main.dart │ │ ├── screens │ │ │ ├── auth.dart │ │ │ ├── chat.dart │ │ │ └── splash.dart │ │ └── widgets │ │ │ └── user_image_picker.dart │ └── pubspec.yaml │ ├── 09 Adding ChatMessages & Input │ ├── assets │ │ └── images │ │ │ └── chat.png │ ├── lib │ │ ├── firebase_options.dart │ │ ├── main.dart │ │ ├── screens │ │ │ ├── auth.dart │ │ │ ├── chat.dart │ │ │ └── splash.dart │ │ └── widgets │ │ │ ├── chat_messages.dart │ │ │ ├── new_message.dart │ │ │ └── user_image_picker.dart │ └── pubspec.yaml │ ├── 10 Styling Chat Message Bubbles │ ├── assets │ │ └── images │ │ │ └── chat.png │ ├── lib │ │ ├── firebase_options.dart │ │ ├── main.dart │ │ ├── screens │ │ │ ├── auth.dart │ │ │ ├── chat.dart │ │ │ └── splash.dart │ │ └── widgets │ │ │ ├── chat_messages.dart │ │ │ ├── message_bubble.dart │ │ │ ├── new_message.dart │ │ │ └── user_image_picker.dart │ └── pubspec.yaml │ └── 11 Finished │ ├── .firebaserc │ ├── firebase.json │ ├── functions │ ├── .gitignore │ ├── index.js │ ├── package-lock.json │ └── package.json │ ├── images │ └── chat.png │ ├── lib │ ├── firebase_options.dart │ ├── main.dart │ ├── screens │ │ ├── auth.dart │ │ ├── chat.dart │ │ └── splash.dart │ └── widgets │ │ ├── chat_messages.dart │ │ ├── message_bubble.dart │ │ ├── new_message.dart │ │ └── user_image_picker.dart │ └── pubspec.yaml ├── Lecture Attachments ├── 01 Getting Started │ └── main.dart ├── 02 Flutter & Dart Basics I │ ├── dice-images.zip │ └── dice-images │ │ ├── dice-1.png │ │ ├── dice-2.png │ │ ├── dice-3.png │ │ ├── dice-4.png │ │ ├── dice-5.png │ │ └── dice-6.png ├── 03 Flutter & Dart Basics II │ ├── assets.zip │ ├── assets │ │ └── images │ │ │ └── quiz-logo.png │ └── questions.dart ├── 04 Debugging │ ├── 01 Starting Setup.zip │ └── 01 Starting Setup │ │ ├── assets │ │ └── images │ │ │ └── quiz-logo.png │ │ ├── lib │ │ ├── answer_button.dart │ │ ├── data │ │ │ └── questions.dart │ │ ├── main.dart │ │ ├── models │ │ │ └── quiz_question.dart │ │ ├── questions_screen.dart │ │ ├── questions_summary │ │ │ ├── question_identifier.dart │ │ │ ├── questions_summary.dart │ │ │ └── summary_item.dart │ │ ├── quiz.dart │ │ ├── results_screen.dart │ │ └── start_screen.dart │ │ └── pubspec.yaml ├── 05 Interactivity & Theming │ └── chart │ │ ├── chart.dart │ │ └── chart_bar.dart ├── 06 Responsive & Adaptive │ ├── 01 Starting Setup.zip │ └── 01 Starting Setup │ │ ├── lib │ │ ├── main.dart │ │ ├── models │ │ │ └── expense.dart │ │ └── widgets │ │ │ ├── chart │ │ │ ├── chart.dart │ │ │ └── chart_bar.dart │ │ │ ├── expenses.dart │ │ │ ├── expenses_list │ │ │ ├── expense_item.dart │ │ │ └── expenses_list.dart │ │ │ └── new_expense.dart │ │ └── pubspec.yaml ├── 07 Flutter Internals │ ├── 01 Starting Setup.zip │ └── 01 Starting Setup │ │ ├── lib │ │ ├── main.dart │ │ └── ui_updates_demo.dart │ │ └── pubspec.yaml ├── 08 Navigation │ └── dummy_data.dart ├── 09 State Management │ ├── 01 Starting Setup.zip │ └── 01 Starting Setup │ │ ├── lib │ │ ├── data │ │ │ └── dummy_data.dart │ │ ├── main.dart │ │ ├── models │ │ │ ├── category.dart │ │ │ └── meal.dart │ │ ├── screens │ │ │ ├── categories.dart │ │ │ ├── filters.dart │ │ │ ├── meal_details.dart │ │ │ ├── meals.dart │ │ │ └── tabs.dart │ │ └── widgets │ │ │ ├── category_grid_item.dart │ │ │ ├── main_drawer.dart │ │ │ ├── meal_item.dart │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml ├── 10 Animations │ ├── 01 Starting Setup.zip │ └── 01 Starting Setup │ │ ├── lib │ │ ├── data │ │ │ └── dummy_data.dart │ │ ├── main.dart │ │ ├── models │ │ │ ├── category.dart │ │ │ └── meal.dart │ │ ├── providers │ │ │ ├── favorites_provider.dart │ │ │ ├── filters_provider.dart │ │ │ └── meals_provider.dart │ │ ├── screens │ │ │ ├── categories.dart │ │ │ ├── filters.dart │ │ │ ├── meal_details.dart │ │ │ ├── meals.dart │ │ │ └── tabs.dart │ │ └── widgets │ │ │ ├── category_grid_item.dart │ │ │ ├── main_drawer.dart │ │ │ ├── meal_item.dart │ │ │ └── meal_item_trait.dart │ │ └── pubspec.yaml ├── 11 User Input & Forms │ ├── Solution.zip │ └── Solution │ │ ├── lib │ │ ├── data │ │ │ ├── categories.dart │ │ │ └── dummy_items.dart │ │ ├── main.dart │ │ ├── models │ │ │ ├── category.dart │ │ │ └── grocery_item.dart │ │ └── widgets │ │ │ └── grocery_list.dart │ │ └── pubspec.yaml ├── 13 Native Device Features │ ├── Finished Challenge.zip │ └── Finished Challenge │ │ ├── lib │ │ ├── main.dart │ │ ├── models │ │ │ └── place.dart │ │ ├── providers │ │ │ └── user_places.dart │ │ ├── screens │ │ │ ├── add_place.dart │ │ │ ├── place_detail.dart │ │ │ └── places.dart │ │ └── widgets │ │ │ └── places_list.dart │ │ └── pubspec.yaml └── 14 Chat App │ ├── chat.png │ ├── index.js │ ├── main.dart │ └── message_bubble.dart ├── README.md └── Slides └── course-slides.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/02 Building a More Complex Widget Tree/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | void main() { 4 | runApp( 5 | const MaterialApp( 6 | home: Scaffold( 7 | body: Center( 8 | child: Text('Hello World!'), 9 | ), 10 | ), 11 | ), 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/03 How To Configure Widget & Objects/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | void main() { 4 | runApp( 5 | MaterialApp( 6 | home: Scaffold( 7 | body: Container( 8 | decoration: const BoxDecoration( 9 | gradient: LinearGradient( 10 | colors: [ 11 | Color.fromARGB(255, 26, 2, 80), 12 | Color.fromARGB(255, 45, 7, 98), 13 | ], 14 | begin: Alignment.topLeft, 15 | end: Alignment.bottomRight, 16 | ), 17 | ), 18 | child: const Center( 19 | child: Text('Hello World!'), 20 | ), 21 | ), 22 | ), 23 | ), 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/06 Splitting Code Across Files/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:basics/gradient_container.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Scaffold( 9 | body: GradientContainer(), 10 | ), 11 | ), 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/07 Practice Solution - Create A Custom Widget/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:basics/gradient_container.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Scaffold( 9 | body: GradientContainer(), 10 | ), 11 | ), 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/07 Practice Solution - Create A Custom Widget/lib/styled_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StyledText extends StatelessWidget { 4 | const StyledText({super.key}); 5 | 6 | @override 7 | Widget build(context) { 8 | return const Text( 9 | 'Hello World!', 10 | style: TextStyle( 11 | color: Colors.white, 12 | fontSize: 28, 13 | ), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/08 Var, Final, Const/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:basics/gradient_container.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Scaffold( 9 | body: GradientContainer(), 10 | ), 11 | ), 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/08 Var, Final, Const/lib/styled_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StyledText extends StatelessWidget { 4 | const StyledText({super.key}); 5 | 6 | @override 7 | Widget build(context) { 8 | return const Text( 9 | 'Hello World!', 10 | style: TextStyle( 11 | color: Colors.white, 12 | fontSize: 28, 13 | ), 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/08 Var, Final, Const/lib/variables.dart: -------------------------------------------------------------------------------- 1 | void main() {} 2 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/09 Instance Variables & Properties/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:basics/gradient_container.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Scaffold( 9 | body: GradientContainer(), 10 | ), 11 | ), 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/09 Instance Variables & Properties/lib/styled_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StyledText extends StatelessWidget { 4 | const StyledText(this.text, {super.key}); 5 | 6 | final String text; 7 | 8 | @override 9 | Widget build(context) { 10 | return Text( 11 | text, 12 | style: const TextStyle( 13 | color: Colors.white, 14 | fontSize: 28, 15 | ), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/09 Instance Variables & Properties/lib/variables.dart: -------------------------------------------------------------------------------- 1 | void main() {} 2 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/10 Practice Solution - Reusable Widgets/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:basics/gradient_container.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Scaffold( 9 | body: GradientContainer( 10 | Color.fromARGB(255, 33, 5, 109), 11 | Color.fromARGB(255, 68, 21, 149), 12 | ), 13 | ), 14 | ), 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/10 Practice Solution - Reusable Widgets/lib/styled_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StyledText extends StatelessWidget { 4 | const StyledText(this.text, {super.key}); 5 | 6 | final String text; 7 | 8 | @override 9 | Widget build(context) { 10 | return Text( 11 | text, 12 | style: const TextStyle( 13 | color: Colors.white, 14 | fontSize: 28, 15 | ), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/10 Practice Solution - Reusable Widgets/lib/variables.dart: -------------------------------------------------------------------------------- 1 | void main() {} 2 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-1.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-2.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-3.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-4.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-5.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/assets/images/dice-6.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:basics/gradient_container.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Scaffold( 9 | body: GradientContainer( 10 | Color.fromARGB(255, 33, 5, 109), 11 | Color.fromARGB(255, 68, 21, 149), 12 | ), 13 | ), 14 | ), 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/lib/styled_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StyledText extends StatelessWidget { 4 | const StyledText(this.text, {super.key}); 5 | 6 | final String text; 7 | 8 | @override 9 | Widget build(context) { 10 | return Text( 11 | text, 12 | style: const TextStyle( 13 | color: Colors.white, 14 | fontSize: 28, 15 | ), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/11 Image & Multiple Constructors/lib/variables.dart: -------------------------------------------------------------------------------- 1 | void main() {} 2 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-1.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-2.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-3.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-4.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-5.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/assets/images/dice-6.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:basics/gradient_container.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Scaffold( 9 | body: GradientContainer( 10 | Color.fromARGB(255, 33, 5, 109), 11 | Color.fromARGB(255, 68, 21, 149), 12 | ), 13 | ), 14 | ), 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/lib/styled_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StyledText extends StatelessWidget { 4 | const StyledText(this.text, {super.key}); 5 | 6 | final String text; 7 | 8 | @override 9 | Widget build(context) { 10 | return Text( 11 | text, 12 | style: const TextStyle( 13 | color: Colors.white, 14 | fontSize: 28, 15 | ), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/12 Styling Buttons/lib/variables.dart: -------------------------------------------------------------------------------- 1 | void main() {} 2 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-1.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-2.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-3.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-4.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-5.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/assets/images/dice-6.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:basics/gradient_container.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Scaffold( 9 | body: GradientContainer( 10 | Color.fromARGB(255, 33, 5, 109), 11 | Color.fromARGB(255, 68, 21, 149), 12 | ), 13 | ), 14 | ), 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/13 Introducing Stateful Widget/lib/styled_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StyledText extends StatelessWidget { 4 | const StyledText(this.text, {super.key}); 5 | 6 | final String text; 7 | 8 | @override 9 | Widget build(context) { 10 | return Text( 11 | text, 12 | style: const TextStyle( 13 | color: Colors.white, 14 | fontSize: 28, 15 | ), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-1.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-2.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-3.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-4.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-5.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/assets/images/dice-6.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:basics/gradient_container.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Scaffold( 9 | body: GradientContainer( 10 | Color.fromARGB(255, 33, 5, 109), 11 | Color.fromARGB(255, 68, 21, 149), 12 | ), 13 | ), 14 | ), 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/14 Generating Random Numbers/lib/styled_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StyledText extends StatelessWidget { 4 | const StyledText(this.text, {super.key}); 5 | 6 | final String text; 7 | 8 | @override 9 | Widget build(context) { 10 | return Text( 11 | text, 12 | style: const TextStyle( 13 | color: Colors.white, 14 | fontSize: 28, 15 | ), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-1.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-2.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-3.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-4.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-5.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/02 Flutter & Dart Basics I/15 Finished/images/dice-6.png -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/15 Finished/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:basics/gradient_container.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Scaffold( 9 | body: GradientContainer( 10 | Color.fromARGB(255, 33, 5, 109), 11 | Color.fromARGB(255, 68, 21, 149), 12 | ), 13 | ), 14 | ), 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /Code Snapshots/02 Flutter & Dart Basics I/15 Finished/lib/styled_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StyledText extends StatelessWidget { 4 | const StyledText(this.text, {super.key}); 5 | 6 | final String text; 7 | 8 | @override 9 | Widget build(context) { 10 | return Text( 11 | text, 12 | style: const TextStyle( 13 | color: Colors.white, 14 | fontSize: 28, 15 | ), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/01 Starting Setup/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/01 Starting Setup/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/01 Starting Setup/lib/main.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/02 Challenge Solution/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/02 Challenge Solution/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/02 Challenge Solution/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/start_screen.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | home: Scaffold( 9 | body: Container( 10 | decoration: const BoxDecoration( 11 | gradient: LinearGradient( 12 | colors: [ 13 | Color.fromARGB(255, 78, 13, 151), 14 | Color.fromARGB(255, 107, 15, 168), 15 | ], 16 | begin: Alignment.topLeft, 17 | end: Alignment.bottomRight, 18 | ), 19 | ), 20 | child: const StartScreen(), 21 | ), 22 | ), 23 | ), 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/03 Adding Transparency/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/03 Adding Transparency/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/03 Adding Transparency/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/start_screen.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | home: Scaffold( 9 | body: Container( 10 | decoration: const BoxDecoration( 11 | gradient: LinearGradient( 12 | colors: [ 13 | Color.fromARGB(255, 78, 13, 151), 14 | Color.fromARGB(255, 107, 15, 168), 15 | ], 16 | begin: Alignment.topLeft, 17 | end: Alignment.bottomRight, 18 | ), 19 | ), 20 | child: const StartScreen(), 21 | ), 22 | ), 23 | ), 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/04 Adding a Stateful Widget/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/04 Adding a Stateful Widget/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/04 Adding a Stateful Widget/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/04 Adding a Stateful Widget/lib/questions_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class QuestionsScreen extends StatefulWidget { 4 | const QuestionsScreen({super.key}); 5 | 6 | @override 7 | State createState() { 8 | return _QuestionsScreenState(); 9 | } 10 | } 11 | 12 | class _QuestionsScreenState extends State { 13 | @override 14 | Widget build(context) { 15 | return const Text('QuestionsScreen'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/05 initState/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/05 initState/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/05 initState/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/05 initState/lib/questions_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class QuestionsScreen extends StatefulWidget { 4 | const QuestionsScreen({super.key}); 5 | 6 | @override 7 | State createState() { 8 | return _QuestionsScreenState(); 9 | } 10 | } 11 | 12 | class _QuestionsScreenState extends State { 13 | @override 14 | Widget build(context) { 15 | return const Text('QuestionsScreen'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/06 Ternary Expressions/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/06 Ternary Expressions/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/06 Ternary Expressions/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/06 Ternary Expressions/lib/questions_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class QuestionsScreen extends StatefulWidget { 4 | const QuestionsScreen({super.key}); 5 | 6 | @override 7 | State createState() { 8 | return _QuestionsScreenState(); 9 | } 10 | } 11 | 12 | class _QuestionsScreenState extends State { 13 | @override 14 | Widget build(context) { 15 | return const Text('QuestionsScreen'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/07 if Statements/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/07 if Statements/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/07 if Statements/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/07 if Statements/lib/questions_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class QuestionsScreen extends StatefulWidget { 4 | const QuestionsScreen({super.key}); 5 | 6 | @override 7 | State createState() { 8 | return _QuestionsScreenState(); 9 | } 10 | } 11 | 12 | class _QuestionsScreenState extends State { 13 | @override 14 | Widget build(context) { 15 | return const Text('QuestionsScreen'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/08 Question Model & Dummy Questions/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/08 Question Model & Dummy Questions/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/08 Question Model & Dummy Questions/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/08 Question Model & Dummy Questions/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | } 7 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/08 Question Model & Dummy Questions/lib/questions_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class QuestionsScreen extends StatefulWidget { 4 | const QuestionsScreen({super.key}); 5 | 6 | @override 7 | State createState() { 8 | return _QuestionsScreenState(); 9 | } 10 | } 11 | 12 | class _QuestionsScreenState extends State { 13 | @override 14 | Widget build(context) { 15 | return const Text('QuestionsScreen'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/09 Creating a Custom Button/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/09 Creating a Custom Button/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/09 Creating a Custom Button/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/09 Creating a Custom Button/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | } 7 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/10 Maping Lists/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/10 Maping Lists/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/10 Maping Lists/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/10 Maping Lists/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | } 7 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/11 Mutating Values in Memory/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/11 Mutating Values in Memory/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/11 Mutating Values in Memory/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/11 Mutating Values in Memory/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/12 Managing the Questions Index/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/12 Managing the Questions Index/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/12 Managing the Questions Index/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/12 Managing the Questions Index/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/13 Google Fonts/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/13 Google Fonts/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/13 Google Fonts/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/13 Google Fonts/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/14 Passing Data via Functions/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/14 Passing Data via Functions/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/14 Passing Data via Functions/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/14 Passing Data via Functions/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/15 More Conditions/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/15 More Conditions/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/15 More Conditions/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/15 More Conditions/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/16 Getting Started with the Results Screen/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/16 Getting Started with the Results Screen/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/16 Getting Started with the Results Screen/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/16 Getting Started with the Results Screen/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/17 Accessing Map Values/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/17 Accessing Map Values/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/17 Accessing Map Values/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/17 Accessing Map Values/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/18 Expanded/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/18 Expanded/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/18 Expanded/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/18 Expanded/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/19 Filtering & Analyzing Lists/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/19 Filtering & Analyzing Lists/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/19 Filtering & Analyzing Lists/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/19 Filtering & Analyzing Lists/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/20 SingleChildScrollView/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/20 SingleChildScrollView/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/20 SingleChildScrollView/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/20 SingleChildScrollView/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/21 Time to Practice Solution/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/21 Time to Practice Solution/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/21 Time to Practice Solution/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/21 Time to Practice Solution/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List getShuffledAnswers() { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/21 Time to Practice Solution/lib/questions_summary/questions_summary.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/questions_summary/summary_item.dart'; 4 | 5 | class QuestionsSummary extends StatelessWidget { 6 | const QuestionsSummary(this.summaryData, {super.key}); 7 | 8 | final List> summaryData; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return SizedBox( 13 | height: 400, 14 | child: SingleChildScrollView( 15 | child: Column( 16 | children: summaryData.map( 17 | (data) { 18 | return SummaryItem(data); 19 | }, 20 | ).toList(), 21 | ), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/22 More Dart Features/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/03 Flutter & Dart Basics II/22 More Dart Features/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/22 More Dart Features/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/22 More Dart Features/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List get shuffledAnswers { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/03 Flutter & Dart Basics II/22 More Dart Features/lib/questions_summary/questions_summary.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/questions_summary/summary_item.dart'; 4 | 5 | class QuestionsSummary extends StatelessWidget { 6 | const QuestionsSummary(this.summaryData, {super.key}); 7 | 8 | final List> summaryData; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return SizedBox( 13 | height: 400, 14 | child: SingleChildScrollView( 15 | child: Column( 16 | children: summaryData.map( 17 | (data) { 18 | return SummaryItem(data); 19 | }, 20 | ).toList(), 21 | ), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Code Snapshots/04 Debugging/01 Starting Setup/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/04 Debugging/01 Starting Setup/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/04 Debugging/01 Starting Setup/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/04 Debugging/01 Starting Setup/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List get shuffledAnswers { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/04 Debugging/01 Starting Setup/lib/questions_summary/questions_summary.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/questions_summary/summary_item.dart'; 4 | 5 | class QuestionsSummary extends StatelessWidget { 6 | const QuestionsSummary(this.summaryData, {super.key}); 7 | 8 | final List> summaryData; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return SizedBox( 13 | height: 400, 14 | child: SingleChildScrollView( 15 | child: Column( 16 | children: summaryData.map( 17 | (data) { 18 | return SummaryItem(data); 19 | }, 20 | ).toList(), 21 | ), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Code Snapshots/04 Debugging/02 Finished/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/04 Debugging/02 Finished/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Code Snapshots/04 Debugging/02 Finished/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Code Snapshots/04 Debugging/02 Finished/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List get shuffledAnswers { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/04 Debugging/02 Finished/lib/questions_summary/questions_summary.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/questions_summary/summary_item.dart'; 4 | 5 | class QuestionsSummary extends StatelessWidget { 6 | const QuestionsSummary(this.summaryData, {super.key}); 7 | 8 | final List> summaryData; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return SizedBox( 13 | height: 400, 14 | child: SingleChildScrollView( 15 | child: Column( 16 | children: summaryData.map( 17 | (data) { 18 | return SummaryItem(data); 19 | }, 20 | ).toList(), 21 | ), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/01 Starting Setup/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: ..., 9 | ), 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/02 Added Expense Data Model/lib/expenses.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Expenses extends StatefulWidget { 4 | const Expenses({super.key}); 5 | 6 | @override 7 | State createState() { 8 | return _ExpensesState(); 9 | } 10 | } 11 | 12 | class _ExpensesState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | body: Column( 17 | children: const [ 18 | Text('The chart'), 19 | Text('Expenses list...'), 20 | ], 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/02 Added Expense Data Model/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Expenses(), 9 | ), 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/02 Added Expense Data Model/lib/models/expense.dart: -------------------------------------------------------------------------------- 1 | import 'package:uuid/uuid.dart'; 2 | 3 | const uuid = Uuid(); 4 | 5 | enum Category { food, travel, leisure, work } 6 | 7 | class Expense { 8 | Expense({ 9 | required this.title, 10 | required this.amount, 11 | required this.date, 12 | required this.category, 13 | }) : id = uuid.v4(); 14 | 15 | final String id; 16 | final String title; 17 | final double amount; 18 | final DateTime date; 19 | final Category category; 20 | } 21 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/03 Dummy Expenses/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Expenses(), 9 | ), 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/03 Dummy Expenses/lib/models/expense.dart: -------------------------------------------------------------------------------- 1 | import 'package:uuid/uuid.dart'; 2 | 3 | const uuid = Uuid(); 4 | 5 | enum Category { food, travel, leisure, work } 6 | 7 | class Expense { 8 | Expense({ 9 | required this.title, 10 | required this.amount, 11 | required this.date, 12 | required this.category, 13 | }) : id = uuid.v4(); 14 | 15 | final String id; 16 | final String title; 17 | final double amount; 18 | final DateTime date; 19 | final Category category; 20 | } 21 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/04 ListView/lib/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/models/expense.dart'; 4 | 5 | class ExpensesList extends StatelessWidget { 6 | const ExpensesList({ 7 | super.key, 8 | required this.expenses, 9 | }); 10 | 11 | final List expenses; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return ListView.builder( 16 | itemCount: expenses.length, 17 | itemBuilder: (ctx, index) => Text(expenses[index].title), 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/04 ListView/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Expenses(), 9 | ), 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/04 ListView/lib/models/expense.dart: -------------------------------------------------------------------------------- 1 | import 'package:uuid/uuid.dart'; 2 | 3 | const uuid = Uuid(); 4 | 5 | enum Category { food, travel, leisure, work } 6 | 7 | class Expense { 8 | Expense({ 9 | required this.title, 10 | required this.amount, 11 | required this.date, 12 | required this.category, 13 | }) : id = uuid.v4(); 14 | 15 | final String id; 16 | final String title; 17 | final double amount; 18 | final DateTime date; 19 | final Category category; 20 | } 21 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/05 Using Icons & Formatting Dates/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | const MaterialApp( 8 | home: Expenses(), 9 | ), 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/05 Using Icons & Formatting Dates/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/06 AppBar/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/06 AppBar/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/07 Adding Modal Sheet/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/07 Adding Modal Sheet/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/08 Handling User Input with TextField/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/08 Handling User Input with TextField/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/09 Getting Values on Keystroke/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/09 Getting Values on Keystroke/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/10 TextEditingController/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/10 TextEditingController/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/11 Exercise Solution/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/11 Exercise Solution/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/12 Working with Futures/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/12 Working with Futures/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/13 DropdownButton/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/13 DropdownButton/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/14 Validating User Input/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/14 Validating User Input/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/15 Saving New Expenses/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/15 Saving New Expenses/lib/widgets/expenses_list/expenses_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses_list/expense_item.dart'; 4 | import 'package:expense_tracker/models/expense.dart'; 5 | 6 | class ExpensesList extends StatelessWidget { 7 | const ExpensesList({ 8 | super.key, 9 | required this.expenses, 10 | }); 11 | 12 | final List expenses; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListView.builder( 17 | itemCount: expenses.length, 18 | itemBuilder: (ctx, index) => ExpenseItem(expenses[index]), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/16 Dimissible/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/17 Showing & Managing a Snackbar/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | void main() { 6 | runApp( 7 | MaterialApp( 8 | theme: ThemeData(useMaterial3: true), 9 | home: const Expenses(), 10 | ), 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/05 Interactivity & Theming/18 Setting & Using a Color Scheme/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:expense_tracker/widgets/expenses.dart'; 4 | 5 | var kColorScheme = ColorScheme.fromSeed( 6 | seedColor: const Color.fromARGB(255, 96, 59, 181), 7 | ); 8 | 9 | void main() { 10 | runApp( 11 | MaterialApp( 12 | theme: ThemeData().copyWith( 13 | useMaterial3: true, 14 | colorScheme: kColorScheme, 15 | appBarTheme: const AppBarTheme().copyWith( 16 | backgroundColor: kColorScheme.onPrimaryContainer, 17 | foregroundColor: kColorScheme.primaryContainer, 18 | )), 19 | home: const Expenses(), 20 | ), 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /Code Snapshots/07 Flutter Internals/01 Starting Setup/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:flutter_internals/ui_updates_demo.dart'; 4 | 5 | void main() { 6 | runApp(const App()); 7 | } 8 | 9 | class App extends StatelessWidget { 10 | const App({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return MaterialApp( 15 | theme: ThemeData(useMaterial3: true), 16 | home: Scaffold( 17 | appBar: AppBar( 18 | title: const Text('Flutter Internals'), 19 | ), 20 | body: const UIUpdatesDemo(), 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Code Snapshots/07 Flutter Internals/02 Refactor & Extract Widgets/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:flutter_internals/ui_updates_demo.dart'; 4 | 5 | void main() { 6 | runApp(const App()); 7 | } 8 | 9 | class App extends StatelessWidget { 10 | const App({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return MaterialApp( 15 | theme: ThemeData(useMaterial3: true), 16 | home: Scaffold( 17 | appBar: AppBar( 18 | title: const Text('Flutter Internals'), 19 | ), 20 | body: const UIUpdatesDemo(), 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Code Snapshots/07 Flutter Internals/03 Keys/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | // import 'package:flutter_internals/ui_updates_demo.dart'; 4 | import 'package:flutter_internals/keys/keys.dart'; 5 | 6 | void main() { 7 | runApp(const App()); 8 | } 9 | 10 | class App extends StatelessWidget { 11 | const App({super.key}); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return MaterialApp( 16 | theme: ThemeData(useMaterial3: true), 17 | home: Scaffold( 18 | appBar: AppBar( 19 | title: const Text('Flutter Internals'), 20 | ), 21 | body: const Keys(), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Code Snapshots/07 Flutter Internals/04 Finished/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | // import 'package:flutter_internals/ui_updates_demo.dart'; 4 | import 'package:flutter_internals/keys/keys.dart'; 5 | 6 | void main() { 7 | var numbers = [1, 2, 3]; 8 | // numbers = [4, 5, 6]; 9 | numbers.add(4); 10 | 11 | runApp(const App()); 12 | } 13 | 14 | class App extends StatelessWidget { 15 | const App({super.key}); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return MaterialApp( 20 | theme: ThemeData(useMaterial3: true), 21 | home: Scaffold( 22 | appBar: AppBar( 23 | title: const Text('Flutter Internals'), 24 | ), 25 | body: const Keys(), 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/01 Starting Setup/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:google_fonts/google_fonts.dart'; 4 | 5 | final theme = ThemeData( 6 | useMaterial3: true, 7 | colorScheme: ColorScheme.fromSeed( 8 | brightness: Brightness.dark, 9 | seedColor: const Color.fromARGB(255, 131, 57, 0), 10 | ), 11 | textTheme: GoogleFonts.latoTextTheme(), 12 | ); 13 | 14 | void main() { 15 | runApp(const App()); 16 | } 17 | 18 | class App extends StatelessWidget { 19 | const App({super.key}); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return MaterialApp( 24 | theme: theme, 25 | home: // Todo ..., 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/02 Widgets vs Screens/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:meals/categories.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const CategoriesScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/03 Displaying Category Items/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:meals/screens/categories.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const CategoriesScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/03 Displaying Category Items/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/04 InkWell/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:meals/screens/categories.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const CategoriesScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/04 InkWell/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/05 Loading Meals Data/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/06 Adding Cross-Screen Navigation/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:meals/screens/categories.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const CategoriesScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/06 Adding Cross-Screen Navigation/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/07 Passing Data to Routes/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:meals/screens/categories.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const CategoriesScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/07 Passing Data to Routes/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/08 Added MealItems/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:meals/screens/categories.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const CategoriesScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/08 Added MealItems/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/08 Added MealItems/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/09 Navigating to MealDetailScreen/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:meals/screens/categories.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const CategoriesScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/09 Navigating to MealDetailScreen/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/09 Navigating to MealDetailScreen/lib/screens/meal_details.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:meals/models/meal.dart'; 4 | 5 | class MealDetailsScreen extends StatelessWidget { 6 | const MealDetailsScreen({ 7 | super.key, 8 | required this.meal, 9 | }); 10 | 11 | final Meal meal; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: AppBar( 17 | title: Text(meal.title), 18 | ), 19 | body: Image.network( 20 | meal.imageUrl, 21 | height: 300, 22 | width: double.infinity, 23 | fit: BoxFit.cover, 24 | ), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/09 Navigating to MealDetailScreen/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/10 Updating the MealDetailsScreen/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:google_fonts/google_fonts.dart'; 4 | import 'package:meals/screens/categories.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const CategoriesScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/10 Updating the MealDetailsScreen/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/10 Updating the MealDetailsScreen/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/11 Tab Navigation/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | import 'package:meals/screens/tabs.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const TabsScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/11 Tab Navigation/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/11 Tab Navigation/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/12 Passing Functions Through Widget Layers/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | import 'package:meals/screens/tabs.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const TabsScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/12 Passing Functions Through Widget Layers/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/12 Passing Functions Through Widget Layers/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/13 Managing App-wide State/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | import 'package:meals/screens/tabs.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const TabsScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/13 Managing App-wide State/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/13 Managing App-wide State/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/14 Drawer/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | import 'package:meals/screens/tabs.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const TabsScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/14 Drawer/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/14 Drawer/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/15 Replacing Screens/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | import 'package:meals/screens/tabs.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const TabsScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/15 Replacing Screens/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/15 Replacing Screens/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/16 Filters Screen/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | import 'package:meals/screens/tabs.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const TabsScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/16 Filters Screen/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/16 Filters Screen/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/17 Finished/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | import 'package:meals/screens/tabs.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const TabsScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/17 Finished/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/08 Navigation/17 Finished/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/01 Starting Setup/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | import 'package:meals/screens/tabs.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const TabsScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/01 Starting Setup/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/01 Starting Setup/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/02 Using a Provider/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/02 Using a Provider/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/02 Using a Provider/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/03 Triggering a Notifier Method/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/03 Triggering a Notifier Method/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/03 Triggering a Notifier Method/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/04 Combining Local & Provider State/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/04 Combining Local & Provider State/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/04 Combining Local & Provider State/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/05 Outsourcing State to a Provider/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/05 Outsourcing State to a Provider/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/05 Outsourcing State to a Provider/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/06 Connecting Multiple Providers/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/06 Connecting Multiple Providers/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/06 Connecting Multiple Providers/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/07 Finished/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/07 Finished/lib/providers/favorites_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/models/meal.dart'; 4 | 5 | class FavoriteMealsNotifier extends StateNotifier> { 6 | FavoriteMealsNotifier() : super([]); 7 | 8 | bool toggleMealFavoriteStatus(Meal meal) { 9 | final mealIsFavorite = state.contains(meal); 10 | 11 | if (mealIsFavorite) { 12 | state = state.where((m) => m.id != meal.id).toList(); 13 | return false; 14 | } else { 15 | state = [...state, meal]; 16 | return true; 17 | } 18 | } 19 | } 20 | 21 | final favoriteMealsProvider = 22 | StateNotifierProvider>((ref) { 23 | return FavoriteMealsNotifier(); 24 | }); 25 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/07 Finished/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/09 State Management/07 Finished/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/01 Starting Setup/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/01 Starting Setup/lib/providers/favorites_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/models/meal.dart'; 4 | 5 | class FavoriteMealsNotifier extends StateNotifier> { 6 | FavoriteMealsNotifier() : super([]); 7 | 8 | bool toggleMealFavoriteStatus(Meal meal) { 9 | final mealIsFavorite = state.contains(meal); 10 | 11 | if (mealIsFavorite) { 12 | state = state.where((m) => m.id != meal.id).toList(); 13 | return false; 14 | } else { 15 | state = [...state, meal]; 16 | return true; 17 | } 18 | } 19 | } 20 | 21 | final favoriteMealsProvider = 22 | StateNotifierProvider>((ref) { 23 | return FavoriteMealsNotifier(); 24 | }); 25 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/01 Starting Setup/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/01 Starting Setup/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/02 First explicit animation/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/02 First explicit animation/lib/providers/favorites_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/models/meal.dart'; 4 | 5 | class FavoriteMealsNotifier extends StateNotifier> { 6 | FavoriteMealsNotifier() : super([]); 7 | 8 | bool toggleMealFavoriteStatus(Meal meal) { 9 | final mealIsFavorite = state.contains(meal); 10 | 11 | if (mealIsFavorite) { 12 | state = state.where((m) => m.id != meal.id).toList(); 13 | return false; 14 | } else { 15 | state = [...state, meal]; 16 | return true; 17 | } 18 | } 19 | } 20 | 21 | final favoriteMealsProvider = 22 | StateNotifierProvider>((ref) { 23 | return FavoriteMealsNotifier(); 24 | }); 25 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/02 First explicit animation/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/02 First explicit animation/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/03 finished explicit/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/03 finished explicit/lib/providers/favorites_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/models/meal.dart'; 4 | 5 | class FavoriteMealsNotifier extends StateNotifier> { 6 | FavoriteMealsNotifier() : super([]); 7 | 8 | bool toggleMealFavoriteStatus(Meal meal) { 9 | final mealIsFavorite = state.contains(meal); 10 | 11 | if (mealIsFavorite) { 12 | state = state.where((m) => m.id != meal.id).toList(); 13 | return false; 14 | } else { 15 | state = [...state, meal]; 16 | return true; 17 | } 18 | } 19 | } 20 | 21 | final favoriteMealsProvider = 22 | StateNotifierProvider>((ref) { 23 | return FavoriteMealsNotifier(); 24 | }); 25 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/03 finished explicit/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/03 finished explicit/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/04 implicit/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/04 implicit/lib/providers/favorites_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/models/meal.dart'; 4 | 5 | class FavoriteMealsNotifier extends StateNotifier> { 6 | FavoriteMealsNotifier() : super([]); 7 | 8 | bool toggleMealFavoriteStatus(Meal meal) { 9 | final mealIsFavorite = state.contains(meal); 10 | 11 | if (mealIsFavorite) { 12 | state = state.where((m) => m.id != meal.id).toList(); 13 | return false; 14 | } else { 15 | state = [...state, meal]; 16 | return true; 17 | } 18 | } 19 | } 20 | 21 | final favoriteMealsProvider = 22 | StateNotifierProvider>((ref) { 23 | return FavoriteMealsNotifier(); 24 | }); 25 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/04 implicit/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/04 implicit/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/05 Finished/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/05 Finished/lib/providers/favorites_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/models/meal.dart'; 4 | 5 | class FavoriteMealsNotifier extends StateNotifier> { 6 | FavoriteMealsNotifier() : super([]); 7 | 8 | bool toggleMealFavoriteStatus(Meal meal) { 9 | final mealIsFavorite = state.contains(meal); 10 | 11 | if (mealIsFavorite) { 12 | state = state.where((m) => m.id != meal.id).toList(); 13 | return false; 14 | } else { 15 | state = [...state, meal]; 16 | return true; 17 | } 18 | } 19 | } 20 | 21 | final favoriteMealsProvider = 22 | StateNotifierProvider>((ref) { 23 | return FavoriteMealsNotifier(); 24 | }); 25 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/05 Finished/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Code Snapshots/10 Animations/05 Finished/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/01 Starting Setup/lib/data/dummy_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/grocery_item.dart'; 2 | import 'package:shopping_list/data/categories.dart'; 3 | 4 | const groceryItems = [ 5 | GroceryItem( 6 | id: 'a', 7 | name: 'Milk', 8 | quantity: 1, 9 | category: categories[Categories.dairy]!), 10 | GroceryItem( 11 | id: 'b', 12 | name: 'Bananas', 13 | quantity: 5, 14 | category: categories[Categories.fruit]!), 15 | GroceryItem( 16 | id: 'c', 17 | name: 'Beef Steak', 18 | quantity: 1, 19 | category: categories[Categories.meat]!), 20 | ]; 21 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/02 Solution 1 - Adding Models/lib/data/dummy_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/grocery_item.dart'; 2 | import 'package:shopping_list/models/category.dart'; 3 | import 'package:shopping_list/data/categories.dart'; 4 | 5 | final groceryItems = [ 6 | GroceryItem( 7 | id: 'a', 8 | name: 'Milk', 9 | quantity: 1, 10 | category: categories[Categories.dairy]!), 11 | GroceryItem( 12 | id: 'b', 13 | name: 'Bananas', 14 | quantity: 5, 15 | category: categories[Categories.fruit]!), 16 | GroceryItem( 17 | id: 'c', 18 | name: 'Beef Steak', 19 | quantity: 1, 20 | category: categories[Categories.meat]!), 21 | ]; 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/02 Solution 1 - Adding Models/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/02 Solution 1 - Adding Models/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/03 Solution 2 - Building the List/lib/data/dummy_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/grocery_item.dart'; 2 | import 'package:shopping_list/models/category.dart'; 3 | import 'package:shopping_list/data/categories.dart'; 4 | 5 | final groceryItems = [ 6 | GroceryItem( 7 | id: 'a', 8 | name: 'Milk', 9 | quantity: 1, 10 | category: categories[Categories.dairy]!), 11 | GroceryItem( 12 | id: 'b', 13 | name: 'Bananas', 14 | quantity: 5, 15 | category: categories[Categories.fruit]!), 16 | GroceryItem( 17 | id: 'c', 18 | name: 'Beef Steak', 19 | quantity: 1, 20 | category: categories[Categories.meat]!), 21 | ]; 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/03 Solution 2 - Building the List/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/03 Solution 2 - Building the List/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/04 Adding the New Item Screen/lib/data/dummy_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/grocery_item.dart'; 2 | import 'package:shopping_list/models/category.dart'; 3 | import 'package:shopping_list/data/categories.dart'; 4 | 5 | final groceryItems = [ 6 | GroceryItem( 7 | id: 'a', 8 | name: 'Milk', 9 | quantity: 1, 10 | category: categories[Categories.dairy]!), 11 | GroceryItem( 12 | id: 'b', 13 | name: 'Bananas', 14 | quantity: 5, 15 | category: categories[Categories.fruit]!), 16 | GroceryItem( 17 | id: 'c', 18 | name: 'Beef Steak', 19 | quantity: 1, 20 | category: categories[Categories.meat]!), 21 | ]; 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/04 Adding the New Item Screen/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/04 Adding the New Item Screen/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/04 Adding the New Item Screen/lib/widgets/new_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NewItem extends StatefulWidget { 4 | const NewItem({super.key}); 5 | 6 | @override 7 | State createState() { 8 | return _NewItemState(); 9 | } 10 | } 11 | 12 | class _NewItemState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: AppBar( 17 | title: const Text('Add a new item'), 18 | ), 19 | body: Padding( 20 | padding: const EdgeInsets.all(12), 21 | child: Text('The form'), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/05 Form & DropdownButton/lib/data/dummy_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/grocery_item.dart'; 2 | import 'package:shopping_list/models/category.dart'; 3 | import 'package:shopping_list/data/categories.dart'; 4 | 5 | final groceryItems = [ 6 | GroceryItem( 7 | id: 'a', 8 | name: 'Milk', 9 | quantity: 1, 10 | category: categories[Categories.dairy]!), 11 | GroceryItem( 12 | id: 'b', 13 | name: 'Bananas', 14 | quantity: 5, 15 | category: categories[Categories.fruit]!), 16 | GroceryItem( 17 | id: 'c', 18 | name: 'Beef Steak', 19 | quantity: 1, 20 | category: categories[Categories.meat]!), 21 | ]; 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/05 Form & DropdownButton/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/05 Form & DropdownButton/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/06 Buttons/lib/data/dummy_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/grocery_item.dart'; 2 | import 'package:shopping_list/models/category.dart'; 3 | import 'package:shopping_list/data/categories.dart'; 4 | 5 | final groceryItems = [ 6 | GroceryItem( 7 | id: 'a', 8 | name: 'Milk', 9 | quantity: 1, 10 | category: categories[Categories.dairy]!), 11 | GroceryItem( 12 | id: 'b', 13 | name: 'Bananas', 14 | quantity: 5, 15 | category: categories[Categories.fruit]!), 16 | GroceryItem( 17 | id: 'c', 18 | name: 'Beef Steak', 19 | quantity: 1, 20 | category: categories[Categories.meat]!), 21 | ]; 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/06 Buttons/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/06 Buttons/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/07 Validation Logic/lib/data/dummy_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/grocery_item.dart'; 2 | import 'package:shopping_list/models/category.dart'; 3 | import 'package:shopping_list/data/categories.dart'; 4 | 5 | final groceryItems = [ 6 | GroceryItem( 7 | id: 'a', 8 | name: 'Milk', 9 | quantity: 1, 10 | category: categories[Categories.dairy]!), 11 | GroceryItem( 12 | id: 'b', 13 | name: 'Bananas', 14 | quantity: 5, 15 | category: categories[Categories.fruit]!), 16 | GroceryItem( 17 | id: 'c', 18 | name: 'Beef Steak', 19 | quantity: 1, 20 | category: categories[Categories.meat]!), 21 | ]; 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/07 Validation Logic/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/07 Validation Logic/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/08 Getting Form Access gia GlobalKey/lib/data/dummy_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/grocery_item.dart'; 2 | import 'package:shopping_list/models/category.dart'; 3 | import 'package:shopping_list/data/categories.dart'; 4 | 5 | final groceryItems = [ 6 | GroceryItem( 7 | id: 'a', 8 | name: 'Milk', 9 | quantity: 1, 10 | category: categories[Categories.dairy]!), 11 | GroceryItem( 12 | id: 'b', 13 | name: 'Bananas', 14 | quantity: 5, 15 | category: categories[Categories.fruit]!), 16 | GroceryItem( 17 | id: 'c', 18 | name: 'Beef Steak', 19 | quantity: 1, 20 | category: categories[Categories.meat]!), 21 | ]; 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/08 Getting Form Access gia GlobalKey/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/08 Getting Form Access gia GlobalKey/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/09 Extracting Entered Values/lib/data/dummy_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/grocery_item.dart'; 2 | import 'package:shopping_list/models/category.dart'; 3 | import 'package:shopping_list/data/categories.dart'; 4 | 5 | final groceryItems = [ 6 | GroceryItem( 7 | id: 'a', 8 | name: 'Milk', 9 | quantity: 1, 10 | category: categories[Categories.dairy]!), 11 | GroceryItem( 12 | id: 'b', 13 | name: 'Bananas', 14 | quantity: 5, 15 | category: categories[Categories.fruit]!), 16 | GroceryItem( 17 | id: 'c', 18 | name: 'Beef Steak', 19 | quantity: 1, 20 | category: categories[Categories.meat]!), 21 | ]; 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/09 Extracting Entered Values/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/09 Extracting Entered Values/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/10 Passing Data Between Screens/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/10 Passing Data Between Screens/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/11 Finished/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/11 User Input & Forms/11 Finished/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/01 Starting Setup/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/01 Starting Setup/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/02 POST Request/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/02 POST Request/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/03 Fetching & Transforming Data/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/03 Fetching & Transforming Data/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/04 Avoiding Unnecessary Requests/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/04 Avoiding Unnecessary Requests/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/05 Managing the Loading State/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/05 Managing the Loading State/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/06 Error Response Handling/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/06 Error Response Handling/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/07 Sending Delete Requests/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/07 Sending Delete Requests/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/08 Handling the No Data Case/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/08 Handling the No Data Case/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/09 Better Error Handling/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/09 Better Error Handling/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/10 Alternative - FutureBuilder/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Code Snapshots/12 Backend & Http/10 Alternative - FutureBuilder/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/02 Adding a Places Screen/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'package:uuid/uuid.dart'; 2 | 3 | const uuid = Uuid(); 4 | 5 | class Place { 6 | Place({required this.title}) : id = uuid.v4(); 7 | 8 | final String id; 9 | final String title; 10 | } 11 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/02 Adding a Places Screen/lib/screens/add_place.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/13 Native Device Features/02 Adding a Places Screen/lib/screens/add_place.dart -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/02 Adding a Places Screen/lib/screens/places.dart: -------------------------------------------------------------------------------- 1 | import 'package:favorite_places/widgets/places_list.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class PlacesScreen extends StatelessWidget { 5 | const PlacesScreen({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Scaffold( 10 | appBar: AppBar( 11 | title: const Text('Your Places'), 12 | actions: [ 13 | IconButton( 14 | icon: const Icon(Icons.add), 15 | onPressed: () {}, 16 | ), 17 | ], 18 | ), 19 | body: PlacesList( 20 | places: [], 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/02 Adding a Places Screen/lib/screens/places_detail.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/13 Native Device Features/02 Adding a Places Screen/lib/screens/places_detail.dart -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/03 AddPlace Screen/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'package:uuid/uuid.dart'; 2 | 3 | const uuid = Uuid(); 4 | 5 | class Place { 6 | Place({required this.title}) : id = uuid.v4(); 7 | 8 | final String id; 9 | final String title; 10 | } 11 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/03 AddPlace Screen/lib/screens/places_detail.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/13 Native Device Features/03 AddPlace Screen/lib/screens/places_detail.dart -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/04 Added riverpod/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'package:uuid/uuid.dart'; 2 | 3 | const uuid = Uuid(); 4 | 5 | class Place { 6 | Place({required this.title}) : id = uuid.v4(); 7 | 8 | final String id; 9 | final String title; 10 | } 11 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/04 Added riverpod/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:favorite_places/models/place.dart'; 4 | 5 | class UserPlacesNotifier extends StateNotifier> { 6 | UserPlacesNotifier() : super(const []); 7 | 8 | void addPlace(String title) { 9 | final newPlace = Place(title: title); 10 | state = [newPlace, ...state]; 11 | } 12 | } 13 | 14 | final userPlacesProvider = 15 | StateNotifierProvider>( 16 | (ref) => UserPlacesNotifier(), 17 | ); 18 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/04 Added riverpod/lib/screens/places_detail.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/13 Native Device Features/04 Added riverpod/lib/screens/places_detail.dart -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/05 PlaceDetail screen/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'package:uuid/uuid.dart'; 2 | 3 | const uuid = Uuid(); 4 | 5 | class Place { 6 | Place({required this.title}) : id = uuid.v4(); 7 | 8 | final String id; 9 | final String title; 10 | } 11 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/05 PlaceDetail screen/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:favorite_places/models/place.dart'; 4 | 5 | class UserPlacesNotifier extends StateNotifier> { 6 | UserPlacesNotifier() : super(const []); 7 | 8 | void addPlace(String title) { 9 | final newPlace = Place(title: title); 10 | state = [newPlace, ...state]; 11 | } 12 | } 13 | 14 | final userPlacesProvider = 15 | StateNotifierProvider>( 16 | (ref) => UserPlacesNotifier(), 17 | ); 18 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/06 Using the Device Camera/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'package:uuid/uuid.dart'; 2 | 3 | const uuid = Uuid(); 4 | 5 | class Place { 6 | Place({required this.title}) : id = uuid.v4(); 7 | 8 | final String id; 9 | final String title; 10 | } 11 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/06 Using the Device Camera/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:favorite_places/models/place.dart'; 4 | 5 | class UserPlacesNotifier extends StateNotifier> { 6 | UserPlacesNotifier() : super(const []); 7 | 8 | void addPlace(String title) { 9 | final newPlace = Place(title: title); 10 | state = [newPlace, ...state]; 11 | } 12 | } 13 | 14 | final userPlacesProvider = 15 | StateNotifierProvider>( 16 | (ref) => UserPlacesNotifier(), 17 | ); 18 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/07 Previewing the Picked Image/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:uuid/uuid.dart'; 4 | 5 | const uuid = Uuid(); 6 | 7 | class Place { 8 | Place({required this.title, required this.image}) : id = uuid.v4(); 9 | 10 | final String id; 11 | final String title; 12 | final File image; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/07 Previewing the Picked Image/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 4 | 5 | import 'package:favorite_places/models/place.dart'; 6 | 7 | class UserPlacesNotifier extends StateNotifier> { 8 | UserPlacesNotifier() : super(const []); 9 | 10 | void addPlace(String title, File image) { 11 | final newPlace = Place(title: title, image: image); 12 | state = [newPlace, ...state]; 13 | } 14 | } 15 | 16 | final userPlacesProvider = 17 | StateNotifierProvider>( 18 | (ref) => UserPlacesNotifier(), 19 | ); 20 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/08 Adding the Location Package/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:uuid/uuid.dart'; 4 | 5 | const uuid = Uuid(); 6 | 7 | class Place { 8 | Place({required this.title, required this.image}) : id = uuid.v4(); 9 | 10 | final String id; 11 | final String title; 12 | final File image; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/08 Adding the Location Package/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 4 | 5 | import 'package:favorite_places/models/place.dart'; 6 | 7 | class UserPlacesNotifier extends StateNotifier> { 8 | UserPlacesNotifier() : super(const []); 9 | 10 | void addPlace(String title, File image) { 11 | final newPlace = Place(title: title, image: image); 12 | state = [newPlace, ...state]; 13 | } 14 | } 15 | 16 | final userPlacesProvider = 17 | StateNotifierProvider>( 18 | (ref) => UserPlacesNotifier(), 19 | ); 20 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/09 Get Current Location/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:uuid/uuid.dart'; 4 | 5 | const uuid = Uuid(); 6 | 7 | class Place { 8 | Place({required this.title, required this.image}) : id = uuid.v4(); 9 | 10 | final String id; 11 | final String title; 12 | final File image; 13 | } 14 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/09 Get Current Location/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 4 | 5 | import 'package:favorite_places/models/place.dart'; 6 | 7 | class UserPlacesNotifier extends StateNotifier> { 8 | UserPlacesNotifier() : super(const []); 9 | 10 | void addPlace(String title, File image) { 11 | final newPlace = Place(title: title, image: image); 12 | state = [newPlace, ...state]; 13 | } 14 | } 15 | 16 | final userPlacesProvider = 17 | StateNotifierProvider>( 18 | (ref) => UserPlacesNotifier(), 19 | ); 20 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/10 Displaying a Location Preview/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:uuid/uuid.dart'; 4 | 5 | const uuid = Uuid(); 6 | 7 | class PlaceLocation { 8 | const PlaceLocation({ 9 | required this.latitude, 10 | required this.longitude, 11 | required this.address, 12 | }); 13 | 14 | final double latitude; 15 | final double longitude; 16 | final String address; 17 | } 18 | 19 | class Place { 20 | Place({ 21 | required this.title, 22 | required this.image, 23 | // required this.location, 24 | }) : id = uuid.v4(); 25 | 26 | final String id; 27 | final String title; 28 | final File image; 29 | // final PlaceLocation location; 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/10 Displaying a Location Preview/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 4 | 5 | import 'package:favorite_places/models/place.dart'; 6 | 7 | class UserPlacesNotifier extends StateNotifier> { 8 | UserPlacesNotifier() : super(const []); 9 | 10 | void addPlace(String title, File image) { 11 | final newPlace = Place(title: title, image: image); 12 | state = [newPlace, ...state]; 13 | } 14 | } 15 | 16 | final userPlacesProvider = 17 | StateNotifierProvider>( 18 | (ref) => UserPlacesNotifier(), 19 | ); 20 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/11 Outputting the Location Data/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:uuid/uuid.dart'; 4 | 5 | const uuid = Uuid(); 6 | 7 | class PlaceLocation { 8 | const PlaceLocation({ 9 | required this.latitude, 10 | required this.longitude, 11 | required this.address, 12 | }); 13 | 14 | final double latitude; 15 | final double longitude; 16 | final String address; 17 | } 18 | 19 | class Place { 20 | Place({ 21 | required this.title, 22 | required this.image, 23 | required this.location, 24 | }) : id = uuid.v4(); 25 | 26 | final String id; 27 | final String title; 28 | final File image; 29 | final PlaceLocation location; 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/11 Outputting the Location Data/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 4 | 5 | import 'package:favorite_places/models/place.dart'; 6 | 7 | class UserPlacesNotifier extends StateNotifier> { 8 | UserPlacesNotifier() : super(const []); 9 | 10 | void addPlace(String title, File image, PlaceLocation location) { 11 | final newPlace = Place(title: title, image: image, location: location); 12 | state = [newPlace, ...state]; 13 | } 14 | } 15 | 16 | final userPlacesProvider = 17 | StateNotifierProvider>( 18 | (ref) => UserPlacesNotifier(), 19 | ); 20 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/12 Adding a Map Screen/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:uuid/uuid.dart'; 4 | 5 | const uuid = Uuid(); 6 | 7 | class PlaceLocation { 8 | const PlaceLocation({ 9 | required this.latitude, 10 | required this.longitude, 11 | required this.address, 12 | }); 13 | 14 | final double latitude; 15 | final double longitude; 16 | final String address; 17 | } 18 | 19 | class Place { 20 | Place({ 21 | required this.title, 22 | required this.image, 23 | required this.location, 24 | }) : id = uuid.v4(); 25 | 26 | final String id; 27 | final String title; 28 | final File image; 29 | final PlaceLocation location; 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/12 Adding a Map Screen/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 4 | 5 | import 'package:favorite_places/models/place.dart'; 6 | 7 | class UserPlacesNotifier extends StateNotifier> { 8 | UserPlacesNotifier() : super(const []); 9 | 10 | void addPlace(String title, File image, PlaceLocation location) { 11 | final newPlace = Place(title: title, image: image, location: location); 12 | state = [newPlace, ...state]; 13 | } 14 | } 15 | 16 | final userPlacesProvider = 17 | StateNotifierProvider>( 18 | (ref) => UserPlacesNotifier(), 19 | ); 20 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/13 Using the Map Screen in the Form/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:uuid/uuid.dart'; 4 | 5 | const uuid = Uuid(); 6 | 7 | class PlaceLocation { 8 | const PlaceLocation({ 9 | required this.latitude, 10 | required this.longitude, 11 | required this.address, 12 | }); 13 | 14 | final double latitude; 15 | final double longitude; 16 | final String address; 17 | } 18 | 19 | class Place { 20 | Place({ 21 | required this.title, 22 | required this.image, 23 | required this.location, 24 | }) : id = uuid.v4(); 25 | 26 | final String id; 27 | final String title; 28 | final File image; 29 | final PlaceLocation location; 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/13 Using the Map Screen in the Form/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 4 | 5 | import 'package:favorite_places/models/place.dart'; 6 | 7 | class UserPlacesNotifier extends StateNotifier> { 8 | UserPlacesNotifier() : super(const []); 9 | 10 | void addPlace(String title, File image, PlaceLocation location) { 11 | final newPlace = Place(title: title, image: image, location: location); 12 | state = [newPlace, ...state]; 13 | } 14 | } 15 | 16 | final userPlacesProvider = 17 | StateNotifierProvider>( 18 | (ref) => UserPlacesNotifier(), 19 | ); 20 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/14 Storing the Picked Image Locally/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:uuid/uuid.dart'; 4 | 5 | const uuid = Uuid(); 6 | 7 | class PlaceLocation { 8 | const PlaceLocation({ 9 | required this.latitude, 10 | required this.longitude, 11 | required this.address, 12 | }); 13 | 14 | final double latitude; 15 | final double longitude; 16 | final String address; 17 | } 18 | 19 | class Place { 20 | Place({ 21 | required this.title, 22 | required this.image, 23 | required this.location, 24 | }) : id = uuid.v4(); 25 | 26 | final String id; 27 | final String title; 28 | final File image; 29 | final PlaceLocation location; 30 | } 31 | -------------------------------------------------------------------------------- /Code Snapshots/13 Native Device Features/15 Finished/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:uuid/uuid.dart'; 4 | 5 | const uuid = Uuid(); 6 | 7 | class PlaceLocation { 8 | const PlaceLocation({ 9 | required this.latitude, 10 | required this.longitude, 11 | required this.address, 12 | }); 13 | 14 | final double latitude; 15 | final double longitude; 16 | final String address; 17 | } 18 | 19 | class Place { 20 | Place({ 21 | required this.title, 22 | required this.image, 23 | required this.location, 24 | String? id, 25 | }) : id = id ?? uuid.v4(); 26 | 27 | final String id; 28 | final String title; 29 | final File image; 30 | final PlaceLocation location; 31 | } 32 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/01 Starting Setup/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | void main() { 4 | runApp(const App()); 5 | } 6 | 7 | class App extends StatelessWidget { 8 | const App({super.key}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return MaterialApp( 13 | title: 'FlutterChat', 14 | theme: ThemeData().copyWith( 15 | useMaterial3: true, 16 | colorScheme: ColorScheme.fromSeed( 17 | seedColor: const Color.fromARGB(255, 63, 17, 177)), 18 | ), 19 | home: ... 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/02 Authentication Screen with Buttons/assets/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/14 Chat App/02 Authentication Screen with Buttons/assets/images/chat.png -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/02 Authentication Screen with Buttons/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:chat_app/screens/auth.dart'; 4 | 5 | void main() { 6 | runApp(const App()); 7 | } 8 | 9 | class App extends StatelessWidget { 10 | const App({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return MaterialApp( 15 | title: 'FlutterChat', 16 | theme: ThemeData().copyWith( 17 | useMaterial3: true, 18 | colorScheme: ColorScheme.fromSeed( 19 | seedColor: const Color.fromARGB(255, 63, 17, 177)), 20 | ), 21 | home: const AuthScreen(), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/03 Signing Users Up/assets/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/14 Chat App/03 Signing Users Up/assets/images/chat.png -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/04 Logging Users In/assets/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/14 Chat App/04 Logging Users In/assets/images/chat.png -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/05 Showing Different Screens/assets/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/14 Chat App/05 Showing Different Screens/assets/images/chat.png -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/05 Showing Different Screens/lib/screens/chat.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ChatScreen extends StatelessWidget { 4 | const ChatScreen({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text('FlutterChat'), 11 | ), 12 | body: const Center( 13 | child: Text('Logged in!'), 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/06 Adding User Logout/assets/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/14 Chat App/06 Adding User Logout/assets/images/chat.png -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/06 Adding User Logout/lib/screens/splash.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SplashScreen extends StatelessWidget { 4 | const SplashScreen({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text('FlutterChat'), 11 | ), 12 | body: const Center( 13 | child: Text('Loading...'), 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/07 Uploading Images To Firebase/assets/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/14 Chat App/07 Uploading Images To Firebase/assets/images/chat.png -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/07 Uploading Images To Firebase/lib/screens/splash.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SplashScreen extends StatelessWidget { 4 | const SplashScreen({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text('FlutterChat'), 11 | ), 12 | body: const Center( 13 | child: Text('Loading...'), 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/08 Storing a Username/assets/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/14 Chat App/08 Storing a Username/assets/images/chat.png -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/08 Storing a Username/lib/screens/splash.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SplashScreen extends StatelessWidget { 4 | const SplashScreen({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text('FlutterChat'), 11 | ), 12 | body: const Center( 13 | child: Text('Loading...'), 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/09 Adding ChatMessages & Input/assets/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/14 Chat App/09 Adding ChatMessages & Input/assets/images/chat.png -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/09 Adding ChatMessages & Input/lib/screens/splash.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SplashScreen extends StatelessWidget { 4 | const SplashScreen({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text('FlutterChat'), 11 | ), 12 | body: const Center( 13 | child: Text('Loading...'), 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/09 Adding ChatMessages & Input/lib/widgets/chat_messages.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ChatMessages extends StatelessWidget { 4 | const ChatMessages({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return const Center( 9 | child: Text('No messages found.'), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/10 Styling Chat Message Bubbles/assets/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/14 Chat App/10 Styling Chat Message Bubbles/assets/images/chat.png -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/10 Styling Chat Message Bubbles/lib/screens/splash.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SplashScreen extends StatelessWidget { 4 | const SplashScreen({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text('FlutterChat'), 11 | ), 12 | body: const Center( 13 | child: Text('Loading...'), 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/11 Finished/.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "YOUR FIREBASE PROJECT ID" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/11 Finished/firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": [ 3 | { 4 | "source": "functions", 5 | "codebase": "default", 6 | "ignore": [ 7 | "node_modules", 8 | ".git", 9 | "firebase-debug.log", 10 | "firebase-debug.*.log" 11 | ] 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/11 Finished/functions/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/11 Finished/functions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "functions", 3 | "description": "Cloud Functions for Firebase", 4 | "scripts": { 5 | "serve": "firebase emulators:start --only functions", 6 | "shell": "firebase functions:shell", 7 | "start": "npm run shell", 8 | "deploy": "firebase deploy --only functions", 9 | "logs": "firebase functions:log" 10 | }, 11 | "engines": { 12 | "node": "16" 13 | }, 14 | "main": "index.js", 15 | "dependencies": { 16 | "firebase-admin": "^11.5.0", 17 | "firebase-functions": "^4.2.0" 18 | }, 19 | "devDependencies": { 20 | "firebase-functions-test": "^3.0.0" 21 | }, 22 | "private": true 23 | } 24 | -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/11 Finished/images/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Code Snapshots/14 Chat App/11 Finished/images/chat.png -------------------------------------------------------------------------------- /Code Snapshots/14 Chat App/11 Finished/lib/screens/splash.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SplashScreen extends StatelessWidget { 4 | const SplashScreen({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: AppBar( 10 | title: const Text('FlutterChat'), 11 | ), 12 | body: const Center( 13 | child: Text('Loading...'), 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Lecture Attachments/02 Flutter & Dart Basics I/dice-images.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/02 Flutter & Dart Basics I/dice-images.zip -------------------------------------------------------------------------------- /Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-1.png -------------------------------------------------------------------------------- /Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-2.png -------------------------------------------------------------------------------- /Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-3.png -------------------------------------------------------------------------------- /Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-4.png -------------------------------------------------------------------------------- /Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-5.png -------------------------------------------------------------------------------- /Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/02 Flutter & Dart Basics I/dice-images/dice-6.png -------------------------------------------------------------------------------- /Lecture Attachments/03 Flutter & Dart Basics II/assets.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/03 Flutter & Dart Basics II/assets.zip -------------------------------------------------------------------------------- /Lecture Attachments/03 Flutter & Dart Basics II/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/03 Flutter & Dart Basics II/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Lecture Attachments/04 Debugging/01 Starting Setup.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/04 Debugging/01 Starting Setup.zip -------------------------------------------------------------------------------- /Lecture Attachments/04 Debugging/01 Starting Setup/assets/images/quiz-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/04 Debugging/01 Starting Setup/assets/images/quiz-logo.png -------------------------------------------------------------------------------- /Lecture Attachments/04 Debugging/01 Starting Setup/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/quiz.dart'; 4 | 5 | void main() { 6 | runApp(const Quiz()); 7 | } 8 | -------------------------------------------------------------------------------- /Lecture Attachments/04 Debugging/01 Starting Setup/lib/models/quiz_question.dart: -------------------------------------------------------------------------------- 1 | class QuizQuestion { 2 | const QuizQuestion(this.text, this.answers); 3 | 4 | final String text; 5 | final List answers; 6 | 7 | List get shuffledAnswers { 8 | final shuffledList = List.of(answers); 9 | shuffledList.shuffle(); 10 | return shuffledList; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Lecture Attachments/04 Debugging/01 Starting Setup/lib/questions_summary/questions_summary.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:adv_basics/questions_summary/summary_item.dart'; 4 | 5 | class QuestionsSummary extends StatelessWidget { 6 | const QuestionsSummary(this.summaryData, {super.key}); 7 | 8 | final List> summaryData; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return SizedBox( 13 | height: 400, 14 | child: SingleChildScrollView( 15 | child: Column( 16 | children: summaryData.map( 17 | (data) { 18 | return SummaryItem(data); 19 | }, 20 | ).toList(), 21 | ), 22 | ), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Lecture Attachments/06 Responsive & Adaptive/01 Starting Setup.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/06 Responsive & Adaptive/01 Starting Setup.zip -------------------------------------------------------------------------------- /Lecture Attachments/07 Flutter Internals/01 Starting Setup.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/07 Flutter Internals/01 Starting Setup.zip -------------------------------------------------------------------------------- /Lecture Attachments/07 Flutter Internals/01 Starting Setup/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:flutter_internals/ui_updates_demo.dart'; 4 | 5 | void main() { 6 | runApp(const App()); 7 | } 8 | 9 | class App extends StatelessWidget { 10 | const App({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return MaterialApp( 15 | theme: ThemeData(useMaterial3: true), 16 | home: Scaffold( 17 | appBar: AppBar( 18 | title: const Text('Flutter Internals'), 19 | ), 20 | body: const UIUpdatesDemo(), 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Lecture Attachments/09 State Management/01 Starting Setup.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/09 State Management/01 Starting Setup.zip -------------------------------------------------------------------------------- /Lecture Attachments/09 State Management/01 Starting Setup/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | import 'package:meals/screens/tabs.dart'; 5 | 6 | final theme = ThemeData( 7 | useMaterial3: true, 8 | colorScheme: ColorScheme.fromSeed( 9 | brightness: Brightness.dark, 10 | seedColor: const Color.fromARGB(255, 131, 57, 0), 11 | ), 12 | textTheme: GoogleFonts.latoTextTheme(), 13 | ); 14 | 15 | void main() { 16 | runApp(const App()); 17 | } 18 | 19 | class App extends StatelessWidget { 20 | const App({super.key}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | theme: theme, 26 | home: const TabsScreen(), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Lecture Attachments/09 State Management/01 Starting Setup/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Lecture Attachments/09 State Management/01 Starting Setup/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Lecture Attachments/10 Animations/01 Starting Setup.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/10 Animations/01 Starting Setup.zip -------------------------------------------------------------------------------- /Lecture Attachments/10 Animations/01 Starting Setup/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category { 4 | const Category({ 5 | required this.id, 6 | required this.title, 7 | this.color = Colors.orange, 8 | }); 9 | 10 | final String id; 11 | final String title; 12 | final Color color; 13 | } 14 | -------------------------------------------------------------------------------- /Lecture Attachments/10 Animations/01 Starting Setup/lib/providers/favorites_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/models/meal.dart'; 4 | 5 | class FavoriteMealsNotifier extends StateNotifier> { 6 | FavoriteMealsNotifier() : super([]); 7 | 8 | bool toggleMealFavoriteStatus(Meal meal) { 9 | final mealIsFavorite = state.contains(meal); 10 | 11 | if (mealIsFavorite) { 12 | state = state.where((m) => m.id != meal.id).toList(); 13 | return false; 14 | } else { 15 | state = [...state, meal]; 16 | return true; 17 | } 18 | } 19 | } 20 | 21 | final favoriteMealsProvider = 22 | StateNotifierProvider>((ref) { 23 | return FavoriteMealsNotifier(); 24 | }); 25 | -------------------------------------------------------------------------------- /Lecture Attachments/10 Animations/01 Starting Setup/lib/providers/meals_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:meals/data/dummy_data.dart'; 4 | 5 | final mealsProvider = Provider((ref) { 6 | return dummyMeals; 7 | }); 8 | -------------------------------------------------------------------------------- /Lecture Attachments/10 Animations/01 Starting Setup/lib/widgets/meal_item_trait.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MealItemTrait extends StatelessWidget { 4 | const MealItemTrait({ 5 | super.key, 6 | required this.icon, 7 | required this.label, 8 | }); 9 | 10 | final IconData icon; 11 | final String label; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row(children: [ 16 | Icon( 17 | icon, 18 | size: 17, 19 | color: Colors.white, 20 | ), 21 | const SizedBox(width: 6), 22 | Text( 23 | label, 24 | style: const TextStyle( 25 | color: Colors.white, 26 | ), 27 | ), 28 | ]); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Lecture Attachments/11 User Input & Forms/Solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/11 User Input & Forms/Solution.zip -------------------------------------------------------------------------------- /Lecture Attachments/11 User Input & Forms/Solution/lib/data/dummy_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/grocery_item.dart'; 2 | import 'package:shopping_list/models/category.dart'; 3 | import 'package:shopping_list/data/categories.dart'; 4 | 5 | final groceryItems = [ 6 | GroceryItem( 7 | id: 'a', 8 | name: 'Milk', 9 | quantity: 1, 10 | category: categories[Categories.dairy]!), 11 | GroceryItem( 12 | id: 'b', 13 | name: 'Bananas', 14 | quantity: 5, 15 | category: categories[Categories.fruit]!), 16 | GroceryItem( 17 | id: 'c', 18 | name: 'Beef Steak', 19 | quantity: 1, 20 | category: categories[Categories.meat]!), 21 | ]; 22 | -------------------------------------------------------------------------------- /Lecture Attachments/11 User Input & Forms/Solution/lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum Categories { 4 | vegetables, 5 | fruit, 6 | meat, 7 | dairy, 8 | carbs, 9 | sweets, 10 | spices, 11 | convenience, 12 | hygiene, 13 | other 14 | } 15 | 16 | class Category { 17 | const Category(this.title, this.color); 18 | 19 | final String title; 20 | final Color color; 21 | } 22 | -------------------------------------------------------------------------------- /Lecture Attachments/11 User Input & Forms/Solution/lib/models/grocery_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:shopping_list/models/category.dart'; 2 | 3 | class GroceryItem { 4 | const GroceryItem({ 5 | required this.id, 6 | required this.name, 7 | required this.quantity, 8 | required this.category, 9 | }); 10 | 11 | final String id; 12 | final String name; 13 | final int quantity; 14 | final Category category; 15 | } 16 | -------------------------------------------------------------------------------- /Lecture Attachments/13 Native Device Features/Finished Challenge.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/13 Native Device Features/Finished Challenge.zip -------------------------------------------------------------------------------- /Lecture Attachments/13 Native Device Features/Finished Challenge/lib/models/place.dart: -------------------------------------------------------------------------------- 1 | import 'package:uuid/uuid.dart'; 2 | 3 | const uuid = Uuid(); 4 | 5 | class Place { 6 | Place({required this.title}) : id = uuid.v4(); 7 | 8 | final String id; 9 | final String title; 10 | } 11 | -------------------------------------------------------------------------------- /Lecture Attachments/13 Native Device Features/Finished Challenge/lib/providers/user_places.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 2 | 3 | import 'package:favorite_places/models/place.dart'; 4 | 5 | class UserPlacesNotifier extends StateNotifier> { 6 | UserPlacesNotifier() : super(const []); 7 | 8 | void addPlace(String title) { 9 | final newPlace = Place(title: title); 10 | state = [newPlace, ...state]; 11 | } 12 | } 13 | 14 | final userPlacesProvider = 15 | StateNotifierProvider>( 16 | (ref) => UserPlacesNotifier(), 17 | ); 18 | -------------------------------------------------------------------------------- /Lecture Attachments/14 Chat App/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Lecture Attachments/14 Chat App/chat.png -------------------------------------------------------------------------------- /Lecture Attachments/14 Chat App/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | void main() { 4 | runApp(const App()); 5 | } 6 | 7 | class App extends StatelessWidget { 8 | const App({super.key}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return MaterialApp( 13 | title: 'FlutterChat', 14 | theme: ThemeData().copyWith( 15 | useMaterial3: true, 16 | colorScheme: ColorScheme.fromSeed( 17 | seedColor: const Color.fromARGB(255, 63, 17, 177)), 18 | ), 19 | home: ... 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Slides/course-slides.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/academind/flutter-complete-guide-course-resources/c36eb82128031008f9a8b39c60134f760fb75b23/Slides/course-slides.pdf --------------------------------------------------------------------------------