dart format

This commit is contained in:
2026-05-08 20:12:40 +02:00
parent 9e139b5704
commit 3b8da1d3d6
295 changed files with 6404 additions and 4161 deletions
+67 -54
View File
@@ -1,4 +1,3 @@
import 'dart:io';
import 'package:flutter/material.dart';
@@ -24,67 +23,81 @@ class _OverhangState extends State<Overhang> {
appBar: AppBar(
title: const Text('Mehr'),
actions: [
IconButton(onPressed: () => AppRoutes.openSettings(context), icon: const Icon(Icons.settings)),
IconButton(
onPressed: () => AppRoutes.openSettings(context),
icon: const Icon(Icons.settings),
),
],
),
body: _overhang(),
);
Widget _overhang() => ListView(
children: [
...AppModule.getOverhangModules(context).map((e) => e.toListTile(context)),
children: [
...AppModule.getOverhangModules(
context,
).map((e) => e.toListTile(context)),
const Divider(),
const Divider(),
ListTile(
leading: const Icon(Icons.share_outlined),
title: const Text('Teile die App'),
subtitle: const Text('Mit Freunden und deiner Klasse teilen'),
ListTile(
leading: const Icon(Icons.share_outlined),
title: const Text('Teile die App'),
subtitle: const Text('Mit Freunden und deiner Klasse teilen'),
trailing: const Icon(Icons.arrow_right),
onTap: () async {
final result = await showSelectShareTypeSheet(context);
if (!mounted || result != ShareTargetType.qr) return;
if (context.mounted) AppRoutes.openQrShare(context);
},
),
FutureBuilder(
future: InAppReview.instance.isAvailable(),
builder: (context, snapshot) {
if (!snapshot.hasData) return const SizedBox.shrink();
String? getPlatformStoreName() {
if (Platform.isAndroid) return 'Play store';
if (Platform.isIOS) return 'App store';
return null;
}
return ListTile(
leading: const CenteredLeading(Icon(Icons.star_rate_outlined)),
title: const Text('App bewerten'),
subtitle: getPlatformStoreName().wrapNullable(
(data) => Text('Im $data'),
),
trailing: const Icon(Icons.arrow_right),
onTap: () async {
final result = await showSelectShareTypeSheet(context);
if (!mounted || result != ShareTargetType.qr) return;
if (context.mounted) AppRoutes.openQrShare(context);
onTap: () {
InAppReview.instance
.openStoreListing(appStoreId: '6458789560')
.then(
(value) {
if (!context.mounted) return;
InfoDialog.show(context, 'Vielen Dank!');
},
onError: (error) {
if (!context.mounted) return;
InfoDialog.show(
context,
error.toString(),
copyable: true,
title: 'Fehler',
);
},
);
},
),
FutureBuilder(
future: InAppReview.instance.isAvailable(),
builder: (context, snapshot) {
if(!snapshot.hasData) return const SizedBox.shrink();
String? getPlatformStoreName() {
if(Platform.isAndroid) return 'Play store';
if(Platform.isIOS) return 'App store';
return null;
}
return ListTile(
leading: const CenteredLeading(Icon(Icons.star_rate_outlined)),
title: const Text('App bewerten'),
subtitle: getPlatformStoreName().wrapNullable((data) => Text('Im $data')),
trailing: const Icon(Icons.arrow_right),
onTap: () {
InAppReview.instance.openStoreListing(appStoreId: '6458789560').then(
(value) {
if (!context.mounted) return;
InfoDialog.show(context, 'Vielen Dank!');
},
onError: (error) {
if (!context.mounted) return;
InfoDialog.show(context, error.toString(), copyable: true, title: 'Fehler');
},
);
},
);
},
),
ListTile(
leading: const CenteredLeading(Icon(Icons.feedback_outlined)),
title: const Text('Du hast eine Idee?'),
subtitle: const Text('Fehler und Verbessungsvorschläge'),
trailing: const Icon(Icons.arrow_right),
onTap: () => AppRoutes.openFeedback(context),
),
],
);
);
},
),
ListTile(
leading: const CenteredLeading(Icon(Icons.feedback_outlined)),
title: const Text('Du hast eine Idee?'),
subtitle: const Text('Fehler und Verbessungsvorschläge'),
trailing: const Icon(Icons.arrow_right),
onTap: () => AppRoutes.openFeedback(context),
),
],
);
}