add-check-internet

Add internet connectivity checks to Cubit mix() method executions.

7|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/marcglasberg/bloc_superpowers --skill add-check-internet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-check-internet
Source: https://github.com/marcglasberg/bloc_superpowers/tree/main/.claude/skills/add-check-internet
Command: npx skills add https://github.com/marcglasberg/bloc_superpowers --skill add-check-internet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures internet connectivity before executing a Cubit method, preventing failed operations and unnecessary UI churn by integrating a guard into mix() calls with optional retry.

Core Features & Use Cases

  • Adds a checkInternet parameter to mix() to verify connectivity prior to running a method.
  • Supports abortSilently, ifOpenDialog, and retry configurations to control behavior during offline scenarios.
  • Use Case: protect startup data loads, network requests, or background sync from offline conditions.

Quick Start

Add checkInternet to the mix() call in your Cubit to guard against offline scenarios.

Frequently Asked Questions about add-check-internet

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check internet connectivity before executing a Flutter Cubit method?

To check internet connectivity in a Flutter Cubit, add a checkInternet parameter to the mix() call to verify network access prior to running the method. This prevents failed operations and unnecessary UI churn by guarding network requests during offline scenarios.

How does the checkInternet guard handle offline scenarios during data syncing?

The checkInternet guard handles offline scenarios during data syncing by supporting configurable abort behavior. It includes abortSilently to stop execution quietly and ifOpenDialog to display user prompts when connectivity is missing.

Can I configure automatic retry logic for Cubit network calls when offline?

Yes, you can configure automatic retry logic for Cubit network calls when offline. The checkInternet parameter in the mix() call supports retry configurations to automatically re-attempt execution after connectivity is restored.

Does this offline connectivity guard require any external dependencies?

No, this offline connectivity guard does not require any external dependencies. It integrates directly into your existing Cubit setup using the mix() call with checkInternet parameters and error handling hooks.

What is the best way to prevent UI churn from failed offline operations in Flutter?

The best way to prevent UI churn from failed offline operations in Flutter is to guard Cubit method executions with internet checks. Using abortSilently stops operations without triggering unnecessary UI updates when offline.

When should I guard startup data loads with an internet connectivity check?

You should guard startup data loads with an internet connectivity check whenever the method performs network calls or background syncing. This ensures the routine only executes when required internet access is available, preventing startup errors.