register static method

void register({
  1. required String route,
  2. required String title,
  3. String body = '',
  4. String author = '',
  5. String contentType = '',
  6. Map<String, String> metadata = const {},
})

Register the visible page content.

Implementation

static void register({
  required String route,
  required String title,
  String body = '',
  String author = '',
  String contentType = '',
  Map<String, String> metadata = const {},
}) {
  PageContentRegistry.route = route;
  PageContentRegistry.title = title;
  PageContentRegistry.body = body;
  PageContentRegistry.author = author;
  PageContentRegistry.contentType = contentType;
  PageContentRegistry.metadata = Map.of(metadata);
  PageContentRegistry.registeredAt = DateTime.now().millisecondsSinceEpoch;
}