mirror of
https://github.com/inventree/inventree-app.git
synced 2026-07-08 13:51:31 +00:00
349a8e0ef5
* Updated dashboard - Display "outstanding" badges - Display "overdue" badges - Pull-to-refresh * Remove dead code * Refactor app colors * Add "pending shipments" icon * Remove custom spinner * Refactor error dialog * Updated redirect after login * Refactor login/account pages - Better UX and confirmation messages * Refactor API error messages * Improve token management - Secure storage - Handle session expiry - Per-profile HTTPS certificate checks * Improved error messages
62 lines
1.4 KiB
Dart
62 lines
1.4 KiB
Dart
import "package:flutter/material.dart";
|
|
import "package:flutter_markdown/flutter_markdown.dart";
|
|
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) {
|
|
return Scaffold(
|
|
appBar: AppBar(title: Text(L10().releaseNotes)),
|
|
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)) {
|
|
await launchUrl(link);
|
|
}
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(title: Text(L10().credits)),
|
|
body: Markdown(
|
|
selectable: false,
|
|
data: credits,
|
|
onTapLink: (url, href, title) {
|
|
var link = href ?? "";
|
|
if (link.isNotEmpty) {
|
|
openLink(link);
|
|
}
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|