FynkelView.world constructor
- World world, {
- Key? key,
- void onFrame(
- double dt
- double renderScale = 1.0,
- void onStats(
- FynkelViewStats stats
- void onViewStats(
- ViewStats stats
- FocusNode? focusNode,
- bool autofocus = true,
- bool showErrors = kDebugMode,
- bool pauseWhenCovered = true,
- Camera? camera,
- bool input = true,
- bool worldWidgets = true,
- bool directToScreen = true,
- void onError(
- Object error,
- StackTrace stack
- Widget errorBuilder(
- BuildContext context,
- Object error,
- VoidCallback retry
Shows world, made and driven by hand: the caller disposes of it.
Implementation
const FynkelView.world(
World this.world, {
super.key,
this.onFrame,
this.renderScale = 1.0,
this.onStats,
this.onViewStats,
this.focusNode,
this.autofocus = true,
this.showErrors = kDebugMode,
this.pauseWhenCovered = true,
this.camera,
this.input = true,
this.worldWidgets = true,
this.directToScreen = true,
this.onError,
this.errorBuilder,
}) : root = null,
source = null,
assert(
renderScale > 0 && renderScale <= 4,
'FynkelView.renderScale is $renderScale: give one above 0 and at most 4 (1 draws every pixel)',
);