A Simple Flutter package that help to create buttons with inner progressBar indicator for using delayed processes. This package contains 5 button types: TextButton, ElevatedButton, simple and tonal FilledButton, and OutlinedButton. You can pass an icon for ElevatedButton, FilledButton, OutlinedButton optionaly.
Preview
Getting started
To use this package, add flutter_darix as a dependency in your pubspec.yaml file. Then import the package like this:
import 'package:flutter_darix/flutter_darix.dart';
Usage
There are some simple examples:
TextButton example
DariXTextButton(
buttonText: 'push me!', // the only required field
onPressed: () {},
onLongPressed: () {},
width: 140,
height: 45,
)
FilledButton without icon example
DariXFilledButton(
buttonText: 'push me!', // the only required field
onPressed: () {},
onLongPressed: () {},
width: 140,
height: 45,
)
FilledButton with icon example
DariXFilledButton(
buttonText: 'push me!', // the only required field
onPressed: () {},
onLongPressed: () {},
width: 140,
height: 45,
icon: const Icon(Icons.save),
)
Tonal FilledButton without icon example
DariXFilledButton(
buttonText: 'push me!', // the only required field
onPressed: () {},
onLongPressed: () {},
width: 140,
height: 45,
isTonal: true,
)
Tonal FilledButton with icon example
DariXFilledButton(
buttonText: 'push me!', // the only required field
onPressed: () {},
onLongPressed: () {},
width: 140,
height: 45,
icon: const Icon(Icons.save),
isTonal: true,
)
ElevatedButton without icon example
DariXElevatedButton(
buttonText: 'push me!', // the only required field
onPressed: () {},
onLongPressed: () {},
width: 140,
height: 45,
)
ElevatedButton with icon example
DariXElevatedButton(
buttonText: 'push me!', // the only required field
onPressed: () {},
onLongPressed: () {},
width: 140,
height: 45,
icon: const Icon(Icons.save),
)
OutlinedButton without icon example
DariXOutlinedButton(
buttonText: 'push me!', // the only required field
onPressed: () {},
onLongPressed: () {},
width: 140,
height: 45,
)
OutlinedButton with icon example
DariXOutlinedButton(
buttonText: 'push me!', // the only required field
onPressed: () {},
onLongPressed: () {},
width: 140,
height: 45,
icon: const Icon(Icons.save),
)
Notes
For more customizations, you can use some other optional filed for the buttons such as: textStyle ,buttonStyle, progressBarSize, progressBarColor, customProgressBar, etc. for more info see source code of each button class in repo.