|
|
|
|
|
|
public readonly Dictionary<string, WidgetBuilder> routes; |
|
|
|
public readonly TextStyle textStyle; |
|
|
|
public readonly Window window; |
|
|
|
public readonly bool showPerformanceoverlay; |
|
|
|
|
|
|
|
public WidgetsApp( |
|
|
|
Key key = null, |
|
|
|
|
|
|
Dictionary<string, WidgetBuilder> routes = null, |
|
|
|
TransitionBuilder builder = null, |
|
|
|
TextStyle textStyle = null, |
|
|
|
Widget home = null |
|
|
|
Widget home = null, |
|
|
|
bool showPerformanceOverlay = false |
|
|
|
) : base(key) { |
|
|
|
routes = routes ?? new Dictionary<string, WidgetBuilder>(); |
|
|
|
this.window = Window.instance; |
|
|
|
|
|
|
this.initialRoute = initialRoute; |
|
|
|
this.builder = builder; |
|
|
|
this.textStyle = textStyle; |
|
|
|
this.showPerformanceoverlay = showPerformanceOverlay; |
|
|
|
|
|
|
|
D.assert( |
|
|
|
home == null || |
|
|
|
|
|
|
style: this.widget.textStyle, |
|
|
|
child: result |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
PerformanceOverlay performanceOverlay = null; |
|
|
|
if (this.widget.showPerformanceoverlay) { |
|
|
|
performanceOverlay = PerformanceOverlay.allEnabled(); |
|
|
|
} |
|
|
|
|
|
|
|
if (performanceOverlay != null) { |
|
|
|
result = new Stack( |
|
|
|
children: new List<Widget> { |
|
|
|
result, |
|
|
|
new Positioned(top: 0.0f, |
|
|
|
left: 0.0f, |
|
|
|
right: 0.0f, |
|
|
|
child: performanceOverlay) |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
D.assert(() => { |
|
|
|