media_break_points 0.1.2 copy "media_break_points: ^0.1.2" to clipboard
media_break_points: ^0.1.2 copied to clipboard

outdated

This package allows you to apply values depending on media breakpoint provided.

example/example.dart

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

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(primarySwatch: Colors.blue, fontFamily: "OpenSans"),
      home: Scaffold(
        appBar: AppBar(
          title: Text("Example breakpoints"),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              Container(
                  color: Colors.red,
                  margin: valueFor<EdgeInsets>(
                    context,
                    xs: EdgeInsets.only(left: 25),
                    md: EdgeInsets.only(left: 50),
                    lg: EdgeInsets.only(left: 75),
                  )),
              Container(
                color: Colors.blue,
                padding: valueFor<EdgeInsets>(
                  context,
                  xs: EdgeInsets.only(right: 20),
                  md: EdgeInsets.only(right: 40),
                  lg: EdgeInsets.only(right: 60),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
4
likes
0
pub points
10%
popularity

Publisher

verified publisherglenfordwilliams.com

This package allows you to apply values depending on media breakpoint provided.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on media_break_points