mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-31 04:50:16 +02:00
Changelog now rendered as MarkDown
This commit is contained in:
@@ -476,6 +476,7 @@ class _GeneratedFormState extends State<GeneratedForm> {
|
||||
rowItems.add(Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
rowInput.value,
|
||||
...widget.items[rowInputs.key][rowInput.key].belowWidgets
|
||||
|
@@ -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'),
|
||||
);
|
||||
|
16
pubspec.lock
16
pubspec.lock
@@ -235,6 +235,14 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_markdown:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_markdown
|
||||
sha256: "7b25c10de1fea883f3c4f9b8389506b54053cd00807beab69fd65c8653a2711f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.14"
|
||||
flutter_plugin_android_lifecycle:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -325,6 +333,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
markdown:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: markdown
|
||||
sha256: b3c60dee8c2af50ad0e6e90cceba98e47718a6ee0a7a6772c77846a0cc21f78b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.1"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@@ -59,6 +59,7 @@ dependencies:
|
||||
sqflite: ^2.2.0+3
|
||||
easy_localization: ^3.0.1
|
||||
android_intent_plus: ^3.1.5
|
||||
flutter_markdown: ^0.6.14
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
|
Reference in New Issue
Block a user