responsive 0.3.11+11 copy "responsive: ^0.3.11+11" to clipboard
responsive: ^0.3.11+11 copied to clipboard

Provide a easy way to make responsive UI for Flutter Applications in mobile, desktop and web, allow different widget size for each screen size and device orientation.

example/lib/main.dart

import 'package:flutter/foundation.dart'
    show debugDefaultTargetPlatformOverride;
import 'package:flutter/material.dart';

import 'flexibe_row_demo.dart';
import 'responsive_galery.dart';
import 'responsive_gridview.dart';

void main() {
  debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia;
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Responsive Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      routes: <String, WidgetBuilder>{
        '/flexiwidget': (BuildContext context) => FlexibleRowDemo(),
        '/gallery': (BuildContext context) => ResponsiveGallery(),
        '/gridview': (BuildContext context) => ResponsiveGridview(),
      },
      home: Home(),
    );
  }
}

class Home extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Responsive Demo App'),
      ),
      body: Center(
        child: Column(
          mainAxisSize: MainAxisSize.max,
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              onPressed: () {
                Navigator.of(context).pushNamed('/flexiwidget');
              },
              child: Text('Flexi Widget Demo'),
            ),
            ElevatedButton(
              onPressed: () {
                Navigator.of(context).pushNamed('/gallery');
              },
              child: Text('Image Galery Demo'),
            ),
            ElevatedButton(
              onPressed: () {
                Navigator.of(context).pushNamed('/gridview');
              },
              child: Text('GridView Demo'),
            ),
          ],
        ),
      ),
    );
  }
}
65
likes
140
pub points
81%
popularity

Publisher

unverified uploader

Provide a easy way to make responsive UI for Flutter Applications in mobile, desktop and web, allow different widget size for each screen size and device orientation.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on responsive