MarkdownContentPage constructor

const MarkdownContentPage({
  1. Key? key,
  2. required AppAttributes appAttributes,
  3. required Footer footer,
  4. MarkdownContentConfig? config,
  5. String appendixTitle = 'Appendix',
  6. @Deprecated('Pass a MarkdownContentConfig via `config` instead. ' 'This parameter will be removed in a future release.') String? filePath,
  7. @Deprecated('Pass a MarkdownContentConfig via `config` instead. ' 'This parameter will be removed in a future release.') String? imageDir,
  8. @Deprecated('Pass a MarkdownContentConfig via `config` instead. ' 'This parameter will be removed in a future release.') List<Map<String, String>>? docsDesc,
})

Pass config or the deprecated pre-1.2 filePath/imageDir/docsDesc trio, never both. The analyzer does not flag the deprecated parameters, so only these docs announce the migration.

Implementation

const MarkdownContentPage({
  super.key,
  required this.appAttributes,
  required this.footer,
  MarkdownContentConfig? config,
  this.appendixTitle = 'Appendix',
  @Deprecated(
    'Pass a MarkdownContentConfig via `config` instead. '
    'This parameter will be removed in a future release.',
  )
  String? filePath,
  @Deprecated(
    'Pass a MarkdownContentConfig via `config` instead. '
    'This parameter will be removed in a future release.',
  )
  String? imageDir,
  @Deprecated(
    'Pass a MarkdownContentConfig via `config` instead. '
    'This parameter will be removed in a future release.',
  )
  List<Map<String, String>>? docsDesc,
}) : _config = config,
     _legacyFilePath = filePath,
     _legacyImageDir = imageDir,
     _legacyDocsDesc = docsDesc,
     assert(
       (config != null) !=
           (filePath != null || imageDir != null || docsDesc != null),
       'MarkdownContentPage: pass either `config:` or the deprecated '
       '`filePath:`/`imageDir:`/`docsDesc:` trio - not both, not neither.',
     );