mirror of
https://github.com/inventree/inventree-app.git
synced 2025-08-12 15:30:55 +00:00
Format code
This commit is contained in:
@@ -6,44 +6,38 @@ import "package:url_launcher/url_launcher.dart";
|
||||
import "package:inventree/l10.dart";
|
||||
import "package:inventree/helpers.dart";
|
||||
|
||||
|
||||
class ReleaseNotesWidget extends StatelessWidget {
|
||||
|
||||
const ReleaseNotesWidget(this.releaseNotes);
|
||||
|
||||
final String releaseNotes;
|
||||
|
||||
@override
|
||||
Widget build (BuildContext context) {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(L10().releaseNotes),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
),
|
||||
body: Markdown(
|
||||
selectable: false,
|
||||
data: releaseNotes,
|
||||
onTapLink: (url, href, title) {
|
||||
var link = href ?? "";
|
||||
if (link.isNotEmpty) {
|
||||
openLink(link);
|
||||
}
|
||||
},
|
||||
)
|
||||
);
|
||||
appBar: AppBar(
|
||||
title: Text(L10().releaseNotes),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
),
|
||||
body: Markdown(
|
||||
selectable: false,
|
||||
data: releaseNotes,
|
||||
onTapLink: (url, href, title) {
|
||||
var link = href ?? "";
|
||||
if (link.isNotEmpty) {
|
||||
openLink(link);
|
||||
}
|
||||
},
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CreditsWidget extends StatelessWidget {
|
||||
|
||||
const CreditsWidget(this.credits);
|
||||
|
||||
final String credits;
|
||||
|
||||
// Callback function when a link is clicked in the markdown
|
||||
Future<void> openLink(String url) async {
|
||||
|
||||
final link = Uri.parse(url);
|
||||
|
||||
if (await canLaunchUrl(link)) {
|
||||
@@ -52,22 +46,21 @@ class CreditsWidget extends StatelessWidget {
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build (BuildContext context) {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(L10().credits),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
),
|
||||
body: Markdown(
|
||||
selectable: false,
|
||||
data: credits,
|
||||
onTapLink: (url, href, title) {
|
||||
var link = href ?? "";
|
||||
if (link.isNotEmpty) {
|
||||
openLink(link);
|
||||
}
|
||||
},
|
||||
)
|
||||
);
|
||||
appBar: AppBar(
|
||||
title: Text(L10().credits),
|
||||
backgroundColor: COLOR_APP_BAR,
|
||||
),
|
||||
body: Markdown(
|
||||
selectable: false,
|
||||
data: credits,
|
||||
onTapLink: (url, href, title) {
|
||||
var link = href ?? "";
|
||||
if (link.isNotEmpty) {
|
||||
openLink(link);
|
||||
}
|
||||
},
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user