1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 21:09:21 +00:00
comunicmobile/lib/ui/routes/main_route/page_info.dart

39 lines
768 B
Dart
Raw Normal View History

2020-05-10 16:29:43 +00:00
import 'package:flutter/cupertino.dart';
/// Single page information
///
/// @author Pierre HUBERT
enum PageType {
USER_PAGE,
GROUP_PAGE,
CONVERSATION_PAGE,
NOTIFICATIONS_PAGE,
CONVERSATIONS_LIST_PAGE,
FRIENDS_LIST_PAGE,
LATEST_POSTS_PAGE,
OTHER_PAGE
}
class PageInfo {
final PageType type;
final Widget child;
final int id;
final bool hideNavBar;
final bool canShowAsDialog;
2020-05-11 11:38:51 +00:00
/// Unique identification of this child
final key = UniqueKey();
PageInfo({
2020-05-10 16:29:43 +00:00
this.type = PageType.OTHER_PAGE,
@required this.child,
this.id,
this.hideNavBar = false,
this.canShowAsDialog = false,
}) : assert(type != null),
assert(child != null),
assert(hideNavBar != null),
assert(canShowAsDialog != null);
}