updated project linter-rules and enforced them
This commit is contained in:
@ -40,21 +40,21 @@ class _SettingsState extends State<Settings> {
|
||||
return Consumer<SettingsProvider>(builder: (context, settings, child) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("Einstellungen"),
|
||||
title: const Text('Einstellungen'),
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const CenteredLeading(Icon(Icons.logout_outlined)),
|
||||
title: const Text("Konto abmelden"),
|
||||
subtitle: Text("Angemeldet als ${AccountData().getUsername()}"),
|
||||
title: const Text('Konto abmelden'),
|
||||
subtitle: Text('Angemeldet als ${AccountData().getUsername()}'),
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => ConfirmDialog(
|
||||
title: "Abmelden?",
|
||||
content: "Möchtest du dich wirklich abmelden?",
|
||||
confirmButton: "Abmelden",
|
||||
title: 'Abmelden?',
|
||||
content: 'Möchtest du dich wirklich abmelden?',
|
||||
confirmButton: 'Abmelden',
|
||||
onConfirm: () {
|
||||
SharedPreferences.getInstance().then((value) => {
|
||||
value.clear(),
|
||||
@ -75,7 +75,7 @@ class _SettingsState extends State<Settings> {
|
||||
|
||||
ListTile(
|
||||
leading: const Icon(Icons.dark_mode_outlined),
|
||||
title: const Text("Farbgebung"),
|
||||
title: const Text('Farbgebung'),
|
||||
trailing: DropdownButton<ThemeMode>(
|
||||
value: settings.val().appTheme,
|
||||
icon: const Icon(Icons.arrow_drop_down),
|
||||
@ -100,7 +100,7 @@ class _SettingsState extends State<Settings> {
|
||||
|
||||
ListTile(
|
||||
leading: const Icon(Icons.star_border),
|
||||
title: const Text("Favoriten im Talk nach oben sortieren"),
|
||||
title: const Text('Favoriten im Talk nach oben sortieren'),
|
||||
trailing: Checkbox(
|
||||
value: settings.val().talkSettings.sortFavoritesToTop,
|
||||
onChanged: (e) {
|
||||
@ -111,7 +111,7 @@ class _SettingsState extends State<Settings> {
|
||||
|
||||
ListTile(
|
||||
leading: const Icon(Icons.mark_email_unread_outlined),
|
||||
title: const Text("Ungelesene Chats nach oben sortieren"),
|
||||
title: const Text('Ungelesene Chats nach oben sortieren'),
|
||||
trailing: Checkbox(
|
||||
value: settings.val().talkSettings.sortUnreadToTop,
|
||||
onChanged: (e) {
|
||||
@ -124,7 +124,7 @@ class _SettingsState extends State<Settings> {
|
||||
|
||||
ListTile(
|
||||
leading: const Icon(Icons.drive_folder_upload_outlined),
|
||||
title: const Text("Ordner in Dateien nach oben sortieren"),
|
||||
title: const Text('Ordner in Dateien nach oben sortieren'),
|
||||
trailing: Checkbox(
|
||||
value: settings.val().fileSettings.sortFoldersToTop,
|
||||
onChanged: (e) {
|
||||
@ -137,7 +137,7 @@ class _SettingsState extends State<Settings> {
|
||||
|
||||
ListTile(
|
||||
leading: const Icon(Icons.open_in_new_outlined),
|
||||
title: const Text("Dateien immer mit Systemdialog öffnen"),
|
||||
title: const Text('Dateien immer mit Systemdialog öffnen'),
|
||||
trailing: Checkbox(
|
||||
value: settings.val().fileViewSettings.alwaysOpenExternally,
|
||||
onChanged: (e) {
|
||||
@ -150,8 +150,8 @@ class _SettingsState extends State<Settings> {
|
||||
|
||||
ListTile(
|
||||
leading: const CenteredLeading(Icon(Icons.notifications_active_outlined)),
|
||||
title: const Text("Push-Benachrichtigungen aktivieren"),
|
||||
subtitle: const Text("Lange tippen für mehr Informationen"),
|
||||
title: const Text('Push-Benachrichtigungen aktivieren'),
|
||||
subtitle: const Text('Lange tippen für mehr Informationen'),
|
||||
trailing: Checkbox(
|
||||
value: settings.val().notificationSettings.enabled,
|
||||
onChanged: (e) {
|
||||
@ -163,16 +163,16 @@ class _SettingsState extends State<Settings> {
|
||||
},
|
||||
),
|
||||
onLongPress: () => showDialog(context: context, builder: (context) => AlertDialog(
|
||||
title: const Text("Info über Push"),
|
||||
content: const SingleChildScrollView(child: Text(""
|
||||
title: const Text('Info über Push'),
|
||||
content: const SingleChildScrollView(child: Text(''
|
||||
"Aufgrund technischer Limitationen müssen Push-nachrichten über einen externen Server - hier 'mhsl.eu' (Author dieser App) - erfolgen.\n\n"
|
||||
"Wenn Push aktiviert wird, werden deine Zugangsdaten und ein Token verschlüsselt an den Betreiber gesendet und von ihm unverschlüsselt gespeichert.\n\n"
|
||||
"Der extene Server verwendet die Zugangsdaten um sich maschinell in Nextcloud Talk anzumelden und via Websockets auf neue Nachrichten zu warten.\n\n"
|
||||
"Wenn eine neue Nachricht eintrifft wird dein Telefon via FBC-Messaging (Google Firebase Push) vom externen Server benachrichtigt.\n\n"
|
||||
"Behalte im Hinterkopf, dass deine Zugangsdaten auf einem externen Server gespeichert werden und dies trots bester Absichten ein Sicherheitsrisiko sein kann!"
|
||||
'Wenn Push aktiviert wird, werden deine Zugangsdaten und ein Token verschlüsselt an den Betreiber gesendet und von ihm unverschlüsselt gespeichert.\n\n'
|
||||
'Der extene Server verwendet die Zugangsdaten um sich maschinell in Nextcloud Talk anzumelden und via Websockets auf neue Nachrichten zu warten.\n\n'
|
||||
'Wenn eine neue Nachricht eintrifft wird dein Telefon via FBC-Messaging (Google Firebase Push) vom externen Server benachrichtigt.\n\n'
|
||||
'Behalte im Hinterkopf, dass deine Zugangsdaten auf einem externen Server gespeichert werden und dies trots bester Absichten ein Sicherheitsrisiko sein kann!'
|
||||
)),
|
||||
actions: [
|
||||
TextButton(onPressed: () => Navigator.of(context).pop(), child: const Text("Zurück"))
|
||||
TextButton(onPressed: () => Navigator.of(context).pop(), child: const Text('Zurück'))
|
||||
],
|
||||
)),
|
||||
),
|
||||
@ -181,18 +181,18 @@ class _SettingsState extends State<Settings> {
|
||||
|
||||
ListTile(
|
||||
leading: const Icon(Icons.live_help_outlined),
|
||||
title: const Text("Informationen und Lizenzen"),
|
||||
title: const Text('Informationen und Lizenzen'),
|
||||
onTap: () {
|
||||
PackageInfo.fromPlatform().then((appInfo) {
|
||||
showAboutDialog(
|
||||
context: context,
|
||||
applicationIcon: const Icon(Icons.apps),
|
||||
applicationName: "MarianumMobile",
|
||||
applicationVersion: "${appInfo.appName}\n\nPackage: ${appInfo.packageName}\nVersion: ${appInfo.version}\nBuild: ${appInfo.buildNumber}",
|
||||
applicationLegalese: "Dies ist ein Inoffizieller Nextcloud & Webuntis Client und wird nicht vom Marianum selbst betrieben.\n"
|
||||
"Keinerlei Gewähr für Vollständigkeit, Richtigkeit und Aktualität!\n\n"
|
||||
applicationName: 'MarianumMobile',
|
||||
applicationVersion: '${appInfo.appName}\n\nPackage: ${appInfo.packageName}\nVersion: ${appInfo.version}\nBuild: ${appInfo.buildNumber}',
|
||||
applicationLegalese: 'Dies ist ein Inoffizieller Nextcloud & Webuntis Client und wird nicht vom Marianum selbst betrieben.\n'
|
||||
'Keinerlei Gewähr für Vollständigkeit, Richtigkeit und Aktualität!\n\n'
|
||||
"${kReleaseMode ? "Production" : "Development"} build\n"
|
||||
"Marianum Fulda 2023-${Jiffy.now().year}\nElias Müller",
|
||||
'Marianum Fulda 2023-${Jiffy.now().year}\nElias Müller',
|
||||
);
|
||||
});
|
||||
},
|
||||
@ -201,31 +201,31 @@ class _SettingsState extends State<Settings> {
|
||||
|
||||
ListTile(
|
||||
leading: const Icon(Icons.policy_outlined),
|
||||
title: const Text("Impressum & Datenschutz"),
|
||||
title: const Text('Impressum & Datenschutz'),
|
||||
onTap: () {
|
||||
showDialog(context: context, builder: (context) {
|
||||
return SimpleDialog(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const CenteredLeading(Icon(Icons.school_outlined)),
|
||||
title: const Text("Infos zum Marianum Fulda"),
|
||||
subtitle: const Text("Für Talk-Chats und Dateien"),
|
||||
title: const Text('Infos zum Marianum Fulda'),
|
||||
subtitle: const Text('Für Talk-Chats und Dateien'),
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
onTap: () => PrivacyInfo(providerText: "Marianum", imprintUrl: "https://www.marianum-fulda.de/impressum", privacyUrl: "https://www.marianum-fulda.de/datenschutz").showPopup(context)
|
||||
onTap: () => PrivacyInfo(providerText: 'Marianum', imprintUrl: 'https://www.marianum-fulda.de/impressum', privacyUrl: 'https://www.marianum-fulda.de/datenschutz').showPopup(context)
|
||||
),
|
||||
ListTile(
|
||||
leading: const CenteredLeading(Icon(Icons.date_range_outlined)),
|
||||
title: const Text("Infos zu Web-/ Untis"),
|
||||
subtitle: const Text("Für den Vertretungsplan"),
|
||||
title: const Text('Infos zu Web-/ Untis'),
|
||||
subtitle: const Text('Für den Vertretungsplan'),
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
onTap: () => PrivacyInfo(providerText: "Untis", imprintUrl: "https://www.untis.at/impressum", privacyUrl: "https://www.untis.at/datenschutz-wu-apps").showPopup(context)
|
||||
onTap: () => PrivacyInfo(providerText: 'Untis', imprintUrl: 'https://www.untis.at/impressum', privacyUrl: 'https://www.untis.at/datenschutz-wu-apps').showPopup(context)
|
||||
),
|
||||
ListTile(
|
||||
leading: const CenteredLeading(Icon(Icons.send_time_extension_outlined)),
|
||||
title: const Text("Infos zu mhsl"),
|
||||
subtitle: const Text("Für Countdowns, Marianum Message und mehr"),
|
||||
title: const Text('Infos zu mhsl'),
|
||||
subtitle: const Text('Für Countdowns, Marianum Message und mehr'),
|
||||
trailing: const Icon(Icons.arrow_right),
|
||||
onTap: () => PrivacyInfo(providerText: "mhsl", imprintUrl: "https://mhsl.eu/id.html", privacyUrl: "https://mhsl.eu/datenschutz.html").showPopup(context),
|
||||
onTap: () => PrivacyInfo(providerText: 'mhsl', imprintUrl: 'https://mhsl.eu/id.html', privacyUrl: 'https://mhsl.eu/datenschutz.html').showPopup(context),
|
||||
),
|
||||
],
|
||||
);
|
||||
@ -240,15 +240,15 @@ class _SettingsState extends State<Settings> {
|
||||
visible: !kReleaseMode,
|
||||
child: ListTile(
|
||||
leading: const CenteredLeading(Icon(Icons.code)),
|
||||
title: const Text("Quellcode MarianumMobile/Client"),
|
||||
subtitle: const Text("GNU GPL v3"),
|
||||
onTap: () => ConfirmDialog.openBrowser(context, "https://mhsl.eu/gitea/MarianumMobile/Client"),
|
||||
title: const Text('Quellcode MarianumMobile/Client'),
|
||||
subtitle: const Text('GNU GPL v3'),
|
||||
onTap: () => ConfirmDialog.openBrowser(context, 'https://mhsl.eu/gitea/MarianumMobile/Client'),
|
||||
),
|
||||
),
|
||||
|
||||
ListTile(
|
||||
leading: const Icon(Icons.developer_mode_outlined),
|
||||
title: const Text("Entwicklermodus"),
|
||||
title: const Text('Entwicklermodus'),
|
||||
trailing: Checkbox(
|
||||
value: settings.val().devToolsEnabled,
|
||||
onChanged: (state) {
|
||||
@ -264,15 +264,13 @@ class _SettingsState extends State<Settings> {
|
||||
}
|
||||
|
||||
ConfirmDialog(
|
||||
title: "Entwicklermodus",
|
||||
content: ""
|
||||
"Die Entwickleransicht bietet erweiterte Funktionen, die für den üblichen Gebrauch nicht benötigt werden.\n\nDie Verwendung der Tools kann darüber hinaus bei falscher Verwendung zu Fehlern führen.\n\n"
|
||||
"Aktivieren auf eigene Verantwortung.",
|
||||
confirmButton: "Ja, ich verstehe das Risiko",
|
||||
cancelButton: "Nein, zurück zur App",
|
||||
onConfirm: () {
|
||||
changeView();
|
||||
},
|
||||
title: 'Entwicklermodus',
|
||||
content: ''
|
||||
'Die Entwickleransicht bietet erweiterte Funktionen, die für den üblichen Gebrauch nicht benötigt werden.\n\nDie Verwendung der Tools kann darüber hinaus bei falscher Verwendung zu Fehlern führen.\n\n'
|
||||
'Aktivieren auf eigene Verantwortung.',
|
||||
confirmButton: 'Ja, ich verstehe das Risiko',
|
||||
cancelButton: 'Nein, zurück zur App',
|
||||
onConfirm: changeView,
|
||||
).asDialog(context);
|
||||
},
|
||||
),
|
||||
|
Reference in New Issue
Block a user