SuggestionsPage constructor

const SuggestionsPage({
  1. required String userId,
  2. required SuggestionsDataSource suggestionsDataSource,
  3. required SuggestionsTheme theme,
  4. required OnGetUserById onGetUserById,
  5. GlobalKey<NavigatorState>? navigatorKey,
  6. AdminSettings? adminSettings,
  7. bool isAdmin = false,
  8. OnSaveToGalleryCallback? onSaveToGallery,
  9. OnUploadMultiplePhotosCallback? onUploadMultiplePhotos,
  10. String? appBarTitle,
  11. Map<String, String>? imageHeaders,
  12. String? locale,
  13. SortType sortType = SortType.upvotes,
  14. Key? key,
})

Implementation

const SuggestionsPage({
  required this.userId,
  required this.suggestionsDataSource,
  required this.theme,
  required this.onGetUserById,
  this.navigatorKey,
  this.adminSettings,
  this.isAdmin = false,
  this.onSaveToGallery,
  this.onUploadMultiplePhotos,
  this.appBarTitle,
  this.imageHeaders,
  this.locale,
  this.sortType = SortType.upvotes,
  super.key,
}) : assert(
        (isAdmin && adminSettings != null) || !isAdmin,
        'if isAdmin == true, then adminSettings cannot be null',
      );