butter_extensions 0.0.2 copy "butter_extensions: ^0.0.2" to clipboard
butter_extensions: ^0.0.2 copied to clipboard

discontinued
outdated

Butter Extensions aims to make your life as a developer easier and help you avoid a lot of boilerplate code.

Butter Extensions #

pub package

butter_extensions aims to make your life as a developer easier and help you avoid a lot of boilerplate code.

Usage #

To use this package, add butter_extensions to your pubspec.yaml.

Example #

import 'package:flutter/material.dart';
import 'package:butter_extensions/butter_extensions.dart';

class ExampleScreen extends StatelessWidget {
  const ExampleScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Row(
          children: [
            Container(
              padding: const EdgeInsets.symmetric(vertical: 15),
              width: double.infinity,
              color: Colors.red,
              child: const Text('1'),
            ).paddingAll(15.0),
            // Instead of:
            // Padding(
            //   padding: const EdgeInsets.all(15),
            //   child: Container(
            //     padding: const EdgeInsets.symmetric(vertical: 15),
            //     width: double.infinity,
            //     color: Colors.red,
            //     child: const Text('1'),
            //   ),
            // ),
            Container(
              padding: const EdgeInsets.symmetric(vertical: 15),
              width: double.infinity,
              color: Colors.blue,
              child: const Text('2'),
            ).paddingAll(15.0),
          ],
        ),
      ),
    );
  }
}

Features #

Extension on Description
paddingAll Widget Add EdgeInsets.all() to any widget
paddingOnly Widget Add EdgeInsets.only() to any widget
paddingFromLTRB Widget Add EdgeInsets.fromLTRB() to any widget
paddingSymmetric Widget Add EdgeInsets.symmetric() to any widget
fahrenheitToCelcius double
celciusToFahrenheit double
groupBy Iterable
sum Iterable
lenghtBetween String
maxLength String
minLength String

Known issues #

  • Auto-Import is currently not working in Visual Studio Code (ctrl+space)
1
likes
0
points
22
downloads

Publisher

verified publisherfrischbutter.dev

Weekly Downloads

Butter Extensions aims to make your life as a developer easier and help you avoid a lot of boilerplate code.

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on butter_extensions