From 8e56af8bd01cc615931fa876be4b7fa06efd24ed Mon Sep 17 00:00:00 2001 From: Jonas SNK <148264630+Desmer11@users.noreply.github.com> Date: Wed, 29 Oct 2025 22:45:20 +0100 Subject: [PATCH] cc --- README.md | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 2fe8b1a..452d191 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,6 @@ Start Extension in right corner - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) - [online documentation](https://docs.flutter.dev/) -# 🧠 Browser Tab Manager - Complete Code Study Guide ## 📋 Table of Contents 1. [App Architecture Overview](#architecture) @@ -110,8 +109,6 @@ void main() { runApp(const BrowserTabManagerApp()); } ``` - -**WHAT HAPPENS HERE:** 1. `main()` is the entry point of every Dart/Flutter app 2. `runApp()` tells Flutter to start the app with our root widget 3. Creates the widget tree and starts the rendering engine @@ -143,14 +140,14 @@ class BrowserTabManagerApp extends StatelessWidget { ```dart class TabData { - String id; // Unique identifier - String title; // Display name - String url; // Web address - String favicon; // Icon URL + String id; + String title; + String url; + String favicon; DateTime lastAccessed; // When last used - bool isPinned; // Pinned status + bool isPinned; String type; // 'tab', 'bookmark', or 'history' - int? visitCount; // Number of visits (nullable) + int? visitCount; // (nullable) String? folder; // Bookmark folder (nullable) } ``` @@ -158,7 +155,6 @@ class TabData { **PURPOSE:** - **Data Structure**: Represents all types of browser items uniformly - **Type Safety**: Dart ensures correct data types -- **Nullable Fields**: `?` means the field can be null ### Factory Constructor: ```dart @@ -243,7 +239,7 @@ void initState() { } ``` -**setState()** - The magic that updates UI: +**setState()** updates UI: ```dart setState(() { allItems = newData; // Change state @@ -361,7 +357,7 @@ SearchBar(onChanged: (text) => { // 3. Parent filters data and updates state void _filterItems() { setState(() => { - filteredItems = // ... filter logic + filteredItems = //filter logic }); // 4. Flutter rebuilds UI with new filteredItems }