progressive_fab 0.0.5 copy "progressive_fab: ^0.0.5" to clipboard
progressive_fab: ^0.0.5 copied to clipboard

A customizable Progressive Floating Action Button (FAB) for Flutter.

example/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Progressive FAB Demo',
      theme: ThemeData(primarySwatch: Colors.blue),
      home: const FabDemoPage(),
    );
  }
}

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

  @override
  State<FabDemoPage> createState() => _FabDemoPageState();
}

class _FabDemoPageState extends State<FabDemoPage> {
  double _progress = 0;

  void _incrementProgress() {
    setState(() {
      _progress += 10;
      if (_progress > 100) _progress = 0;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Progressive FAB Example')),
      body: Center(
        child: Text(
          'Progress: \\${_progress.toInt()}%',
          style: const TextStyle(fontSize: 24),
        ),
      ),
      floatingActionButton: ProgressiveFAB(
        progress: _progress,
        onPressed: _incrementProgress,
        icon: const Icon(Icons.add),
        fabColor: Colors.blue,
        progressColor: Colors.green,
        borderColor: Colors.grey.shade300,
        iconColor: Colors.white,
        size: 80,
        padding: 10,
      ),
    );
  }
}
4
likes
160
points
25
downloads
screenshot

Publisher

unverified uploader

Weekly Downloads

A customizable Progressive Floating Action Button (FAB) for Flutter.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on progressive_fab