mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-15 00:12:22 -06:00
feat: add changelogs, update old changelogs, update build scripts
This commit is contained in:
18
lib/routes/typed/top_level/changelog_route.dart
Normal file
18
lib/routes/typed/top_level/changelog_route.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:paperless_mobile/features/changelogs/view/changelog_dialog.dart';
|
||||
import 'package:paperless_mobile/routes/navigation_keys.dart';
|
||||
import 'package:paperless_mobile/routes/utils/dialog_page.dart';
|
||||
|
||||
part 'changelog_route.g.dart';
|
||||
|
||||
@TypedGoRoute<ChangelogRoute>(path: '/changelogs)')
|
||||
class ChangelogRoute extends GoRouteData {
|
||||
static final $parentNavigatorKey = rootNavigatorKey;
|
||||
@override
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
return DialogPage(
|
||||
builder: (context) => const ChangelogDialog(),
|
||||
);
|
||||
}
|
||||
}
|
||||
40
lib/routes/utils/dialog_page.dart
Normal file
40
lib/routes/utils/dialog_page.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DialogPage<T> extends Page<T> {
|
||||
final Offset? anchorPoint;
|
||||
final Color? barrierColor;
|
||||
final bool barrierDismissible;
|
||||
final String? barrierLabel;
|
||||
final bool useSafeArea;
|
||||
final CapturedThemes? themes;
|
||||
final WidgetBuilder builder;
|
||||
|
||||
const DialogPage({
|
||||
required this.builder,
|
||||
this.anchorPoint,
|
||||
this.barrierColor = Colors.black38,
|
||||
this.barrierDismissible = true,
|
||||
this.barrierLabel,
|
||||
this.useSafeArea = true,
|
||||
this.themes,
|
||||
super.key,
|
||||
super.name,
|
||||
super.arguments,
|
||||
super.restorationId,
|
||||
});
|
||||
|
||||
@override
|
||||
Route<T> createRoute(BuildContext context) => DialogRoute<T>(
|
||||
context: context,
|
||||
settings: this,
|
||||
builder: (context) => Dialog(
|
||||
child: builder(context),
|
||||
),
|
||||
anchorPoint: anchorPoint,
|
||||
barrierColor: barrierColor,
|
||||
barrierDismissible: barrierDismissible,
|
||||
barrierLabel: barrierLabel,
|
||||
useSafeArea: useSafeArea,
|
||||
themes: themes,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user