mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-30 12:30:16 +02:00
Changelog now rendered as MarkDown
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_markdown/flutter_markdown.dart';
|
||||
import 'package:obtainium/components/custom_app_bar.dart';
|
||||
import 'package:obtainium/components/generated_form.dart';
|
||||
import 'package:obtainium/components/generated_form_modal.dart';
|
||||
@@ -14,6 +15,7 @@ import 'package:obtainium/providers/source_provider.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
import 'package:markdown/markdown.dart' as md;
|
||||
|
||||
class AppsPage extends StatefulWidget {
|
||||
const AppsPage({super.key});
|
||||
@@ -242,14 +244,8 @@ class AppsPageState extends State<AppsPage> {
|
||||
builder: (BuildContext context) {
|
||||
return GeneratedFormModal(
|
||||
title: tr('changes'),
|
||||
items: [],
|
||||
items: const [],
|
||||
additionalWidgets: [
|
||||
Text(changeLog),
|
||||
changesUrl != null
|
||||
? const SizedBox(
|
||||
height: 16,
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
changesUrl != null
|
||||
? GestureDetector(
|
||||
child: Text(
|
||||
@@ -265,7 +261,29 @@ class AppsPageState extends State<AppsPage> {
|
||||
.externalApplication);
|
||||
},
|
||||
)
|
||||
: const SizedBox.shrink()
|
||||
: const SizedBox.shrink(),
|
||||
changesUrl != null
|
||||
? const SizedBox(
|
||||
height: 16,
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
SizedBox(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height:
|
||||
MediaQuery.of(context).size.height -
|
||||
350,
|
||||
child: Markdown(
|
||||
data: changeLog,
|
||||
extensionSet: md.ExtensionSet(
|
||||
md.ExtensionSet.gitHubFlavored
|
||||
.blockSyntaxes,
|
||||
[
|
||||
md.EmojiSyntax(),
|
||||
...md.ExtensionSet.gitHubFlavored
|
||||
.inlineSyntaxes
|
||||
],
|
||||
),
|
||||
)),
|
||||
],
|
||||
singleNullReturnButton: tr('ok'),
|
||||
);
|
||||
|
Reference in New Issue
Block a user