CerebroConfig class

Constructors

CerebroConfig({List<DeviceSpec> devices = const [DeviceSpec(name: 'phone', width: 393, height: 852, dpr: 3)], List<String> themes = const ['light', 'dark'], List<String> platforms = const ['android'], List<double> textScales = const [1.0], int settleMs = 600, int drainTimersMs = 120000, int realAsyncMs = 0, double exportScale = 2, double minTapSize = 48, Map<String, double> minTapSizeByPlatform = const {'ios' : 44, 'macos' : 44}, double keyboardInset = 300, List<String> locales = const [], Map<String, RouteOptions> routes = const {}, List<String> exclude = const [], Map<String, List<String>> fonts = const {}, String outDir = '.cerebro', List<String>? lintExclude, Map<String, bool> lintRules = const {}, bool explore = false, int exploreMaxTaps = 40, String? defaultScenario})
const

Properties

defaultScenario → String?
Factory scenario applied to every screen that names none (e.g. logged-in). Screens still get no __s- suffix for it.
final
devices → List<DeviceSpec>
final
drainTimersMs → int
Fake time pumped at the end of each capture, with the tree still mounted, so one-shot timers started by the screen or by explore taps (snack bars, fake-backend delays) fire; flutter_test fails a test ending with a pending timer. Periodic timers never drain: those are leaks to fix.
final
exclude → List<String>
final
explore → bool
Tap every semantics target of each screen and record where it leads.
final
exploreMaxTaps → int
final
exportScale → double
final
fonts → Map<String, List<String>>
family -> font file paths (absolute, project-relative, or asset keys).
final
hashCode → int
The hash code for this object.
no setterinherited
keyboardInset → double
Simulated keyboard height (dp) for routes with keyboard: true.
final
lintExclude → List<String>?
lint.exclude globs (null = lint defaults) and lint.rules id -> bool.
final
lintRules → Map<String, bool>
final
locales → List<String>
Locales to capture (BCP 47, e.g. [en, it, ar]); the first is the default and gets no id suffix. Applied through the platform locale, so apps that force MaterialApp.locale ignore it.
final
minTapSize → double
Default minimum tap target (dp). Material: 48.
final
minTapSizeByPlatform → Map<String, double>
Per-platform overrides; Apple HIG: 44 pt. min_tap_size in the yaml accepts a number or a map {android: 48, ios: 44}.
final
outDir → String
final
platforms → List<String>
final
realAsyncMs → int
When > 0, after the settle pumps the harness waits this many real milliseconds inside tester.runAsync and pumps again, so that real I/O (HTTP, which flutter_test answers with 400, file reads) can complete and screens reach their loaded/error state instead of spinning forever in the fake-async zone.
final
routes → Map<String, RouteOptions>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
settleMs → int
final
textScales → List<double>
Text scale factors to capture (1.0 = default). Ids get a __x1.3 suffix for scales other than 1.0.
final
themes → List<String>
final

Methods

minTapSizeFor(String platform) → double
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromMap(Map<String, Object?> m) → CerebroConfig
load(String path) → CerebroConfig