Skip to content

sukekyo000/loading_modal_button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'),
        ),
      );
    },
  ),

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors