loading_modal_button 1.1.1 copy "loading_modal_button: ^1.1.1" to clipboard
loading_modal_button: ^1.1.1 copied to clipboard

Buttons that show a loading modal when pressed. And after finish loading, you can execute a function.

Loading Modal Button #

This package allow indicating async process on modal screen after tap button

Features #

You can use Flutter default buttons, and also custom widget.
Below, you can use button type.

  • ElevatedButton
  • OutlinedButton
  • TextButton
  • IconButton

Getting started #

import 'package:loading_modal_button/loading_modal_button.dart';

Usage #

Easy Usage #

LoadingModalButton(
  onPressed: () async {
    // async process
  },
),

Another Default Flutter Buttons Usage #

LoadingModalButton(
  buttonType: ButtonType.outlined,
  // You can choose [ButtonType.elevated], [ButtonType.outlined], [ButtonType.text]
  onPressed: () async {
  },
),

After async example #

  LoadingModalButton(
    onPressed: () async {
      await Future.delayed(const Duration(seconds: 1));
    },
    afterAsync: () {
      ScaffoldMessenger.of(context).showSnackBar(
        const SnackBar(
          content: Text('SnackBar'),
        ),
      );
    },
  ),
3
likes
0
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

Buttons that show a loading modal when pressed. And after finish loading, you can execute a function.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on loading_modal_button