浏览代码

[1.5.4] Remove Semantics relatives

/main
iizzaya 5 年前
当前提交
d5d5b323
共有 2 个文件被更改,包括 12 次插入46 次删除
  1. 46
      Runtime/cupertino/app.cs
  2. 12
      Runtime/widgets/app.cs

46
Runtime/cupertino/app.cs


LocaleListResolutionCallback localeListResolutionCallback = null,
LocaleResolutionCallback localeResolutionCallback = null,
List<Locale> supportedLocales = null,
bool showPerformanceOverlay = false,
bool checkerboardRasterCacheImages = false,
bool checkerboardOffscreenLayers = false,
bool showSemanticsDebugger = false,
bool debugShowCheckedModeBanner = true
bool showPerformanceOverlay = false
D.assert(checkerboardRasterCacheImages != null);
D.assert(checkerboardOffscreenLayers != null);
D.assert(showSemanticsDebugger != null);
D.assert(debugShowCheckedModeBanner != null);
supportedLocales = supportedLocales ?? new List<Locale> {new Locale("en", "US")};
this.navigatorKey = navigatorKey;

this.localeResolutionCallback = localeResolutionCallback;
this.supportedLocales = supportedLocales;
this.showPerformanceOverlay = showPerformanceOverlay;
this.checkerboardRasterCacheImages = checkerboardRasterCacheImages;
this.checkerboardOffscreenLayers = checkerboardOffscreenLayers;
this.showSemanticsDebugger = showSemanticsDebugger;
this.debugShowCheckedModeBanner = debugShowCheckedModeBanner;
}
public readonly GlobalKey<NavigatorState> navigatorKey;

public readonly LocaleResolutionCallback localeResolutionCallback;
public readonly List<Locale> supportedLocales;
public readonly bool showPerformanceOverlay;
public readonly bool checkerboardRasterCacheImages;
public readonly bool checkerboardOffscreenLayers;
public readonly bool showSemanticsDebugger;
public readonly bool debugShowCheckedModeBanner;
public override State createState() {
return new _CupertinoAppState();

public override Widget build(BuildContext context) {
CupertinoThemeData effectiveThemeData = this.widget.theme ?? new CupertinoThemeData();
Widget _InspectorSelectButtonBuilder(BuildContext _context, VoidCallback onPressed) {
return CupertinoButton.filled(
child: new Icon(
CupertinoIcons.search,
size: 28.0f,
color: CupertinoColors.white
),
padding: EdgeInsets.zero,
onPressed: onPressed
);
}
return new ScrollConfiguration(
behavior: new _AlwaysCupertinoScrollBehavior(),
child: new CupertinoTheme(

localeListResolutionCallback: this.widget.localeListResolutionCallback,
supportedLocales: this.widget.supportedLocales,
showPerformanceOverlay: this.widget.showPerformanceOverlay,
checkerboardRasterCacheImages: this.widget.checkerboardRasterCacheImages,
checkerboardOffscreenLayers: this.widget.checkerboardOffscreenLayers,
showSemanticsDebugger: this.widget.showSemanticsDebugger,
debugShowCheckedModeBanner: this.widget.debugShowCheckedModeBanner,
inspectorSelectButtonBuilder: _InspectorSelectButtonBuilder
inspectorSelectButtonBuilder: (BuildContext _context, VoidCallback onPressed) => {
return CupertinoButton.filled(
child: new Icon(
CupertinoIcons.search,
size: 28.0f,
color: CupertinoColors.white
),
padding: EdgeInsets.zero,
onPressed: onPressed
);
}
)
)
);

12
Runtime/widgets/app.cs


public readonly string title;
public readonly GenerateAppTitle onGenerateTitle;
public readonly Color color;
public readonly bool checkerboardRasterCacheImages;
public readonly bool checkerboardOffscreenLayers;
public readonly bool showSemanticsDebugger;
public readonly bool debugShowCheckedModeBanner;
public readonly InspectorSelectButtonBuilder inspectorSelectButtonBuilder;
public WidgetsApp(

GenerateAppTitle onGenerateTitle = null,
string title = "",
Color color = null,
bool checkerboardRasterCacheImages = false,
bool checkerboardOffscreenLayers = false,
bool showSemanticsDebugger = false,
bool debugShowCheckedModeBanner = true,
InspectorSelectButtonBuilder inspectorSelectButtonBuilder = null
) : base(key) {
routes = routes ?? new Dictionary<string, WidgetBuilder>();

this.onGenerateTitle = onGenerateTitle;
this.title = title;
this.color = color;
this.checkerboardRasterCacheImages = checkerboardRasterCacheImages;
this.checkerboardOffscreenLayers = checkerboardOffscreenLayers;
this.showSemanticsDebugger = showSemanticsDebugger;
this.debugShowCheckedModeBanner = debugShowCheckedModeBanner;
this.inspectorSelectButtonBuilder = inspectorSelectButtonBuilder;
D.assert(

正在加载...
取消
保存