flml_internet_checker 0.0.5 copy "flml_internet_checker: ^0.0.5" to clipboard
flml_internet_checker: ^0.0.5 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 MaterialApp(
      title: 'Internet Checker',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const 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
0
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

License

unknown (license)

Dependencies

connectivity_plus, flutter, google_fonts, internet_connection_checker, rounded_loading_button

More

Packages that depend on flml_internet_checker