{"id":26183078,"url":"https://github.com/zonble/flutter_turtle_slide","last_synced_at":"2026-04-18T20:32:35.199Z","repository":{"id":66712643,"uuid":"239725316","full_name":"zonble/flutter_turtle_slide","owner":"zonble","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-12T03:31:50.000Z","size":19659,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-12T09:59:50.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zonble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-02-11T09:38:19.000Z","updated_at":"2026-03-12T03:22:19.000Z","dependencies_parsed_at":"2025-08-15T02:32:52.654Z","dependency_job_id":null,"html_url":"https://github.com/zonble/flutter_turtle_slide","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zonble/flutter_turtle_slide","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonble%2Fflutter_turtle_slide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonble%2Fflutter_turtle_slide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonble%2Fflutter_turtle_slide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonble%2Fflutter_turtle_slide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zonble","download_url":"https://codeload.github.com/zonble/flutter_turtle_slide/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zonble%2Fflutter_turtle_slide/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31984132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-11T22:34:21.468Z","updated_at":"2026-04-18T20:32:35.180Z","avatar_url":"https://github.com/zonble.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flutter_turtle_slide\n\nA Flutter presentation app demonstrating turtle graphics concepts and implementation.\n\n## What it does\n\nThis app creates an interactive slide presentation that showcases:\n\n- Turtle graphics history and concepts\n- Live turtle graphics demonstrations using the `flutter_turtle` package\n- Implementation details of turtle graphics in Flutter\n- Animated examples including L-systems and fractals\n- Domain Specific Language (DSL) approach for turtle commands\n\nNavigate through the slides by tapping the screen, clicking the arrow buttons at the bottom, or\nusing keyboard controls.\n\n---\n\n## Technology Stack\n\n| Layer | Technology |\n|-------|-----------|\n| Language | Dart 3.0+ |\n| Framework | Flutter 3.32.0 (pinned via `.fvmrc`) |\n| Turtle graphics | `flutter_turtle ^0.4.2` |\n| Syntax highlighting | `flutter_syntax_view` (Dracula theme) |\n| External links | `url_launcher` |\n| Icons | `cupertino_icons` |\n| Testing | `flutter_test` (SDK) |\n| Linting | `flutter_lints` (via `analysis_options.yaml`) |\n| CI/CD | GitHub Actions → GitHub Pages |\n\n---\n\n## Directory Structure\n\n```\nflutter_turtle_slide/\n├── .github/\n│   └── workflows/\n│       └── flutter_web_ci.yml    # CI: build + deploy to GitHub Pages on push to master\n├── lib/\n│   ├── main.dart                 # App entry point, MyApp, MyHomePage, PageNumber\n│   └── pages/                   # One Dart file per slide (or pair of slides)\n│       ├── agenda.dart\n│       ├── animation.dart\n│       ├── components.dart\n│       ├── cover.dart\n│       ├── custom_paint.dart\n│       ├── dsl.dart\n│       ├── dsl_explained.dart\n│       ├── end.dart\n│       ├── example1.dart\n│       ├── example2.dart        # Also contains Example22 (slider demo)\n│       ├── flutter_turtle_intro.dart\n│       ├── history.dart\n│       ├── intro.dart\n│       ├── lsystem.dart\n│       ├── painter.dart\n│       └── today.dart\n├── test/\n│   └── widget_test.dart\n├── analysis_options.yaml\n├── pubspec.yaml\n└── pubspec.lock\n```\n\n---\n\n## Architecture\n\n### Slide Navigation\n\n`MyHomePage` in `main.dart` owns a `PageController` and wraps everything in a `PageView`. The\npresentation is fixed at 900 × 600 logical pixels and scaled to fit the screen height using\n`Transform.scale`. Navigation is handled by:\n\n- **Tap on slide** – calls `nextPage()`\n- **Arrow buttons** (bottom overlay) – call `nextPage()` / `previousPage()`\n- `nextPage()` / `previousPage()` – animate via `PageController.animateToPage` with\n  `Curves.easeInCubic` and 250 ms duration.\n\nThe current slide order is:\n\n```\nCover → AgendaPage → IntroPage → HistoryPage → TodayPage →\nFlutterTurtleIntroPage → Example1Code → Example1 →\nExample2Code → Example2 → Example22 → LSystemPage →\nComponentsPage → DSLPage → DSLExplainedPage →\nCustomPaintPage → PainterPage → AnimationPage → EndPage\n```\n\n### Widget Patterns\n\n| Pattern | When used |\n|---------|-----------|\n| `StatelessWidget` | Static content slides (text/layout only) |\n| `StatefulWidget` | Slides with animation, interactivity, or `setState` rebuilds |\n| `SingleTickerProviderStateMixin` | Slides that own an `AnimationController` (e.g., `LSystemPage`) |\n| `AnimatedBuilder` | Efficiently rebuild only the animated subtree |\n\n---\n\n## Turtle Graphics DSL\n\nAll turtle graphics are expressed as a `List\u003cTurtleCommand\u003e` passed to `TurtleView` or\n`AnimatedTurtleView`. Commands receive a context map `_` (type `Map\u003cString, dynamic\u003e`) through\nanonymous functions.\n\n### Core Commands\n\n```dart\nPenDown()                              // start drawing\nForward((_) =\u003e 100.0)                  // move forward n pixels\nBack((_) =\u003e 50.0)                      // move backward n pixels\nLeft((_) =\u003e 30.0)                      // rotate left by degrees\nRight((_) =\u003e 30.0)                     // rotate right by degrees\nSetColor((_) =\u003e Colors.green)          // set pen color\nSetStrokeWidth((_) =\u003e 3.0)             // set line width\nStop()                                 // halt current macro branch\n```\n\n### Macro / Recursion Commands\n\n```dart\n// Define a named macro (supports recursion via RunMacro)\nSetMacro('tree', [\n  IfElse((_) =\u003e _['l'] \u003c 10.0, [Stop()], [\n    Forward((_) =\u003e _['l']),\n    Right((_) =\u003e 30.0),\n    RunMacro('tree', (_) =\u003e {'l': _['l'] * 0.75}),\n    Left((_) =\u003e 60.0),\n    RunMacro('tree', (_) =\u003e {'l': _['l'] * 0.75}),\n  ]),\n]),\n\n// Invoke a macro, passing a new variable context\nRunMacro('tree', (_) =\u003e {'l': 100.0})\n```\n\n### Control Flow\n\n```dart\n// IfElse(condition, trueCommands, falseCommands)\nIfElse((_) =\u003e _['l'] \u003c 20.0,\n  [SetColor((_) =\u003e Colors.green)],\n  [SetColor((_) =\u003e Colors.brown)],\n)\n\n// Repeat(countFn, commands)\nRepeat((_) =\u003e 36, [\n  Left((_) =\u003e 10),\n  Repeat((_) =\u003e 360, [Left((_) =\u003e 1), Forward((_) =\u003e 3)]),\n])\n```\n\n### Widgets\n\n```dart\n// Static rendering\nTurtleView(\n  commands: [...],\n  child: Container(width: double.infinity, height: 400),\n)\n\n// Animated rendering (replays commands over the given duration)\nAnimatedTurtleView(\n  animationDuration: Duration(milliseconds: 500),\n  commands: [...],\n  child: Container(height: 300, width: double.infinity),\n)\n```\n\n---\n\n## Build, Lint \u0026 Test\n\n```bash\n# Install dependencies\nflutter packages get\n\n# Lint / static analysis\nflutter analyze\n\n# Run tests\nflutter test\n\n# Run locally (web)\nflutter config --enable-web\nflutter run -d chrome\n\n# Build for web (output: build/web/)\nflutter build web\n```\n\n---\n\n## CI/CD Pipeline\n\nDefined in `.github/workflows/flutter_web_ci.yml`:\n\n- **Trigger:** push to `master`\n- **Runner:** `ubuntu-latest`\n- **Flutter version:** stable channel\n- **Steps:** checkout → install Flutter → enable web → `flutter packages get` →\n  `flutter build web` → deploy `build/web/` to GitHub Pages via\n  `JamesIves/github-pages-deploy-action@v4`\n\n---\n\n## Adding a New Slide\n\n1. Create `lib/pages/\u003cslide_name\u003e.dart`.\n2. Extend `StatelessWidget` (static content) or `StatefulWidget` (interactive/animated).\n3. Build a `Widget` that fits within the 900 × 600 pixel canvas.\n4. Import the new file in `lib/main.dart`.\n5. Insert the widget in the appropriate position in the `PageView.children` list.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzonble%2Fflutter_turtle_slide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzonble%2Fflutter_turtle_slide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzonble%2Fflutter_turtle_slide/lists"}