adaptive_ui_layout 1.1.0 copy "adaptive_ui_layout: ^1.1.0" to clipboard
adaptive_ui_layout: ^1.1.0 copied to clipboard

Adaptive UI Layout helps implement a responsive layout by providing helper widgets and extensions

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:adaptive_ui_layout/flutter_responsive_layout.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: '',
      builder: (context, child) => ResponsiveLayout(builder: (context) {
        return child!;
      }),
      home: const MyHomePage(title: 'Flutter Responsive Layout'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: SingleChildScrollView(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Container(
              color: Colors.blue,
              height: 115,
              width: 115,
            ),
            20.hs,
            Container(
              color: Colors.orange,
              height: 115.h,
              width: 115.w,
            ),
            20.hs,
            Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                const Text(
                  "16lp",
                  style: TextStyle(fontSize: 16),
                ),
                20.ws,
                Text(
                  "16sp",
                  style: TextStyle(fontSize: 16.sp),
                ),
              ],
            ),
            Row(
              children: [
                Expanded(
                  child: Container(
                    color: Colors.cyanAccent,
                    height: context.mediaQueryData.size.height / 10,
                  ),
                ),
                Expanded(
                  child: Container(
                    color: Colors.green,
                    height: MediaQuery.of(context).size.height / 10,
                  ),
                ),
              ],
            )
          ],
        ),
      ),
    );
  }
}
copied to clipboard
6
likes
160
points
35
downloads

Publisher

verified publisherintellium.in

Weekly Downloads

2024.09.04 - 2025.03.19

Adaptive UI Layout helps implement a responsive layout by providing helper widgets and extensions

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on adaptive_ui_layout