aboutsummaryrefslogtreecommitdiff
path: root/lib/views/info_view.dart
diff options
context:
space:
mode:
authordavidpkj <davidpenkow1@gmail.com>2023-03-05 13:05:25 +0100
committerdavidpkj <davidpenkow1@gmail.com>2023-03-05 13:05:25 +0100
commit14e4496de4138c317791030215803e7d57ec85bc (patch)
tree0d165667f1026325a7688c0f40bae4be6d7115f2 /lib/views/info_view.dart
parent45e4c5426a9090407dc1d210361c22ca83d8aa65 (diff)
Refactored according to flutter lint
Diffstat (limited to 'lib/views/info_view.dart')
-rw-r--r--lib/views/info_view.dart19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/views/info_view.dart b/lib/views/info_view.dart
index bda2d14..0d0897d 100644
--- a/lib/views/info_view.dart
+++ b/lib/views/info_view.dart
@@ -10,10 +10,10 @@ class InfoView extends StatefulWidget {
const InfoView({Key? key}) : super(key: key);
@override
- _InfoViewState createState() => _InfoViewState();
+ InfoViewState createState() => InfoViewState();
}
-class _InfoViewState extends State<InfoView> {
+class InfoViewState extends State<InfoView> {
String name = "David Penkowoj";
String websiteURL = "https://davidpenkowoj.de";
String sourceCodeURL = "https://git.davidpenkowoj.de/kulinar_app.git";
@@ -23,7 +23,7 @@ class _InfoViewState extends State<InfoView> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(AppLocalizations.of(context)!.category9)),
- drawer: CustomDrawer(initalIndex: 6),
+ drawer: const CustomDrawer(initialIndex: 6),
body: ListView(
children: <Widget>[
Padding(
@@ -32,7 +32,7 @@ class _InfoViewState extends State<InfoView> {
),
ListTile(
title: Text(AppLocalizations.of(context)!.info1, style: cDefaultTextStyle),
- subtitle: Text(cVersion, style: cDetailsTextStyle),
+ subtitle: const Text(cVersion, style: cDetailsTextStyle),
),
ListTile(
title: Text(AppLocalizations.of(context)!.info2, style: cDefaultTextStyle),
@@ -42,7 +42,7 @@ class _InfoViewState extends State<InfoView> {
title: Text(AppLocalizations.of(context)!.info3, style: cDefaultTextStyle),
subtitle: Text(websiteURL, style: cDetailsTextStyle, overflow: TextOverflow.ellipsis),
trailing: IconButton(
- icon: Icon(Icons.north_east_rounded),
+ icon: const Icon(Icons.north_east_rounded),
onPressed: () {
_launchURL(Uri.parse(websiteURL));
},
@@ -52,7 +52,7 @@ class _InfoViewState extends State<InfoView> {
title: Text(AppLocalizations.of(context)!.info4, style: cDefaultTextStyle),
subtitle: Text(sourceCodeURL, style: cDetailsTextStyle, overflow: TextOverflow.ellipsis),
trailing: IconButton(
- icon: Icon(Icons.north_east_rounded),
+ icon: const Icon(Icons.north_east_rounded),
onPressed: () {
_launchURL(Uri.parse(sourceCodeURL));
},
@@ -62,7 +62,7 @@ class _InfoViewState extends State<InfoView> {
title: Text(AppLocalizations.of(context)!.info5, style: cDefaultTextStyle),
subtitle: Text(privacyNoticeURL, style: cDetailsTextStyle, overflow: TextOverflow.ellipsis),
trailing: IconButton(
- icon: Icon(Icons.north_east_rounded),
+ icon: const Icon(Icons.north_east_rounded),
onPressed: () {
_launchURL(Uri.parse(privacyNoticeURL));
},
@@ -71,7 +71,7 @@ class _InfoViewState extends State<InfoView> {
ListTile(
title: Text(AppLocalizations.of(context)!.info6, style: cDefaultTextStyle),
trailing: IconButton(
- icon: Icon(Icons.launch_rounded),
+ icon: const Icon(Icons.launch_rounded),
onPressed: () {
_showDialog();
},
@@ -95,7 +95,8 @@ class _InfoViewState extends State<InfoView> {
if (await canLaunchUrl(url)) {
await launchUrl(url, mode: LaunchMode.externalApplication);
} else {
- print('Could not launch $url');
+ debugPrint("Could not launch $url");
+ // TODO: maybe add toastbar
}
}
}