easy_refresh_bubbles 1.0.0 copy "easy_refresh_bubbles: ^1.0.0" to clipboard
easy_refresh_bubbles: ^1.0.0 copied to clipboard

Bubbles Indicator on EasyRefresh. Provides BubblesHeader and BubblesFooter. Animation with Rive.

example/main.dart

import 'package:easy_refresh_bubbles/easy_refresh_bubbles.dart';
import 'package:flutter/material.dart';
import 'package:easy_refresh/easy_refresh.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Bubbles',
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  State<HomePage> createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  int _count = 10;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Bubbles'),
      ),
      body: EasyRefresh(
        header: const BubblesHeader(),
        footer: const BubblesFooter(),
        onRefresh: () async {
          await Future.delayed(const Duration(seconds: 4));
          if (!mounted) {
            return;
          }
          setState(() {
            _count = 10;
          });
        },
        onLoad: () async {
          await Future.delayed(const Duration(seconds: 4));
          if (!mounted) {
            return;
          }
          setState(() {
            _count += 5;
          });
        },
        child: ListView.builder(
          itemBuilder: (context, index) {
            return Card(
              child: Container(
                alignment: Alignment.center,
                height: 80,
                child: Text('${index + 1}'),
              ),
            );
          },
          itemCount: _count,
        ),
      ),
    );
  }
}
0
likes
130
pub points
16%
popularity

Publisher

unverified uploader

Bubbles Indicator on EasyRefresh. Provides BubblesHeader and BubblesFooter. Animation with Rive.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

easy_refresh, flutter, rive

More

Packages that depend on easy_refresh_bubbles