auto_spacing 0.0.1 copy "auto_spacing: ^0.0.1" to clipboard
auto_spacing: ^0.0.1 copied to clipboard

Auto spacing is designed to automatically gives space between widgets.

example/lib/main.dart

import 'package:auto_spacing/auto_spacing.dart';
import 'package:flutter/material.dart';
void main() {
  runApp(const MyApp());
}

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const AutoSpacingExample(),
    );
  }
}

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



  @override
  State<AutoSpacingExample> createState() => _AutoSpacingExampleState();
}

class _AutoSpacingExampleState extends State<AutoSpacingExample> {
  @override
  Widget build(BuildContext context) {

    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text('Auto Spacing Example'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Container(
              color: Colors.red,
              height: 100,
              width: 100,
            ),
            const AutoSpacing(20),
            Container(
              color: Colors.blue,
              height: 100,
              width: 100,
            ),
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Container(
                  color: Colors.red,
                  height: 100,
                  width: 100,
                ),
                const AutoSpacing(),
                Container(
                  color: Colors.blue,
                  height: 100,
                  width: 100,
                ),
              ],
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
0
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

Auto spacing is designed to automatically gives space between widgets.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on auto_spacing