center_the_widgets 1.0.0+3 copy "center_the_widgets: ^1.0.0+3" to clipboard
center_the_widgets: ^1.0.0+3 copied to clipboard

Sometimes you want to deploy your mobile design-based app for large screens and you didn't write any code to make it responsive! This widget is developed to handle this for you.

example/lib/main.dart

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

void main() {
  runApp(
    const MaterialApp(
      home: CenterTheWidgets(
        child: Example(),
        color: Colors.blueGrey,
      ),
    ),
  );
}

class Example extends StatelessWidget {
  const Example({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Example Appbar'),
      ),
      body: Center(
        child: Container(
          margin: const EdgeInsets.symmetric(horizontal: 32),
          width: 200000,
          height: 300,
          color: Colors.orange,
          alignment: Alignment.center,
          child: const Text('Some widgets...'),
        ),
      ),
      bottomSheet: Container(
        color: Colors.green,
        width: MediaQuery.of(context).size.width,
        padding: const EdgeInsets.symmetric(vertical: 16),
        child: const Text(
          'This is a bottomSheet.',
          textAlign: TextAlign.center,
        ),
      ),
    );
  }
}
4
likes
140
pub points
35%
popularity

Publisher

verified publishergabrimatic.info

Sometimes you want to deploy your mobile design-based app for large screens and you didn't write any code to make it responsive! This widget is developed to handle this for you.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on center_the_widgets