Skip to content

Commit

Permalink
feat: added the dialog route behavior and also modified the message w…
Browse files Browse the repository at this point in the history
…hen a cms route fails to load
  • Loading branch information
pavanpodila committed Mar 23, 2024
1 parent 546c5d3 commit 4a5b705
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class _RouteFutureBuilderState extends State<RouteFutureBuilder> {
vyuh.analytics.reportError(exception);

return vyuh.widgetBuilder.errorView(
title: 'Failed to load route',
title: 'Failed to load route from CMS',
error: exception,
onRetry: _refresh,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ final class DialogRouteType extends RouteTypeConfiguration {

@override
Page<T> create<T>(Widget child, vc.RouteBase route) {
return ModalDialogPage(builder: (context) => child);
return switch (behavior) {
DialogBehavior.modalBottomSheet =>
ModalDialogPage(builder: (context) => child),
DialogBehavior.fullscreen => DialogPage(builder: (context) => child),
};
}
}

0 comments on commit 4a5b705

Please sign in to comment.