rehlma / flutter-project-conventionsr1
Follow the project’s established architecture
PublicInspect local conventions before adding public API, state management, abstractions or configuration.
tests, run by the registry2 passed · slowest 1.7 ms
✓fires1.7 ms
reminds for public classes
write lib/store.dart · in fixtures/flutterfired: line 1
class Store {}✓quiet1.5 ms
allows private classes and unrelated edits
write lib/store.dart · in fixtures/flutterstayed quiet
class _Store {}write lib/store.dart · in fixtures/flutter · wrote line 2stayed quiet
class Store {
final value = 1;
}detector.test.tseach detect() call runs the real detector
import { expect, test } from 'vitest';
import { detect, write, edit, read, command, output, prompt } from '@wellactually/sdk/v3/test';
const flutter = { project: 'fixtures/flutter' };
const dart = { project: 'fixtures/dart' };
test('reminds for public classes', () => {
expect(detect(write('lib/store.dart', 'class Store {}'), flutter)).toEqual([{ line: 1, depth: 'pointer' }]);
});
test('allows private classes and unrelated edits', () => {
expect(detect(write('lib/store.dart', 'class _Store {}'), flutter)).toEqual([]);
expect(detect(edit('lib/store.dart', 'class Store {\n final value = 1;\n}', { written: ' final value = 1;' }), flutter)).toEqual([]);
});