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

A simple and flexible Flutter widget that helps you build responsive layouts with automatic padding based on screen breakpoints.

example/lib/main.dart

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

void main() => runApp(const MyApp());

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Padded Adaptive Layout Example',
      home: Scaffold(
        appBar: AppBar(title: const Text('Responsive Layout Demo')),
        body: PaddedAdaptiveLayoutBuilder(
          children: const [
            Text('Widget 1'),
            Text('Widget 2'),
            Text('Widget 3'),
          ],
          smallScreen: (context, children) => Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: children,
          ),
          mediumScreen: (context, children) => Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: children,
          ),
          largeScreen: (context, children) => Row(
            mainAxisAlignment: MainAxisAlignment.spaceEvenly,
            children: children,
          ),
        ),
      ),
    );
  }
}
1
likes
160
points
11
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A simple and flexible Flutter widget that helps you build responsive layouts with automatic padding based on screen breakpoints.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on padded_adaptive_layout