async_action_button 3.0.0 copy "async_action_button: ^3.0.0" to clipboard
async_action_button: ^3.0.0 copied to clipboard

discontinued

A button that, when tapped, shows a loading indicator. Useful for asynchronous actions that may take some time to complete.

example/main.dart

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

const kLoadingDuration = Duration(seconds: 1);

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        textButtonTheme: const TextButtonThemeData(style: ButtonStyle()),
      ),
      home: Scaffold(
        body: Center(
          child: AsyncActionButton(
            text: 'Submit',
            onPressed: () => Future.delayed(kLoadingDuration),
          ),
        ),
      ),
    );
  }
}
1
likes
140
pub points
0%
popularity

Publisher

verified publisherzippa.pizza

A button that, when tapped, shows a loading indicator. Useful for asynchronous actions that may take some time to complete.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_adaptive, flutter_bloc

More

Packages that depend on async_action_button