yourWidget method

  1. @override
Widget yourWidget(
  1. BuildContext context,
  2. AlbumModel? value
)
override

Implementation

@override
Widget yourWidget(BuildContext context, AlbumModel? value) {
  if (value == null) {
    return text(app, context, "Album is not available");
  } else {
    if (value.albumEntries == null) return Container();
    List<PlatformMediumModel> mmm = [];
    for (var medium in value.albumEntries!) {
      if (medium.medium != null) {
        mmm.add(medium.medium!);
      }
    }

    List<PlatformMediumModel> media = mmm;
    return MediaHelper.staggeredPlatformMediumModel(app, context, media,
        background: value.backgroundImage, viewAction: (index) {
      _action(context, value.albumEntries!, index);
    });
  }
}