|
|
|
|
@ -124,10 +124,15 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
child: ListTileTheme(
|
|
|
|
|
iconColor: Theme.of(context).textTheme.bodyLarge!.color,
|
|
|
|
|
child: MaxWidthBody(
|
|
|
|
|
withScrolling: false,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
SingleChildScrollView(
|
|
|
|
|
child: Padding(
|
|
|
|
|
Expanded(
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
controller: controller.scrollController,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(16.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
spacing: 16.0,
|
|
|
|
|
@ -140,11 +145,13 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
initialLanguage:
|
|
|
|
|
controller.selectedSourceLanguage ??
|
|
|
|
|
LanguageModel.unknown,
|
|
|
|
|
languages: MatrixState
|
|
|
|
|
.pangeaController.pLanguageStore.baseOptions,
|
|
|
|
|
languages: MatrixState.pangeaController
|
|
|
|
|
.pLanguageStore.baseOptions,
|
|
|
|
|
isL2List: false,
|
|
|
|
|
decorationText: L10n.of(context).myBaseLanguage,
|
|
|
|
|
hasError: controller.languageMatchError != null,
|
|
|
|
|
decorationText:
|
|
|
|
|
L10n.of(context).myBaseLanguage,
|
|
|
|
|
hasError:
|
|
|
|
|
controller.languageMatchError != null,
|
|
|
|
|
backgroundColor: Theme.of(context)
|
|
|
|
|
.colorScheme
|
|
|
|
|
.surfaceContainerHigh,
|
|
|
|
|
@ -159,7 +166,8 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
languages: MatrixState.pangeaController
|
|
|
|
|
.pLanguageStore.targetOptions,
|
|
|
|
|
isL2List: true,
|
|
|
|
|
decorationText: L10n.of(context).iWantToLearn,
|
|
|
|
|
decorationText:
|
|
|
|
|
L10n.of(context).iWantToLearn,
|
|
|
|
|
error: controller.languageMatchError,
|
|
|
|
|
backgroundColor: Theme.of(context)
|
|
|
|
|
.colorScheme
|
|
|
|
|
@ -181,11 +189,12 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
ProfileSettingsSwitchListTile.adaptive(
|
|
|
|
|
defaultValue: controller.getToolSetting(
|
|
|
|
|
defaultValue:
|
|
|
|
|
controller.getToolSetting(
|
|
|
|
|
ToolSetting.autoIGC,
|
|
|
|
|
),
|
|
|
|
|
title:
|
|
|
|
|
ToolSetting.autoIGC.toolName(context),
|
|
|
|
|
title: ToolSetting.autoIGC
|
|
|
|
|
.toolName(context),
|
|
|
|
|
subtitle: ToolSetting.autoIGC
|
|
|
|
|
.toolDescription(context),
|
|
|
|
|
onChange: (bool value) =>
|
|
|
|
|
@ -196,12 +205,14 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
enabled: true,
|
|
|
|
|
),
|
|
|
|
|
ProfileSettingsSwitchListTile.adaptive(
|
|
|
|
|
defaultValue: controller.getToolSetting(
|
|
|
|
|
defaultValue:
|
|
|
|
|
controller.getToolSetting(
|
|
|
|
|
ToolSetting.enableAutocorrect,
|
|
|
|
|
),
|
|
|
|
|
title: ToolSetting.enableAutocorrect
|
|
|
|
|
.toolName(context),
|
|
|
|
|
subtitle: ToolSetting.enableAutocorrect
|
|
|
|
|
subtitle: ToolSetting
|
|
|
|
|
.enableAutocorrect
|
|
|
|
|
.toolDescription(context),
|
|
|
|
|
onChange: (bool value) {
|
|
|
|
|
controller.updateToolSetting(
|
|
|
|
|
@ -219,7 +230,8 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
for (final toolSetting in ToolSetting.values.where(
|
|
|
|
|
for (final toolSetting
|
|
|
|
|
in ToolSetting.values.where(
|
|
|
|
|
(tool) =>
|
|
|
|
|
tool.isAvailableSetting &&
|
|
|
|
|
tool != ToolSetting.autoIGC &&
|
|
|
|
|
@ -228,14 +240,15 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
ProfileSettingsSwitchListTile.adaptive(
|
|
|
|
|
defaultValue:
|
|
|
|
|
controller.getToolSetting(toolSetting),
|
|
|
|
|
defaultValue: controller
|
|
|
|
|
.getToolSetting(toolSetting),
|
|
|
|
|
title: toolSetting.toolName(context),
|
|
|
|
|
subtitle: toolSetting ==
|
|
|
|
|
ToolSetting.enableTTS &&
|
|
|
|
|
!controller.isTTSSupported
|
|
|
|
|
? null
|
|
|
|
|
: toolSetting.toolDescription(context),
|
|
|
|
|
: toolSetting
|
|
|
|
|
.toolDescription(context),
|
|
|
|
|
onChange: (bool value) =>
|
|
|
|
|
controller.updateToolSetting(
|
|
|
|
|
toolSetting,
|
|
|
|
|
@ -256,7 +269,12 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
activeColor: AppConfig.activeToggleColor,
|
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
|
),
|
|
|
|
|
ResetInstructionsListTile(controller: controller),
|
|
|
|
|
ResetInstructionsListTile(
|
|
|
|
|
controller: controller,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|