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

A lightweight Flutter package for clean padding, spacing, border radius, and widget gap extensions.

example/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Spax Demo',
      home: HomePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Spax Demo'),
      ),
      body: SingleChildScrollView(
        child: Column(
          children: [
            30.h,

            Container(
              width: 150,
              height: 150,
              decoration: BoxDecoration(
                color: Colors.blue,
                borderRadius: 16.r,
              ),
            ),

            30.h,

            const Text(
              'Custom Padding',
            ).p(
              t: 10,
              l: 20,
              r: 20,
            ),

            20.h,

            const Text(
              'Top + Horizontal Padding',
            ).t(10).hs(20),

            20.h,

            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Container(
                  width: 60,
                  height: 60,
                  color: Colors.red,
                ),
                20.w,
                Container(
                  width: 60,
                  height: 60,
                  color: Colors.green,
                ),
              ],
            ),

            30.h,
          ],
        ),
      ),
    );
  }
}
0
likes
150
points
6
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A lightweight Flutter package for clean padding, spacing, border radius, and widget gap extensions.

Repository (GitHub)

Topics

#flutter #spacing #padding #ui #extensions

License

unknown (license)

Dependencies

flutter

More

Packages that depend on spax