FlutterCompiler class
Compiles analyzed Flutter widget trees into IrDocuments.
Constructors
-
FlutterCompiler({MaterialTheme theme = const MaterialTheme(), bool extractTheme = true, ThemeBrightness? brightness, double screenWidth = 390, double screenHeight = 844, int listPreviewCount = 3, bool designSystem = true, int minComponentUses = 2, Map<
String, IconFont> iconFonts = const {}, ProjectAssets? assets})
Properties
- assets ↔ ProjectAssets?
-
Where asset images are read from; compile defaults it to the
project being compiled.
getter/setter pair
- brightness → ThemeBrightness?
-
Which app theme to export; null follows
MaterialApp.themeMode.final - designSystem → bool
-
Emit an IrDesignSystem: color variables (per theme mode), text and
effect styles, and components.
final
-
diagnostics
→ List<
IrDiagnostic> -
no setter
- eval → ValueEvaluator
-
final
- extractTheme → bool
-
Read the app's
MaterialApptheme in compile. When false, the constructor'sthemeis used as is.final - hashCode → int
-
The hash code for this object.
no setterinherited
-
iconFonts
→ Map<
String, IconFont> -
Icon fonts by family (e.g.
MaterialIcons). Icons in these fonts are exported as their glyph outlines; others as placeholders.final - listPreviewCount → int
-
How many items to render for
ListView.builderwithout a literal count.final - minComponentUses → int
-
A project widget becomes a component once used this many times.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenHeight → double
-
final
- screenWidth → double
-
final
- theme → MaterialTheme
-
The ambient theme (
Theme.of(context)) at the current point.no setter
Methods
-
compile(
ProjectAnalysis analysis, {Map< String, IrScreen> rendered = const {}, Map<String, IrImageAsset> renderedImages = const {}}) → IrDocument -
Compiles every screen of
analysis. Screens inrendered(by name, e.g. captured at runtime) are used as they are instead, and theirrenderedImagesare embedded too. -
compileScreen(
String name, DartValue tree, String? source) → IrScreen -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited