buildTopWidget method
- {required BuildContext context,
- required WidgetRef ref,
- required AppModel appModel,
- required CreatorModel creatorModel,
- required Orientation orientation}
override
Media fields are special and have a Widget that is shown at the top of the Card Creator.
Implementation
@override
Widget buildTopWidget({
required BuildContext context,
required WidgetRef ref,
required AppModel appModel,
required CreatorModel creatorModel,
required Orientation orientation,
}) {
if (isSearching) {
return buildDisabledPlayer(context);
}
if (!showWidget) {
if (orientation == Orientation.landscape) {
return const SizedBox(height: 24);
} else {
return const SizedBox.shrink();
}
}
return buildAudioPlayer();
}