WidgetbookUseCase.center constructor

  1. @Deprecated('Use [AlignmentAddon] instead to ' 'control your use-cases alignment. ' 'For more info: https://docs.widgetbook.io/addons/alignment-addon')
WidgetbookUseCase.center({
  1. required String name,
  2. required Widget child,
  3. String? fileType,
})

Implementation

@Deprecated(
  'Use [AlignmentAddon] instead to '
  'control your use-cases alignment. '
  'For more info: https://docs.widgetbook.io/addons/alignment-addon',
)
factory WidgetbookUseCase.center({
  required String name,
  required Widget child,
  String? fileType, // Changed to String for icon representation
}) {
  return WidgetbookUseCase(
    name: name,
    builder: (_) => Center(child: child),
    fileType: fileType, // Pass fileType as a String
  );
}