flml_internet_checker 0.0.8 copy "flml_internet_checker: ^0.0.8" to clipboard
flml_internet_checker: ^0.0.8 copied to clipboard

This package aims to check internet connection by just wrapping the widget with InternetChecker Widget without using any function calls inside your app"

example/lib/main.dart

import 'package:flml_internet_checker/flml_internet_checker.dart';
import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Internet Checker',
      home: HomeScreen(),
    );
  }
}

class HomeScreen extends StatefulWidget {
  const HomeScreen({super.key});

  @override
  State<HomeScreen> createState() => _HomeScreenState();
}

class _HomeScreenState extends State<HomeScreen> {
  @override
  Widget build(BuildContext context) {
    return InternetChecker(
      placeHolder: Lottie.asset(
        "assets/no_internet.json",
        height: 250,
      ),
      internetConnectionText: "No Internet Connection",
      child: const Scaffold(
        body: Center(
          child: Text("You are Online"),
        ),
      ),
    );
  }
}
35
likes
160
points
59
downloads

Publisher

unverified uploader

Weekly Downloads

This package aims to check internet connection by just wrapping the widget with InternetChecker Widget without using any function calls inside your app"

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, google_fonts, internet_connection_checker_plus

More

Packages that depend on flml_internet_checker