easy_refresh_halloween 1.0.2 copy "easy_refresh_halloween: ^1.0.2" to clipboard
easy_refresh_halloween: ^1.0.2 copied to clipboard

Halloween Indicator on EasyRefresh. Provides HalloweenHeader and HalloweenFooter. Animation with Rive.

example/main.dart

import 'package:easy_refresh_halloween/easy_refresh_halloween.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: 'Halloween',
      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('Halloween'),
      ),
      body: EasyRefresh(
        header: const HalloweenHeader(),
        footer: const HalloweenFooter(),
        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,
        ),
      ),
    );
  }
}
1
likes
130
pub points
45%
popularity

Publisher

unverified uploader

Halloween Indicator on EasyRefresh. Provides HalloweenHeader and HalloweenFooter. 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_halloween