selectMediaPickSetting method Null safety

Future<MediaPickSetting?> selectMediaPickSetting(
  1. BuildContext context
)

Implementation

static Future<MediaPickSetting?> selectMediaPickSetting(
  BuildContext context,
) =>
    showDialog<MediaPickSetting>(
      context: context,
      builder: (ctx) => AlertDialog(
        contentPadding: EdgeInsets.zero,
        backgroundColor: Colors.transparent,
        content: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            TextButton.icon(
              icon: const Icon(
                Icons.collections,
                color: Colors.orangeAccent,
              ),
              label: Text('Gallery'.i18n),
              onPressed: () => Navigator.pop(ctx, MediaPickSetting.Gallery),
            ),
            TextButton.icon(
              icon: const Icon(
                Icons.link,
                color: Colors.cyanAccent,
              ),
              label: Text('Link'.i18n),
              onPressed: () => Navigator.pop(ctx, MediaPickSetting.Link),
            )
          ],
        ),
      ),
    );