flutter: Rename widgets to children
This commit is contained in:
parent
6a8644133c
commit
e37d3fcb88
|
@ -550,7 +550,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
||||||
Text(S.of(context).difficulty, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).difficulty, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsListTile(
|
SettingsListTile(
|
||||||
context: context,
|
context: context,
|
||||||
titleString: S.of(context).skillLevel,
|
titleString: S.of(context).skillLevel,
|
||||||
|
@ -562,7 +562,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
||||||
Text(S.of(context).aisPlayStyle, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).aisPlayStyle, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsSwitchListTile(
|
SettingsSwitchListTile(
|
||||||
context: context,
|
context: context,
|
||||||
value: Config.aiIsLazy,
|
value: Config.aiIsLazy,
|
||||||
|
@ -582,7 +582,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
||||||
Text(S.of(context).playSounds, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).playSounds, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsSwitchListTile(
|
SettingsSwitchListTile(
|
||||||
context: context,
|
context: context,
|
||||||
value: Config.toneEnabled,
|
value: Config.toneEnabled,
|
||||||
|
@ -595,7 +595,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
||||||
Text(S.of(context).whoMovesFirst, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).whoMovesFirst, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsSwitchListTile(
|
SettingsSwitchListTile(
|
||||||
context: context,
|
context: context,
|
||||||
value: !Config.aiMovesFirst,
|
value: !Config.aiMovesFirst,
|
||||||
|
@ -610,7 +610,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
||||||
style: AppTheme.settingsHeaderStyle),
|
style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsSwitchListTile(
|
SettingsSwitchListTile(
|
||||||
context: context,
|
context: context,
|
||||||
value: Config.isAutoRestart,
|
value: Config.isAutoRestart,
|
||||||
|
@ -623,7 +623,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
||||||
Text(S.of(context).display, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).display, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsSwitchListTile(
|
SettingsSwitchListTile(
|
||||||
context: context,
|
context: context,
|
||||||
value: Config.isPieceCountInHandShown,
|
value: Config.isPieceCountInHandShown,
|
||||||
|
@ -647,7 +647,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
||||||
Text(S.of(context).color, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).color, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsListTile(
|
SettingsListTile(
|
||||||
context: context,
|
context: context,
|
||||||
titleString: S.of(context).boardColor,
|
titleString: S.of(context).boardColor,
|
||||||
|
@ -688,7 +688,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
||||||
Text(S.of(context).restore, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).restore, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsListTile(
|
SettingsListTile(
|
||||||
context: context,
|
context: context,
|
||||||
titleString: S.of(context).restoreDefaultSettings,
|
titleString: S.of(context).restoreDefaultSettings,
|
||||||
|
|
|
@ -200,7 +200,7 @@ class _RuleSettingsPageState extends State<RuleSettingsPage> {
|
||||||
Text(S.of(context).general, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).general, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsListTile(
|
SettingsListTile(
|
||||||
context: context,
|
context: context,
|
||||||
titleString: S.of(context).piecesCount,
|
titleString: S.of(context).piecesCount,
|
||||||
|
@ -244,7 +244,7 @@ class _RuleSettingsPageState extends State<RuleSettingsPage> {
|
||||||
Text(S.of(context).placing, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).placing, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsSwitchListTile(
|
SettingsSwitchListTile(
|
||||||
context: context,
|
context: context,
|
||||||
value: Config.hasBannedLocations,
|
value: Config.hasBannedLocations,
|
||||||
|
@ -267,7 +267,7 @@ class _RuleSettingsPageState extends State<RuleSettingsPage> {
|
||||||
Text(S.of(context).moving, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).moving, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsSwitchListTile(
|
SettingsSwitchListTile(
|
||||||
context: context,
|
context: context,
|
||||||
value: Config.isDefenderMoveFirst,
|
value: Config.isDefenderMoveFirst,
|
||||||
|
@ -290,7 +290,7 @@ class _RuleSettingsPageState extends State<RuleSettingsPage> {
|
||||||
Text(S.of(context).removing, style: AppTheme.settingsHeaderStyle),
|
Text(S.of(context).removing, style: AppTheme.settingsHeaderStyle),
|
||||||
SettingsCard(
|
SettingsCard(
|
||||||
context: context,
|
context: context,
|
||||||
widgets: <Widget>[
|
children: <Widget>[
|
||||||
SettingsSwitchListTile(
|
SettingsSwitchListTile(
|
||||||
context: context,
|
context: context,
|
||||||
value: Config.mayRemoveFromMillsAlways,
|
value: Config.mayRemoveFromMillsAlways,
|
||||||
|
|
|
@ -23,18 +23,18 @@ class SettingsCard extends StatelessWidget {
|
||||||
const SettingsCard({
|
const SettingsCard({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.context,
|
required this.context,
|
||||||
required this.widgets,
|
required this.children,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
final BuildContext context;
|
final BuildContext context;
|
||||||
final widgets;
|
final children;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Card(
|
return Card(
|
||||||
color: AppTheme.cardColor,
|
color: AppTheme.cardColor,
|
||||||
margin: AppTheme.cardMargin,
|
margin: AppTheme.cardMargin,
|
||||||
child: Column(children: widgets),
|
child: Column(children: children),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue