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

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

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const ExampleScreen(),
    );
  }
}

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),
          ],
        ),
      ),
    );
  }
}
1
likes
150
points
20
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

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on butter_extensions