Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

flutter-verify

/flutter-verify

Renderuje ekran Flutter w kilku rozmiarach i motywach w teście widgetów, zapisuje zrzuty i wyłapuje błędy układu.

Licencja
MIT
Ostatnia zmiana repozytorium
30.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 30.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Renderuje ekran Flutter w kilku rozmiarach i motywach w teście widgetów, zapisuje zrzuty i wyłapuje błędy układu.

Argumenty

/flutter-verify [screen widget or file, default: screens changed this session]
Oryginalny opis (EN)

Use after building or changing Flutter UI, or when the user runs /flutter-verify or asks to check how a screen looks. Renders the screen at small phone, phone, dark mode, large text, tablet and desktop sizes in a widget test, saves screenshots, catches overflow and layout errors, and lets you look at the result and fix it. No device or emulator needed.

Jak działa

  1. Steps
  2. Known limits of test rendering
Sekcje z nagłówków SKILL.md, w oryginale · 67 linii, 580 słów
Podgląd SKILL.md
---
name: flutter-verify
description: Use after building or changing Flutter UI, or when the user runs /flutter-verify or asks to check how a screen looks. Renders the screen at small phone, phone, dark mode, large text, tablet and desktop sizes in a widget test, saves screenshots, catches overflow and layout errors, and lets you look at the result and fix it. No device or emulator needed.
argument-hint: "[screen widget or file, default: screens changed this session]"
---

# Flutter Verify

You cannot see the app. This skill gives you screenshots and layout errors so you can check UI work before calling it done.

The template [flutter_verify_test.dart.tmpl](flutter_verify_test.dart.tmpl) is in this skill's base directory. Copy it to a `.dart` file in the app's `test/` folder (the `.tmpl` extension only keeps it out of this plugin's own analysis).

## Steps

1. **Pick screens.** The ones the user named, or the screens/widgets you changed this session. At most 3 per run.

2. **Create one test per screen:** copy the template to `test/flutter_verify/<screen>_verify_test.dart` and fill every `VERIFY:` spot:
   - Import the screen and the app's theme.
   - `screenName`: short snake_case name.
   - `buildScreen()`: build the screen with **fake data**. Wrap it in what it needs:
     - Riverpod: `ProviderScope(overrides: [...], child: ...)` with fake values
     - Bloc: `BlocProvider.value(value: FakeBloc(...))` or a cubit seeded with a state
     - Provider / get_it: register fakes before `runApp`-style wrapping
     - go_router screens that read route params: pass them to the constructor directly
   - Show realistic content: long names, many list items, empty states if relevant. Overflow bugs hide behind short demo text.
   - `lightTheme()` / `darkTheme()`: return the app's real themes.
   - `google_fonts`: add `GoogleFonts.config.allowRuntimeFetching = false;` at the start of `loadRealFonts` (text falls back to Roboto). App fonts from pubspec: load with `FontLoader` from the font files.

3. **Run:**
   ```bash
   flutter test --update-goldens test/flutter_verify/<screen>_verify_test.dart
   ```
   Each shot prints `FLUTTER_VERIFY <screen>/<shot>: OK` or the layout error, for example `A RenderFlex overflowed by 42 pixels on the right.`
   If the test does not compile or the screen throws, fix the test setup (fakes, providers) first.

4. **Look at the screenshots** in `test/flutter_verify/goldens/<screen>/` with the Read tool. Screenshots cost tokens, so read:
   - every shot whose `FLUTTER_VERIFY` line shows an error, and
   - `phone` and `desktop` always (most layout issues show there).
   Read the others (`phone_small`, `phone_dark`, `phone_large_text`, `tablet`) on the first run of a new screen, or when the user asks for a full check. After a fix, re-read only the shots that had problems.

   Check:
   - Yellow/black overflow stripes, clipped or cut-off text
   - `phone_small` (360×640): everything fits or scrolls; no keyboard-style overflow on forms
   - `phone_large_text` (1.5× text): text wraps, buttons grow, nothing overlaps
   - `phone_dark`: readable contrast, no hardcoded white/black backgrounds or text
   - `tablet` / `desktop`: content not stretched edge-to-edge. Constrain reading width (about 600–840 px) or use a multi-column layout
   - Spacing, alignment, and tap targets of at least 48×48

5. **Fix the app code, not the test**, then re-run steps 3–4. Stop after 3 rounds and report what is left.

6. **Report:**

   ```
   Flutter verify: <screen>
   | Shot             | Result | Notes |
   |------------------|--------|-------|
   | phone_small      | ✓      |       |
   | phone_large_text | fixed  | title Row overflowed, wrapped in Expanded |
   ...
   ```

7. **Clean up:** delete `test/flutter_verify/` unless the user wants to keep the screenshots as golden tests. If they keep them, rename the folder, remove the `debugPrint` line, and tell them to run `flutter test` normally (without `--update-goldens`) to catch regressions.

## Known limits of test rendering

- Shadows (elevation) render darker and harder than on a device.
- Network images do not load. Use placeholder or asset images in fakes.
- Platform views (maps, web views, video, camera) render blank.
- Animations are captured at rest. Endless animations (spinners) are captured mid-frame.

For pixel-perfect checks on a real device, the user can run the app; on an Android emulator a screenshot is `adb exec-out screencap -p > shot.png`.
Pliki w paczce (2)
  • SKILL.md 4 KB
  • flutter_verify_test.dart.tmpl 5 KB

Wersje

W bazie nie ma innych skilli o nazwie flutter-verify.

Migawka bazy z 13.11.2026 · wersja paczki 77e65b6aa47c (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100flutter-build-responsive-layout
    Pomaga implementować adaptacyjne układy Flutter dla ekranów mobilnych, tabletów, desktopów i przeglądarki.
  • 100flutter-add-widget-test
    Pomaga pisać testy widgetów Flutter: wyszukiwanie elementów finderami, symulowanie gestów użytkownika i testowanie aktualizacji stanu.
  • 100flutter-testing
    Pisze testy jednostkowe, widgetów i integracyjne we Flutterze ze wzorcem robotów, kluczami widgetów i Patrol.
  • 100flutter-device-testing
    Obsługuje i weryfikuje aplikacje Flutter na konkretnym emulatorze, symulatorze, przeglądarce, desktopie lub urządzeniu: cykl życia celu, sprawdzenia stanu platformy i przepływy integracyjne na żywo.
  • 90verify-ui
    Sprawdza zmianę interfejsu w przeglądarce: uruchamia serwer, robi zrzuty ekranu w telefonie i na komputerze oraz szuka błędów układu.
  • 100flutter-widget-tree-lifecycle
    Pomaga budować aplikacje Flutter z drzewami widgetów, kluczami i cyklem życia widgetów stateless i stateful.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.