Move changelog to new page
This commit is contained in:
parent
e06d35ecc3
commit
59f0a0233c
|
@ -7,7 +7,7 @@ import '../gen/assets.gen.dart';
|
|||
import '../hooks/memo_future.dart';
|
||||
import '../pages/log_console_page/log_console_page.dart';
|
||||
import '../url_launcher.dart';
|
||||
import 'bottom_modal.dart';
|
||||
import 'bottom_safe.dart';
|
||||
|
||||
/// Title that opens a dialog with information about Lemmur.
|
||||
/// Licenses, changelog, version etc.
|
||||
|
@ -37,12 +37,8 @@ class AboutTile extends HookWidget {
|
|||
TextButton.icon(
|
||||
icon: const Icon(Icons.subject),
|
||||
label: const Text('changelog'),
|
||||
onPressed: () => showBottomModal(
|
||||
context: context,
|
||||
padding: const EdgeInsets.all(8),
|
||||
builder: (_) => MarkdownBody(data: changelog),
|
||||
),
|
||||
),
|
||||
onPressed: () =>
|
||||
Navigator.of(context).push(ChangelogPage.route(changelog))),
|
||||
TextButton.icon(
|
||||
icon: const Icon(Icons.code),
|
||||
label: const Text('source code'),
|
||||
|
@ -90,3 +86,26 @@ class AboutTile extends HookWidget {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ChangelogPage extends StatelessWidget {
|
||||
final String changelog;
|
||||
|
||||
const ChangelogPage(this.changelog, {Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('Changelog')),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
children: [
|
||||
MarkdownBody(data: changelog),
|
||||
const BottomSafe(),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
static Route route(String changelog) => MaterialPageRoute(
|
||||
builder: (context) => ChangelogPage(changelog),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue