components_plus 1.0.0 copy "components_plus: ^1.0.0" to clipboard
components_plus: ^1.0.0 copied to clipboard

A Flutter package that provides a variety of utility components and a customizable button with a shrinking animation effect.

components_plus Package #

A Flutter package that provides a variety of utility components and a customizable button with a shrinking animation effect.

Features #

  • Utility methods for logging, screen size calculations, input decorations, URL launching, and more.
  • A customizable ShrinkingButton widget with various styling options and a shrinking animation effect on tap.

Installation #

Add this package to your project's pubspec.yaml file:

dependencies:
  components_plus: ^1.0.0

then run

flutter pub get

Usage #

import 'package:components_plus/components_plus.dart';

void main() {
  Components.showLogging(true);

  Components.logger('This is a log message');
  Components.loggerStackTrace('Error message', StackTrace.current);

  double height = Components.screenHeight(context);
  double width = Components.screenWidth(context);

  InputDecoration decoration =
  Components.textFieldDecoration(hintText: 'Enter text');

  SizedBox boxHeight = Components.sizedBoxHeight(10.0);
  SizedBox boxWidth = Components.sizedBoxWidth(10.0);

  Future<bool> launched = Components.urlLauncher('https://www.example.com');

  String cleanedString = Components.validString('  Some text  ');

  Components.showToast(
    context: context,
    strMsg: 'This is a toast message',
    toastBgColor: Colors.black,
    textColor: Colors.white,
    toastLength: Toast.LENGTH_SHORT,
  );

  Widget loader = Components.showLoader(isLoading: true, context: context);

  Components().showExitDialog(context, title: 'Exit');

  bool isListEmpty = Components.isNullOrEmptyList([]);
  bool isStringEmpty = Components.isNullOrEmptyString('   ');

  Uint8List imageBytes =
  Components.convertBase64ToImage('data:image/png;base64,iVBORw0KGgo...');
}

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

0
likes
140
points
31
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides a variety of utility components and a customizable button with a shrinking animation effect.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, fluttertoast, url_launcher

More

Packages that depend on components_plus