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

Simplify your Flutter code, reduce boilerplate with ease.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:pretty_widgets/pretty_widgets.dart';

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Pretty Widgets'),
        ),
        body: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            // Long hierarchy and lots of boilerplate
            const Padding(
              padding: EdgeInsets.all(16.0),
              child: Center(
                child: Text(
                  'Hello World',
                  style: TextStyle(
                    fontSize: 24,
                    fontWeight: FontWeight.bold,
                  ),
                ),
              ),
            ),

            // Much cleaner way to write the same thing
            const Text('Hello World').bold().size(24).center().paddingAll(16),
          ],
        ),
      ),
    );
  }
}
0
likes
140
points
193
downloads

Publisher

verified publishermufaddal.me

Weekly Downloads

Simplify your Flutter code, reduce boilerplate with ease.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on pretty_widgets