sizable 0.0.4 copy "sizable: ^0.0.4" to clipboard
sizable: ^0.0.4 copied to clipboard

Making code less managable and writing clean code. Reuse commonly used sizing padding widgets.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Sizable demo',
      theme: ThemeData(
        useMaterial3: true,
        primarySwatch: Colors.blue,
      ),
      home: ExamplePage(),
    );
  }
}

class ExamplePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Sizable Example'),
      ),
      body: 'left'.align(  // Alignment.left
        Padding(
          padding: spacing(), // EdgeInsets.all(10)
          child: Column(
            children: [
              'left'.align(
                Text('Left Aligned'),
              ),
              20.sizeh, // SizedBox(height: 20)
              'center'.align(
                Text('Center Aligned'),
              ),
              20.sizeh,
              'right'.align(
                Text('Right Aligned'),
              ),
              20.sizeh,
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
150
pub points
0%
popularity

Publisher

unverified uploader

Making code less managable and writing clean code. Reuse commonly used sizing padding widgets.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on sizable