Features

This Package is for AllRide Apps to use custom components.

Installation

1: Add the latest version of the package to your pubspec.yaml (and run dart pub get):


dependencies:
   all_ride: ^0.0.1
   

Or

2: Import the package and use it in your Flutter app.


import 'package:bouncy_container/bouncy_container.dart';

Usage


class AllRide {
  /*
  * This is Full Button
  * */
  static Widget fullButton({
    required BuildContext context,
    required VoidCallback onPressed,
    required String label,
    TextStyle? style,
    Color? color,
    Color? labelColor,
    double? height,
  }) {
    return ElevatedButton(
        onPressed: onPressed,
        style: ElevatedButton.styleFrom(
          backgroundColor: color ?? Theme.of(context).primaryColor,
          minimumSize: Size.fromHeight(height ?? 50.0),
        ),
        child: Text(
          label,
          style: style ??
              TextStyle(
                  fontSize: 16.0,
                  fontWeight: FontWeight.w600,
                  color: labelColor ?? Colors.white),
        ));
  }

  /*
  * This is Text Button
  * */
  static Widget textButton({
    required BuildContext context,
    required VoidCallback onPressed,
    required String label,
    TextStyle? style,
    Color? labelColor,
    double? height,
  }) {
    return TextButton(
      onPressed: onPressed,
      style: ElevatedButton.styleFrom(
        minimumSize: Size.fromHeight(height ?? 50.0),
      ),
      child: Text(
        label,
        style: style ??
            TextStyle(
                fontSize: 16.0,
                fontWeight: FontWeight.w600,
                color: labelColor ?? Theme.of(context).primaryColor),
      ),
    );
  }

  /*
  * This is Card
  * */
  static Widget card({
    required BuildContext context,
    VoidCallback? onPressed,
    required Widget child,
    Color? color,
    Color? shadowColor,
    bool? isRounded,
  }) {
    return InkWell(
      onTap: onPressed,
      child: Container(
        decoration: BoxDecoration(
            color: color,
            borderRadius: BorderRadius.circular(isRounded! ? 15 : 0),
            boxShadow: [
              BoxShadow(
                blurRadius: 10,
                spreadRadius: 3,
                color: shadowColor ?? Theme.of(context).shadowColor,
              )
            ]),
        child: child,
      ),
    );
  }
}

Additional information

Will be add later

Libraries

allride_package