adaptive_responsive_ui 1.0.2 copy "adaptive_responsive_ui: ^1.0.2" to clipboard
adaptive_responsive_ui: ^1.0.2 copied to clipboard

A comprehensive Flutter package for responsive UI design with easy-to-use extensions for width, height, padding, margin, fonts, and device detection.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_responsive_helper/responsive_extensions.dart';

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

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

  @override
  Widget build(BuildContext context) {
    // Initialize ONCE here
    ResponsiveConfig.init(context, baseWidth: 390, baseHeight: 844);

    return const MaterialApp(
      home: HomeScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    // Now use everywhere without context!
    return Scaffold(
      appBar: AppBar(title: Text('No Context Demo')),
      body: Column(
        children: [
          Container(
            width: 300.w(), // ✅
            height: 150.h(), // ✅
            padding: 20.p, // ✅
            margin: 16.m, // ✅
            decoration: BoxDecoration(
              color: Colors.blue,
              borderRadius: BorderRadius.circular(12.r()), // ✅
            ),
            child: Text(
              'No Context Needed!',
              style: TextStyle(
                fontSize: 18.sp(), // ✅
                color: Colors.white,
              ),
            ),
          ),
          20.gapH, // ✅
          Container(
            padding: 10.pSym(h: 24, v: 12), // ✅
            child:
                Text('Symmetric Padding', style: TextStyle(fontSize: 16.sp())),
          ),
        ],
      ),
    );
  }
}
0
likes
0
points
80
downloads

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter package for responsive UI design with easy-to-use extensions for width, height, padding, margin, fonts, and device detection.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on adaptive_responsive_ui