Rename StatisticsOverlay to PerformanceOverlay.
This commit is contained in:
@@ -42,7 +42,7 @@ class StocksAppState extends State<StocksApp> {
|
||||
backupMode: BackupMode.enabled,
|
||||
debugShowGrid: false,
|
||||
debugShowSizes: false,
|
||||
showRenderingStatistics: false
|
||||
showPerformanceOverlay: false
|
||||
);
|
||||
|
||||
void initState() {
|
||||
@@ -108,7 +108,7 @@ class StocksAppState extends State<StocksApp> {
|
||||
title: 'Stocks',
|
||||
theme: theme,
|
||||
debugShowMaterialGrid: _configuration.debugShowGrid,
|
||||
showRenderingPerformanceOverlay: _configuration.showRenderingStatistics,
|
||||
showPerformanceOverlay: _configuration.showPerformanceOverlay,
|
||||
routes: <String, RouteBuilder>{
|
||||
'/': (RouteArguments args) => new StockHome(_stocks, _symbols, _configuration, configurationUpdater),
|
||||
'/settings': (RouteArguments args) => new StockSettings(_configuration, configurationUpdater)
|
||||
|
||||
@@ -31,8 +31,8 @@ class StockSettingsState extends State<StockSettings> {
|
||||
sendUpdates(config.configuration.copyWith(debugShowSizes: value));
|
||||
}
|
||||
|
||||
void _handleShowRenderingStatisticsChanged(bool value) {
|
||||
sendUpdates(config.configuration.copyWith(showRenderingStatistics: value));
|
||||
void _handleShowPerformanceOverlayChanged(bool value) {
|
||||
sendUpdates(config.configuration.copyWith(showPerformanceOverlay: value));
|
||||
}
|
||||
|
||||
void _confirmOptimismChange() {
|
||||
@@ -103,12 +103,12 @@ class StockSettingsState extends State<StockSettings> {
|
||||
),
|
||||
new DrawerItem(
|
||||
icon: 'action/picture_in_picture',
|
||||
onPressed: () { _handleShowRenderingStatisticsChanged(!config.configuration.showRenderingStatistics); },
|
||||
onPressed: () { _handleShowPerformanceOverlayChanged(!config.configuration.showPerformanceOverlay); },
|
||||
child: new Row(<Widget>[
|
||||
new Flexible(child: new Text('Show rendering performance overlay')),
|
||||
new Switch(
|
||||
value: config.configuration.showRenderingStatistics,
|
||||
onChanged: _handleShowRenderingStatisticsChanged
|
||||
value: config.configuration.showPerformanceOverlay,
|
||||
onChanged: _handleShowPerformanceOverlayChanged
|
||||
),
|
||||
])
|
||||
),
|
||||
|
||||
@@ -13,34 +13,34 @@ class StockConfiguration {
|
||||
this.backupMode,
|
||||
this.debugShowGrid,
|
||||
this.debugShowSizes,
|
||||
this.showRenderingStatistics
|
||||
this.showPerformanceOverlay
|
||||
}) {
|
||||
assert(stockMode != null);
|
||||
assert(backupMode != null);
|
||||
assert(debugShowGrid != null);
|
||||
assert(debugShowSizes != null);
|
||||
assert(showRenderingStatistics != null);
|
||||
assert(showPerformanceOverlay != null);
|
||||
}
|
||||
|
||||
final StockMode stockMode;
|
||||
final BackupMode backupMode;
|
||||
final bool debugShowGrid;
|
||||
final bool debugShowSizes;
|
||||
final bool showRenderingStatistics;
|
||||
final bool showPerformanceOverlay;
|
||||
|
||||
StockConfiguration copyWith({
|
||||
StockMode stockMode,
|
||||
BackupMode backupMode,
|
||||
bool debugShowGrid,
|
||||
bool debugShowSizes,
|
||||
bool showRenderingStatistics
|
||||
bool showPerformanceOverlay
|
||||
}) {
|
||||
return new StockConfiguration(
|
||||
stockMode: stockMode ?? this.stockMode,
|
||||
backupMode: backupMode ?? this.backupMode,
|
||||
debugShowGrid: debugShowGrid ?? this.debugShowGrid,
|
||||
debugShowSizes: debugShowSizes ?? this.debugShowSizes,
|
||||
showRenderingStatistics: showRenderingStatistics ?? this.showRenderingStatistics
|
||||
showPerformanceOverlay: showPerformanceOverlay ?? this.showPerformanceOverlay
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user