connectivity_builder 0.2.1 copy "connectivity_builder: ^0.2.1" to clipboard
connectivity_builder: ^0.2.1 copied to clipboard

Easily manage UI states based on network connectivity with the connectivity_builder package.

example/lib/main.dart

import 'package:connectivity_builder/connectivity_builder.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: ConnectivityBuilder(
          offlineBuilder: (context) => const Center(
            child: Text('No internet connection!'),
          ),
          onlineBuilder: (context) => const Center(
            child: Text('Internet connection available'),
          ),
        ),
      ),
    );
  }
}
8
likes
140
points
31
downloads

Publisher

verified publisherwevr.tech

Weekly Downloads

Easily manage UI states based on network connectivity with the connectivity_builder package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, flutter

More

Packages that depend on connectivity_builder