retryButton static method

Widget retryButton({
  1. required VoidCallback onRetry,
  2. required SplashTheme theme,
  3. String label = 'Retry',
  4. IconData icon = Icons.refresh,
})

A retry button shown when initialization fails.

Implementation

static Widget retryButton({
  required VoidCallback onRetry,
  required SplashTheme theme,
  String label = 'Retry',
  IconData icon = Icons.refresh,
}) {
  return ElevatedButton.icon(
    style: ElevatedButton.styleFrom(
      backgroundColor: theme.retryButtonColor,
      foregroundColor: theme.retryButtonTextColor,
      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(24)),
      padding: const EdgeInsets.symmetric(horizontal: 28, vertical: 12),
    ),
    onPressed: onRetry,
    icon: Icon(icon, size: 18),
    label: Text(label),
  );
}