Change initialization and logging

This commit is contained in:
problematicconsumer
2023-12-22 14:16:24 +03:30
parent defca7de5e
commit 6219663a4c
22 changed files with 409 additions and 277 deletions

View File

@@ -23,28 +23,7 @@ class GeneralSettingTiles extends HookConsumerWidget {
return Column(
children: [
const LocalePrefTile(),
EnableAnalyticsPrefTile(
onChanged: (value) async {
await showDialog<bool>(
context: context,
builder: (context) {
return AlertDialog(
title: Text(t.settings.general.enableAnalytics),
content: Text(t.settings.requiresRestartMsg),
actions: [
TextButton(
onPressed: () => context.pop(true),
child: Text(
MaterialLocalizations.of(context).okButtonLabel,
),
),
],
);
},
);
return ref.read(enableAnalyticsProvider.notifier).update(value);
},
),
const EnableAnalyticsPrefTile(),
ListTile(
title: Text(t.settings.general.themeMode),
subtitle: Text(themeMode.present(t)),