|
|
|
|
@ -19,6 +19,12 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
title: Text(
|
|
|
|
|
L10n.of(context)!.learningSettings,
|
|
|
|
|
),
|
|
|
|
|
leading: controller.widget.isPopup
|
|
|
|
|
? IconButton(
|
|
|
|
|
icon: const Icon(Icons.close),
|
|
|
|
|
onPressed: Navigator.of(context).pop,
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
),
|
|
|
|
|
body: ListTileTheme(
|
|
|
|
|
iconColor: Theme.of(context).textTheme.bodyLarge!.color,
|
|
|
|
|
@ -28,22 +34,12 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
children: [
|
|
|
|
|
LanguageTile(controller),
|
|
|
|
|
CountryPickerTile(controller),
|
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
|
const Divider(height: 1),
|
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
|
// if (controller.pangeaController.permissionsController.isUser18())
|
|
|
|
|
// SwitchListTile.adaptive(
|
|
|
|
|
// activeColor: AppConfig.activeToggleColor,
|
|
|
|
|
// title: Text(L10n.of(context)!.publicProfileTitle),
|
|
|
|
|
// subtitle: Text(L10n.of(context)!.publicProfileDesc),
|
|
|
|
|
// value: controller.pangeaController.userController.isPublic,
|
|
|
|
|
// onChanged: (bool isPublicProfile) =>
|
|
|
|
|
// controller.setPublicProfile(isPublicProfile),
|
|
|
|
|
// ),
|
|
|
|
|
ListTile(
|
|
|
|
|
subtitle: Text(L10n.of(context)!.toggleToolSettingsDescription),
|
|
|
|
|
title: Text(L10n.of(context)!.toggleToolSettingsDescription),
|
|
|
|
|
),
|
|
|
|
|
for (final toolSetting in ToolSetting.values)
|
|
|
|
|
for (final toolSetting in ToolSetting.values
|
|
|
|
|
.where((tool) => tool.isAvailableSetting))
|
|
|
|
|
ProfileSettingsSwitchListTile.adaptive(
|
|
|
|
|
defaultValue: controller.getToolSetting(toolSetting),
|
|
|
|
|
title: toolSetting.toolName(context),
|
|
|
|
|
@ -66,18 +62,18 @@ class SettingsLearningView extends StatelessWidget {
|
|
|
|
|
return profile;
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
ProfileSettingsSwitchListTile.adaptive(
|
|
|
|
|
defaultValue: controller.pangeaController.userController.profile
|
|
|
|
|
.userSettings.autoPlayMessages,
|
|
|
|
|
title: L10n.of(context)!.autoPlayTitle,
|
|
|
|
|
subtitle: L10n.of(context)!.autoPlayDesc,
|
|
|
|
|
onChange: (bool value) => controller
|
|
|
|
|
.pangeaController.userController
|
|
|
|
|
.updateProfile((profile) {
|
|
|
|
|
profile.userSettings.autoPlayMessages = value;
|
|
|
|
|
return profile;
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
// ProfileSettingsSwitchListTile.adaptive(
|
|
|
|
|
// defaultValue: controller.pangeaController.userController.profile
|
|
|
|
|
// .userSettings.autoPlayMessages,
|
|
|
|
|
// title: L10n.of(context)!.autoPlayTitle,
|
|
|
|
|
// subtitle: L10n.of(context)!.autoPlayDesc,
|
|
|
|
|
// onChange: (bool value) => controller
|
|
|
|
|
// .pangeaController.userController
|
|
|
|
|
// .updateProfile((profile) {
|
|
|
|
|
// profile.userSettings.autoPlayMessages = value;
|
|
|
|
|
// return profile;
|
|
|
|
|
// }),
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|