Git Product home page Git Product logo

codelessly / responsiveframework Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 149.0 189.76 MB

Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple. Demo: https://gallery.codelessly.com/flutterwebsites/minimal/

Home Page: https://codelessly.com

License: MIT License

Dart 100.00%
android bootstrap bootstrap4 demo flutter flutter-plugin flutter-ui framework ios responsive responsive-layout webapp website website-builder website-development website-template

responsiveframework's Introduction

Screenshots

Responsive Framework

Flutter Responsive Pub release GitHub Release Date GitHub issues GitHub top language GitHub code size in bytes Awesome Flutter Libraries.io for GitHub License

Screenshots

Responsiveness made simple

The Responsive Framework includes widgets that help developers build responsive apps for mobile, desktop, and website layouts.

Demo

A demo website built with the Responsive Framework. View Code

The flutter.dev website recreated in Flutter. View Code

The pub.dev website recreated in Flutter. View Code

Quick Start

Pub release

Import this library into your project:

responsive_framework: ^latest_version

Add ResponsiveBreakpoints.builder to your MaterialApp or CupertinoApp. Define your own breakpoints and labels.

import 'package:responsive_framework/responsive_framework.dart';

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      builder: (context, child) => ResponsiveBreakpoints.builder(
        child: child!,
        breakpoints: [
          const Breakpoint(start: 0, end: 450, name: MOBILE),
          const Breakpoint(start: 451, end: 800, name: TABLET),
          const Breakpoint(start: 801, end: 1920, name: DESKTOP),
          const Breakpoint(start: 1921, end: double.infinity, name: '4K'),
        ],
      ),
      initialRoute: "/",
    );
  }
}

Use the labels you defined for layouts and values.

// Example: if the screen is bigger than the Mobile breakpoint, build full width AppBar icons and labels.
if (ResponsiveBreakpoints.of(context).largerThan(MOBILE))
    FullWidthAppBarItems()

// Booleans
ResponsiveBreakpoints.of(context).isDesktop;
ResponsiveBreakpoints.of(context).isTablet;
ResponsiveBreakpoints.of(context).isMobile;
ResponsiveBreakpoints.of(context).isPhone;

// Conditionals
ResponsiveBreakpoints.of(context).equals(DESKTOP)
ResponsiveBreakpoints.of(context).largerThan(MOBILE)
ResponsiveBreakpoints.of(context).smallerThan(TABLET)
ResponsiveBreakpoints.of(context).between(MOBILE, TABLET)
...

Customization

You can define your own breakpoint labels and use them in your conditionals.

For example, if you're building a Material 3 Navigation Rail and want to expand the menu to full width once there is enough room, you can add a custom EXPAND_SIDE_PANEL breakpoint.

breakpoints: [
  ...
  const Breakpoint(start: 801, end: 1920, name: DESKTOP),
  const Breakpoint(start: 900, end: 900, name: 'EXPAND_SIDE_PANEL') <- Custom label.
  const Breakpoint(start: 1921, end: double.infinity, name: '4K'),
  ...
]

Then, in your code, show the Rail based on the breakpoint condition.

expand: ResponsiveBreakpoints.of(context).largerThan('EXPAND_SIDE_PANEL')

Responsive Framework Widgets

The ResponsiveFramework includes a few custom widgets that supplement Flutter's responsive capabilities. Their usages are showcased in the demo projects.

Legacy ReadMe (v0.2.0 and below)

ResponsiveWrapper Migration

v1.0.0 Migration Guide

The remainder of the legacy ReadMe is preserved below as the concepts are still useful and used by the new widgets. ResponsiveWrapper has been deprecated and removed.

The Problem

Supporting multiple display sizes often means recreating the same layout multiple times. Under the traditional Bootstrap approach, building responsive UI is time consuming, frustrating and repetitive. Furthermore, getting everything pixel perfect is near impossible and simple edits take hours.

Screenshots

The Solution

Use Responsive Framework to automatically scale your UI.

ResponsiveBreakpoint.autoScale(600);

AutoScale

Screenshots

AutoScale shrinks and expands your layout proportionally, preserving the exact look of your UI. This eliminates the need to manually adapt layouts to mobile, tablet, and desktop.

ResponsiveBreakpoint.autoScale(600);

Flutter's default behavior is resize which Responsive Framework respects. AutoScale is off by default and can be enabled at breakpoints by setting autoScale to true.

Breakpoints

Screenshots

Breakpoints control responsive behavior at different screen sizes.

ResponsiveWrapper(
    child,
    breakpoints: [
        ResponsiveBreakpoint.resize(600, name: MOBILE),
        ResponsiveBreakpoint.autoScale(800, name: TABLET),
        ResponsiveBreakpoint.autoScale(1200, name: DESKTOP),
    ],
)

Breakpoints give you fine-grained control over how your UI displays.

Introductory Concepts

These concepts helps you start using the Responsive Framework and build an responsive app quickly.

Scale vs Resize

Flutter's default behavior is to resize your layout when the screen dimensions change. Resizing a layout stretches it in the direction of an unconstrained width or height. Any constrained dimension stays fixed which is why mobile app UIs look tiny on desktop. The following example illustrates the difference between resizing and scaling.

Screenshots

An AppBar widget looks correct on a phone. When viewed on a desktop however, the AppBar is too short and the title looks too small. Here is what happens under each behavior:

  1. Resizing (default) - the AppBar's width is double.infinity so it stretches to fill the available width. The Toolbar height is fixed and stays 56dp.
  2. Scaling - the AppBar's width stretches to fill the available width. The height scales proportionally using an aspect ratio automatically calculated from the nearest ResponsiveBreakpoint. As the width increases, the height increases proportionally.

When scaled, the AppBar looks correct on desktop, up to a certain size. Once the screen becomes too wide, the AppBar starts to appear too large. This is where breakpoints come in.

Breakpoint Configuration

To adapt to a wide variety of screen sizes, set breakpoints to control responsive behavior.

ResponsiveWrapper(
    child,
    maxWidth: 1200,
    minWidth: 480,
    defaultScale: true,
    breakpoints: [
        ResponsiveBreakpoint.resize(480, name: MOBILE),
        ResponsiveBreakpoint.autoScale(800, name: TABLET),
        ResponsiveBreakpoint.resize(1000, name: DESKTOP),
        ResponsiveBreakpoint.autoScale(2460, name: '4K'),
    ],
)

An arbitrary number of breakpoints can be set. Resizing/scaling behavior can be mixed and matched.

  • below 480: resize on small screens to avoid cramp and overflow errors.
  • 480-800: resize on phones for native widget sizes.
  • 800-1000: scale on tablets to avoid elements appearing too small.
  • 1000+: resize on desktops to use available space.
  • 2460+: scale on extra large 4K displays so text is still legible and widgets are not spaced too far apart.

Additional Resources

Resocoder Tutorial

The wonderful people at Resocoder created a great tutorial video and article walking through the usage of the Responsive Framework at the link below.

View Responsive Framework Tutorial

Project Wiki

No project wiki exists yet unfortunately. That means this is an opportunity for you to create and maintain the wiki for one of the most popular Flutter packages. This package needs your help with documentation!

Please reach out via the contact links below if you are interested.

About

Responsive Framework was created out of a desire for a better way to manage responsiveness. The ability to automatically adapt UI to different sizes opens up a world of possibilities. Here at Codelessly, we're building a Flutter app UI and website builder, development tools, and UI templates to increase productivity. If that sounds interesting, you'll want to subscribe to updates below ๐Ÿ˜Ž

Responsive Framework is licensed under Zero-Clause BSD and released as Emailware. If you like this project or it helped you, please subscribe to updates. Although it is not required, you might miss the goodies we share!

Badges ๐Ÿ†

Now you can proudly display the time and headache saved by using Responsive Framework with a supporter's badge.

Pub release

[![Flutter Responsive](https://img.shields.io/badge/flutter-responsive-brightgreen.svg?style=flat-square)](https://github.com/Codelessly/ResponsiveFramework)

Built Responsive

<a href="https://github.com/Codelessly/ResponsiveFramework">
  <img alt="Built Responsive"
       src="https://raw.githubusercontent.com/Codelessly/ResponsiveFramework/master/packages/Built%20Responsive%20Badge.png"/>
</a>

Built with Responsive Framework

<a href="https://github.com/Codelessly/ResponsiveFramework">
  <img alt="Built with Responsive Framework"
       src="https://raw.githubusercontent.com/Codelessly/ResponsiveFramework/master/packages/Built%20with%20Responsive%20Badge.png"/>
</a>

Contributors โค๏ธ

Design:

Development:

Sponsor: Codelessly - Flutter App UI and Website Builder

Codelessly Email Codelessly Website Codelessly Twitter Codelessly GitHub

Flutter is a game-changing technology that will revolutionize not just development, but software itself. A big thank you to the Flutter team for building such an amazing platform ๐Ÿ’™

Flutter

License

BSD Zero Clause License

Copyright ยฉ 2023 Codelessly

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

responsiveframework's People

Contributors

adilayman avatar elmuso avatar guo-zhang avatar krin-san avatar kulture-rob-snider avatar rayliverified avatar spencerlindemuth avatar vinzent03 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

responsiveframework's Issues

ResponsiveGrid Padding Exceeds Width Assertion Error

TODO: Investigate whether a hard assertion and error is necessary for when padding exceeds grid view width.
Perhaps a safer way is to log a warning and not throw an error.
responsive_grid.dart Line 81

      // The maximum width available for items.
      double crossAxisExtent = constraints.maxWidth - paddingHolder.horizontal;
      assert(crossAxisExtent > 0,
          '$paddingHolder exceeds layout width (${constraints.maxWidth})');

Release Tracker Roadmap

Lots of big things planned for Responsive Framework.
Release Tracker
v0.1.0 - refactor logic to maintainable mutators and write tests. Finalize API.
v0.2.0 - create max autoscale mutator. Create API documentation. Create advanced topics Wiki.
v0.3.0 - solve overlay and hero transition scaling.
v1.0.0 - clean up device previewer for production release. Auto preview app on different screen sizes.

can't navigate!

i am getting this error when i navigate from my WelcomePage widget to another page

[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Navigator operation requested with a context that does not include a Navigator.
E/flutter (28256): The context used to push or pop routes from the Navigator must be that of a widget that is a descendant of a Navigator widget.

here is my main file

void main() {
  runApp(DevicePreview(builder: (context) => MyApp()));
}

class MyApp extends StatelessWidget {
  final GoogleSignIn _googleSignIn = GoogleSignIn();

  @override
  Widget build(BuildContext context) {
    return MultiProvider(
      providers: [
        ChangeNotifierProvider<UserModel>(
          create: (_) => UserModel(),
        ),
        StreamProvider<FirebaseUser>.value(
            value: FirebaseAuth.instance.onAuthStateChanged),
      ],
      child: MaterialApp(
        builder: (context, widget) => ResponsiveWrapper.builder(
          WelcomePage(),
          maxWidth: 1200,
          minWidth: 450,
          defaultScale: true,
          breakpoints: [
            ResponsiveBreakpoint(breakpoint: 450, name: MOBILE),
            ResponsiveBreakpoint(
                breakpoint: 800, name: TABLET, autoScale: true),
            ResponsiveBreakpoint(
                breakpoint: 1000, name: TABLET, autoScale: true),
            ResponsiveBreakpoint(breakpoint: 1200, name: DESKTOP),
            ResponsiveBreakpoint(breakpoint: 2460, name: "4K", autoScale: true),
          ],
          background: Container(
            color: Color(0xFFF5F5F5),
          ),
        ),
        debugShowCheckedModeBanner: false,
      ),
    );
  }
}

my WelcomePage file

class WelcomePage extends StatefulWidget {
  @override
  _WelcomePageState createState() => _WelcomePageState();
}

class _WelcomePageState extends State<WelcomePage> {
  final _googleAuth = GoogleSignIn();

  @override
  void initState() {
    super.initState();
    googleSignInSilent();
  }

  void googleSignInSilent() {
    _googleAuth.signInSilently(suppressErrors: false).then((account) {
      if (account != null) {
        setState(() {
          // the error happens from here
          Navigator.pushReplacement(
            context,
            MaterialPageRoute(builder: (context) => FirstPage()),
          );
        });
      }
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SingleChildScrollView(
        child: Container(
          padding: EdgeInsets.symmetric(horizontal: 20),
          height: MediaQuery.of(context).size.height,
           Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Text(
                'In Bed Ideas',
                style: TextStyle(fontSize: 30, fontWeight: FontWeight.bold),
              ),
              SizedBox(
                height: 80,
              ),
              _submitButton(),
              SizedBox(
                height: 20,
              ),
              _signUpButton(),
              SizedBox(
                height: 20,
              ),
            ],
          ),
        ),
      ),
    );
  }
}

"Bad state: No element" when the app is launch when the screen is off

Stacktrace

When the exception was thrown, this was the stack: 
#0      ListIterable.firstWhere (dart:_internal/iterable.dart:107:5)
#1      _ResponsiveWrapperState.getActiveBreakpointSegment (package:responsive_framework/responsive_wrapper.dart:537:10)
#2      _ResponsiveWrapperState.getScreenWidth (package:responsive_framework/responsive_wrapper.dart:233:31)
#3      _ResponsiveWrapperState.setDimensions (package:responsive_framework/responsive_wrapper.dart:499:19)
#4      _ResponsiveWrapperState.initState.<anonymous closure> (package:responsive_framework/responsive_wrapper.dart:581:7)

Reproduce steps

  • Turn the screen off
  • Launch the app from the command line
  • crash

In real life, this crash may also happen when launching the app asynchronously, i.e clicking on notification to launch app, but before the app is launched, turn off the screen.

Error when using this with flutter_staggered_grid_view

Hi,

I hit the following error when using this with flutter_staggered_grid_view which had been working fine before.

Do you this could be some bug in this framework, or the other package need to adjust to use this framework?

`Restarted application in 1,799ms.
I/flutter (32102): Start App.prerequisite()
I/flutter (32102): AppPrefs.init() ...
I/flutter (32102): AppConfig().init() ...
I/flutter (32102): AppApi.init()...
I/flutter (32102): AppLocalizations.init() ...
I/flutter (32102): AppSecurity.Init() ...
I/flutter (32102): App extensions...
I/flutter (32102): End App.prerequisite()

๏ฟฝ[38;5;248mโ•โ•โ•โ•โ•โ•โ•โ• Exception caught by rendering library โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•๏ฟฝ[39;49m
๏ฟฝ[38;5;244mThe following assertion was thrown during performLayout():๏ฟฝ[39;49m
'package:flutter_staggered_grid_view/src/rendering/sliver_staggered_grid.dart': Failed assertion: line 28 pos 16: 'cellExtent != null && cellExtent >= 0': is not true.

๏ฟฝ[38;5;248mEither the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=BUG.md
๏ฟฝ[39;49m

๏ฟฝ[38;5;244mThe relevant error-causing widget was๏ฟฝ[39;49m
๏ฟฝ[38;5;248mDashboard๏ฟฝ[39;49m
๏ฟฝ[38;5;244mWhen the exception was thrown, this was the stack๏ฟฝ[39;49m
๏ฟฝ[38;5;248m#2 new StaggeredGridConfiguration๏ฟฝ[39;49m
๏ฟฝ[38;5;248m#3 SliverStaggeredGridDelegateWithFixedCrossAxisCount.getConfiguration๏ฟฝ[39;49m
๏ฟฝ[38;5;248m#4 RenderSliverStaggeredGrid.performLayout๏ฟฝ[39;49m
๏ฟฝ[38;5;244m#5 RenderObject.layout๏ฟฝ[39;49m
๏ฟฝ[38;5;244m#6 RenderSliverEdgeInsetsPadding.performLayout๏ฟฝ[39;49m
๏ฟฝ[38;5;244m...๏ฟฝ[39;49m
๏ฟฝ[38;5;244mThe following RenderObject was being processed when the exception was fired: RenderSliverStaggeredGrid#e6f6e relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mRenderObject: RenderSliverStaggeredGrid#e6f6e relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: paintOffset=Offset(8.0, 8.0) (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: 0.0, remainingPaintExtent: 0.0, crossAxisExtent: 0.0, crossAxisDirection: AxisDirection.right, viewportMainAxisExtent: 0.0, remainingCacheExtent: 242.0 cacheOrigin: 0.0 )๏ฟฝ[39;49m
๏ฟฝ[38;5;244mgeometry: SliverGeometry(scrollExtent: 396.0, paintExtent: 396.0, maxPaintExtent: 396.0, cacheExtent: 396.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mscrollExtent: 396.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mpaintExtent: 396.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mmaxPaintExtent: 396.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcacheExtent: 396.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcurrently live children: 0,1,2,3,4,5,6๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild with index 0: RenderIndexedSemantics#1feae NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: crossAxisOffset=0.0; index=0; layoutOffset=0.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=259.6, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msemantic boundary๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(259.6, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mindex: 0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderRepaintBoundary#94153 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=259.6, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: OffsetLayer#2b710๏ฟฝ[39;49m
๏ฟฝ[38;5;244moffset: Offset(8.0, 8.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(259.6, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mmetrics: 0.0% useful (1 bad vs 0 good)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mdiagnosis: insufficient data to draw conclusion (less than five repaints)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderPhysicalShape#5f5dc NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=259.6, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: PhysicalModelLayer#efb07๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(259.6, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mshadowColor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mclipper: ShapeBorderClipper๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderCustomPaint#51292 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=259.6, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(259.6, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild with index 1: RenderIndexedSemantics#a5792 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: crossAxisOffset=271.6190476190476; index=1; layoutOffset=0.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msemantic boundary๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mindex: 1๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderRepaintBoundary#32d8b NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: OffsetLayer#ce427๏ฟฝ[39;49m
๏ฟฝ[38;5;244moffset: Offset(279.6, 8.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mmetrics: 0.0% useful (1 bad vs 0 good)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mdiagnosis: insufficient data to draw conclusion (less than five repaints)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderPhysicalShape#3ccc5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: PhysicalModelLayer#09809๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mshadowColor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mclipper: ShapeBorderClipper๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderCustomPaint#40635 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild with index 2: RenderIndexedSemantics#1c491 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: crossAxisOffset=0.0; index=2; layoutOffset=132.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msemantic boundary๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mindex: 2๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderRepaintBoundary#423ae NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: OffsetLayer#f16a0๏ฟฝ[39;49m
๏ฟฝ[38;5;244moffset: Offset(8.0, 140.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mmetrics: 0.0% useful (1 bad vs 0 good)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mdiagnosis: insufficient data to draw conclusion (less than five repaints)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderPhysicalShape#45911 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: PhysicalModelLayer#9297f๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mshadowColor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mclipper: ShapeBorderClipper๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderCustomPaint#cedea NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild with index 3: RenderIndexedSemantics#9183b NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: crossAxisOffset=135.8095238095238; index=3; layoutOffset=132.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msemantic boundary๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mindex: 3๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderRepaintBoundary#4601f NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: OffsetLayer#dc15d๏ฟฝ[39;49m
๏ฟฝ[38;5;244moffset: Offset(143.8, 140.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mmetrics: 0.0% useful (1 bad vs 0 good)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mdiagnosis: insufficient data to draw conclusion (less than five repaints)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderPhysicalShape#927d4 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: PhysicalModelLayer#cc7c0๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mshadowColor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mclipper: ShapeBorderClipper๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderCustomPaint#b812d NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild with index 4: RenderIndexedSemantics#6b451 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: crossAxisOffset=271.6190476190476; index=4; layoutOffset=132.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msemantic boundary๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mindex: 4๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderRepaintBoundary#530c8 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: OffsetLayer#25faa๏ฟฝ[39;49m
๏ฟฝ[38;5;244moffset: Offset(279.6, 140.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mmetrics: 0.0% useful (1 bad vs 0 good)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mdiagnosis: insufficient data to draw conclusion (less than five repaints)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderPhysicalShape#09280 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: PhysicalModelLayer#6f653๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mshadowColor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mclipper: ShapeBorderClipper๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderCustomPaint#5c0dd NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild with index 5: RenderIndexedSemantics#a426e NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: crossAxisOffset=0.0; index=5; layoutOffset=264.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msemantic boundary๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mindex: 5๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderRepaintBoundary#b4be8 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: OffsetLayer#79b49๏ฟฝ[39;49m
๏ฟฝ[38;5;244moffset: Offset(8.0, 272.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mmetrics: 0.0% useful (1 bad vs 0 good)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mdiagnosis: insufficient data to draw conclusion (less than five repaints)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderPhysicalShape#97367 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: PhysicalModelLayer#550df๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mshadowColor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mclipper: ShapeBorderClipper๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderCustomPaint#d6907 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild with index 6: RenderIndexedSemantics#fc32b NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: crossAxisOffset=135.8095238095238; index=6; layoutOffset=264.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msemantic boundary๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mindex: 6๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderRepaintBoundary#56d10 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: OffsetLayer#dadac๏ฟฝ[39;49m
๏ฟฝ[38;5;244moffset: Offset(143.8, 272.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mmetrics: 0.0% useful (1 bad vs 0 good)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mdiagnosis: insufficient data to draw conclusion (less than five repaints)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderPhysicalShape#6843b NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mlayer: PhysicalModelLayer#8ae6b๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244melevation: 14.0๏ฟฝ[39;49m
๏ฟฝ[38;5;244mcolor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mshadowColor: Color(0xffffffff)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mclipper: ShapeBorderClipper๏ฟฝ[39;49m
๏ฟฝ[38;5;244mchild: RenderCustomPaint#48e67 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE๏ฟฝ[39;49m
๏ฟฝ[38;5;244mneeds compositing๏ฟฝ[39;49m
๏ฟฝ[38;5;244mparentData: (can use size)๏ฟฝ[39;49m
๏ฟฝ[38;5;244mconstraints: BoxConstraints(w=123.8, h=120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;244msize: Size(123.8, 120.0)๏ฟฝ[39;49m
๏ฟฝ[38;5;248mโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•๏ฟฝ[39;49m
Reloaded 27 of 896 libraries in 1,078ms.
`

Modal Bottom sheet doesn't resize correctly

If I use a modal bottom sheet like below,

await showModalBottomSheet(
      context: context,
      shape: RoundedRectangleBorder(
        borderRadius: BorderRadius.vertical(top: Radius.circular(25.0))
      ),
      backgroundColor: Colors.transparent,
      builder: (BuildContext context) {
        return ResponsiveWrapper.builder(
             Container(),
             breakpoints: [...]
       );
);

The content becomes centered instead of aligning top like it does normally. Also I use bottom sheets with inputs which I float above the on screen keyboard using isScrollControlled = true to enable it to take up more than 50% of the screen, but with the ResponsiveWrapper it covers the entire screen and centers the child. I think this is because ResponsiveWrapper.builder technically returns a Stack with alignment:center but is there a way to keep the native flutter experience here of top aligning and shrinkwrapping height in modalBottomSheet?

Here are some photo examples:
Without responsive builder the bottom sheet wraps content
noKeyboard

Without responsive and with the keyboard open it hovers just over the keyboard (because isScrollControlled = true) and wraps content
withKeyboard

With responsive builder it expands to cover the entire screen
withoutKeyboardResponsive
withKeyboardResponsive

draggable feedback location

hi, thanks for great package
I am using ReorderableWrap of 'reorderables' package.
I found feedback's location is wrong when using responsive_framework package.
More generally, there are same problem when using Draggable widget.
following is minimal reproducible application.

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

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

class MyApp extends StatelessWidget {
// This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      builder: (context, widget) {
        return ResponsiveWrapper.builder(
          BouncingScrollWrapper.builder(context, widget),
          maxWidth: 1200,
          minWidth: 350,
          debugLog: false,
          defaultScale: true,
          breakpoints: [
            ResponsiveBreakpoint.resize(350, name: MOBILE, scaleFactor: 0.8),
            ResponsiveBreakpoint.autoScale(800, name: TABLET, scaleFactor: 1.4),
            ResponsiveBreakpoint.autoScale(1000, name: TABLET, scaleFactor: 1.4),
            const ResponsiveBreakpoint.resize(1200, name: DESKTOP),
            const ResponsiveBreakpoint.autoScale(2460, name: "4K"),
          ],
          mediaQueryData: MediaQuery.of(context).copyWith(textScaleFactor: 1),
          background: Container(),
        );
      },
      home: DraggableExample(),
    );
  }
}

class DraggableExample extends StatefulWidget {
  @override
  DraggableExampleState createState() => DraggableExampleState();
}

class DraggableExampleState extends State<DraggableExample> with SingleTickerProviderStateMixin {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Spacer(),
          Row(
            children: [
              Spacer(),
              Draggable(
                feedback: Container(
                  width: 60,
                  height: 60,
                  color: Colors.red,
                ),
                child: Container(
                  width: 60,
                  height: 60,
                  color: Colors.red,
                ),
              ),
            ],
          ),
          SizedBox(height: MediaQuery.of(context).padding.bottom,),
        ],
      )
    );
  }
}

If item is on top-left, there are no or small difference, on right-bottom there are big difference.
I intentionally put scale factor apart from 1.0

Can you help me?

Alignment top center pulls dialogs up

I'm using a very narrow testing scope so this may have some severe unintended consequences, but in ResponsiveWrapper, is there a reason the Stack that wraps the resized widget aligns top center and not center? If you use the showDialog method with a SimpleDialog child, it floats to the top when used with a ResponsiveWrapper instead of the native center float. Changing the stack alignment fixes the issue and I don't see any other consequences but again I have a pretty narrow scope.

Here's the code in question in responsive_wrapper.dart starting on line 457

  @override
  Widget build(BuildContext context) {
    return (screenWidth ==
            0) // Initialization check. Window measurements not available until postFrameCallback.
        ? (widget.backgroundColor ??
            Container(
                color: Color(
                    0xFFFFFFFF))) // First frame empty background color or default white.
        : InheritedResponsiveWrapper(
            data: ResponsiveWrapperData.fromResponsiveWrapper(this),
            child: Stack(
             ***alignment: Alignment.topCenter,***
              children: [
                widget.background ?? SizedBox.shrink(),
                MediaQuery(
                  data: calculateMediaQueryData(),
                  child: SizedBox(
                    width: screenWidth,
                    child: FittedBox(
                      fit: BoxFit.fitWidth,
                      alignment: Alignment.topCenter,
                      child: Container(
                        width: scaledWidth,
                        height: (widget.shrinkWrap == true &&
                                widget.mediaQueryData == null)
                            ? null
                            : scaledHeight,
                        // Shrink wrap height if no MediaQueryData is passed.
                        alignment: Alignment.center,
                        child: widget.child,
                      ),
                    ),
                  ),
                ),
              ],
            ),
          );
  }

Changing to Alignment.center works like expected. Let me know if you have any feedback on this!

convex_bottom_bar 2.6.0 display issue

Leveraging the ResponsiveFramework for an app I'm building. I'm having an issue where the botton nav bar (convex_bottom_bar) gets cut off on both sides on the screen. If I remove the convex_bottom_bar and replace it with a blue container, it goes the full width of the screen. Didn't know if others were having a similar issue? Thanks!

capture2

Capture1

Issues with Cupertino Navigation bar

Hello, i'm using the default configurantions for this lib, but when i use CupertinoPageRoute and both screens have a CupertinoNavigationBar this happens:

Bug

Bottom overflowed issue

I have tried the framework and works fine in portrait mode but when I make it landscape mode problem occurs, In my 5.9" phone screen when I try to show a dialog it shows bottom overflowed by.... pixels.
what can be probable solution to it?
Texts also seems appears smaller than expected.
Im using this sizing.

builder: (context,widget) => ResponsiveWrapper.builder(
BouncingScrollWrapper.builder(context, widget),
maxWidth: 1200,
minWidth: 480,
defaultScale: true,
breakpoints: [
ResponsiveBreakpoint.resize(480, name: MOBILE),
ResponsiveBreakpoint.autoScale(800, name: TABLET),
ResponsiveBreakpoint.resize(1000, name: DESKTOP),
],
background: Container(color: Color(0xFFF5F5F5)),

  ),

framework prob

Thanks in advance :)

[Question] Knowing the current breakpoint

It seems like all the decision making is made a or near the root of the app. How would I know the currently active breakpoint further down the widget tree to make a decision on how a child widget is laid out?

Maybe this is more of a feature request? I know I can use my own tooling with Provider or something but seems like a tool that would be very useful to have baked in.

The height from two screens looks different

Simulator Screen Shot - iPhone SE (2nd generation) - 2020-09-10 at 14 50 04

Screenshot_1599720607

Does anyone know how to make the horizontal space scale correctly?

This is my main setup

ResponsiveWrapper.builder(
           BouncingScrollWrapper.builder(context, widget),
           maxWidth: 1200,
           minWidth: 480,
           defaultScale: true,
           breakpoints: [
             ResponsiveBreakpoint.autoScale(480, name: MOBILE),
             ResponsiveBreakpoint.autoScale(800, name: TABLET),
             ResponsiveBreakpoint.autoScale(1000, name: TABLET),
             ResponsiveBreakpoint.autoScale(1200, name: DESKTOP),
             ResponsiveBreakpoint.autoScale(2460, name: "4K"),
           ],
           background: Container(color: Color(0xFFF5F5F5)))

Here is my code

Column(
        children: [
          Stack(
              alignment: Alignment.bottomRight,
              children: [

                 Image(
                   image: AssetImage('assets/images/key_chart/keychart_${widget.keysImageName[widget.selected][0]}.png'),
                   fit: BoxFit.fitHeight,
                   height: 600,
                 ),


                Padding(
                  padding: const EdgeInsets.fromLTRB(0.0,0.0,32.0,16.0),
                  child: GestureDetector(
                    child: Image(
                        image: AssetImage('assets/images/key_chart/keychart_btn_play.png'),
                        fit: BoxFit.fitHeight,
                        height: 70,
                      ),
                    onTap: (){
                    },
                  ),
                ),
              ],
          ),
        ],
      );

Hero-wrapped widget looks giant during transition

`MaterialApp(

      builder: (context, widget) => ResponsiveWrapper.builder(
        widget,
        maxWidth: 1200,
        minWidth: 450,
        defaultScale: true,
        breakpoints: [
          ResponsiveBreakpoint(breakpoint: 450, name: MOBILE),
          ResponsiveBreakpoint(breakpoint: 800, name: TABLET),
          ResponsiveBreakpoint(breakpoint: 1000, name: TABLET),
          ResponsiveBreakpoint(breakpoint: 1200, name: DESKTOP),
          ResponsiveBreakpoint(breakpoint: 2460, name: "4K"),
        ],
        background: Container(color: Color(0xFFF5F5F5))),...

`

How to set the child if it comes from onGenerateRoute ?

I do not have access to the child parameter from the builder because it comes from the onGenerateRoute: onGenerateRoute

I found this BouncingScrollWrapper.builder(context, widget)!
It works for mobiles, tablets and laptops!

            builder: (context, widget) => ResponsiveWrapper.builder(
                BouncingScrollWrapper.builder(context, widget),
                maxWidth: 1200,
                minWidth: 480,
                defaultScale: true,
                breakpoints: [
                  ResponsiveBreakpoint.resize(480, name: MOBILE),
                  ResponsiveBreakpoint.autoScale(800, name: TABLET),
                  ResponsiveBreakpoint.resize(1000, name: DESKTOP, scaleFactor: 1.2),
                ],
              background: Container(color: Color(0xFFF5F5F5)),
            ),

I thought that UI looked too small on tablet simulator. Using scaleFactor allows to scale the UI for high resolution devices. I set it to 1.2 and everything seems to be well resized. What would be a good value for iPad simulator (is 1.0 good)?

The package works very well! Thanks!

Shadow behind pages

Hey great package!

I just added it following the Readme, and it shows this shadow behind my pages. Note that if I remove the code of this package the shadow disppear so I suspect that this is an issue within the package. I've tried to find the cause but had no luck.

Screen Shot 2020-11-23 at 18 47 20

Blurring on AppBar

Peek 2020-09-13 14-35

I hope you can notice, but the text on the appBar gets a bit blurred out at times. Is this a common effect of scaling.

Discussion Thread

Discuss the Responsive Framework here โฌ‡๏ธ

Feel free to leave your thought on the features, API, and functionality. Or use this to start a discussion and share what's on your mind.

DropdownButton is not working

If I use ResponsiveWrapper.builder it brakes my DropdownButton.

``runApp(MaterialApp(
debugShowCheckedModeBanner: false,
builder: (context, widget) =>
ResponsiveWrapper.builder(TabsPage(),
maxWidth: 1200,
minWidth: 450,
defaultScale: true,
breakpoints: [
ResponsiveBreakpoint(breakpoint: 450, name: MOBILE),
ResponsiveBreakpoint(
breakpoint: 800, name: TABLET, autoScale: true,),
ResponsiveBreakpoint(
breakpoint: 1000, name: TABLET, autoScale: true),
ResponsiveBreakpoint(breakpoint: 1200, name: DESKTOP),
ResponsiveBreakpoint(
breakpoint: 2460, name: "4K", autoScale: true),
],
background: Container(color: Color(0xFFF5F5F5))),

MediaQuery.of() The method 'dependOnInheritedWidgetOfExactType' was called on null.

I'm unfortunately not able to reproduce this error, and the stack trace from our logs is short and unhelpful, but I'm seeing this error pop up in our app at an alarmingly high rate. I call the ResponsiveWrapper.builder inside of the onGenerateRoute callback in MaterialApp so I can't figure out when the BuildContext would be null. Have you seen this issue before or know a direction to look? Like I said it's running flawlessly in all of my testing and I cannot reproduce.

Non-fatal Exception: FlutterError
NoSuchMethodError: The method 'dependOnInheritedWidgetOfExactType' was called on null. Receiver: null Tried calling: dependOnInheritedWidgetOfExactType(). Error thrown Instance of 'ErrorDescription'.
Non-fatal Exception: FlutterError

0  ???                            0x0 of + 814 (media_query.dart:814)
1  ???                            0x0 getDevicePixelRatio + 151 (responsive_wrapper.dart:151)
2  ???                            0x0 setDimensions + 395 (responsive_wrapper.dart:395)
3  ???                            0x0 <fn> + 454 (responsive_wrapper.dart:454)
4  ???                            0x0 _invokeFrameCallback + 1117 (binding.dart:1117)
5  ???                            0x0 handleDrawFrame + 1063 (binding.dart:1063)
6  ???                            0x0 _handleDrawFrame + 971 (binding.dart:971)

Does not work in iOS tablet

Testing this out and I'm seeing it's not working on iOS tablet for a Flutter mobile app. Attached screenshot
Screen Shot 2020-09-04 at 6 20 32 PM

Screen Shot 2020-09-04 at 6 20 48 PM

Screen Shot 2020-09-04 at 6 20 53 PM

Maybe I'm missing something but here is my code from the main dart file

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ScopedModel<LocalDataModel>(
        model: LocalDataModel(),
        child: MaterialApp(
          onGenerateRoute: router.generateRoute,
          home: RootPage(
            auth: Auth(),
          ),
          builder: (context, widget) => ResponsiveWrapper.builder(
            BouncingScrollWrapper.builder(context, widget),
            maxWidth: 1200,
            minWidth: 450,
            defaultScale: true,
            breakpoints: [
              ResponsiveBreakpoint.resize(450, name: MOBILE),
              ResponsiveBreakpoint.autoScale(800, name: TABLET),
              ResponsiveBreakpoint.autoScale(1000, name: TABLET),
              ResponsiveBreakpoint.resize(1200, name: DESKTOP),
              ResponsiveBreakpoint.autoScale(2460, name: '4K'),
            ],
          ),
          theme: ThemeData(
            brightness: Brightness.light,
            primaryColor: Color(0XFF47525D),
            accentColor: Color(0xFF00AEEF),
            textTheme: Theme.of(context).textTheme.apply(
                  bodyColor: Color(0XFF47525D),
                  displayColor: Color(0XFF47525D),
                ),
          ),
        ));
  }
}

Text Fields hidden behind the Keyboard

Hi,

Let me start by saying this is an awesome plugin which am now using for all of my future projects! Amazing work there!

Now going back to the issue, I am working on an app which has a lot of text fields. I have notices that then the keypad opens about the amount of screen resizing (by Scaffold) which happens with the plugin is way less than what it does without the plugin. This is causing issue for me as the TextFields which is at the bottom of the screen is being covered by the keypad and there is no way to see what are we typing.

Here is my responsive configuration:

MaterialApp( builder: (context, widget) => ResponsiveWrapper.builder( BouncingScrollWrapper.builder(context, widget), maxWidth: 2200, minWidth: 480, defaultScale: true, breakpoints: [ ResponsiveBreakpoint.resize(480, name: MOBILE), ResponsiveBreakpoint.resize(800, name: TABLET), ResponsiveBreakpoint.autoScale(1000, name: DESKTOP), ], ),

Here are the images for reference:

Screenshot_20200717_123450
Screenshot_20200717_123457

Please have a look and let me know how this can be fixed!

Regards,
Rajdeep Barad

Disable responsive wrapper for a page

I have a web app, I have a page that I don't want it to apply the responsive wrapper frame (the red part in the pic).
Why would I want that ? for decoration purposes in which I need to reach the edge of the screen.
The red background is the background parameter in ResponsiveWrapper.builder
image

Landscape mode and responsive framework

Intro

This framework works flawlessly for small screen devices, but when you turn your device into landscape mode the situation also becomes upside down.

The Problem

Although this is able to hand my approximately 450x850 mobile, but when I turn it in landscape mode then all the ui elements are too big and some are even overflowing cause of the less dpi in small screen but that's not the case in portrait mode.

You can also try this on the recreated flutter website, when you turn your phone with any resolution into landscape mode then everything becomes too big to handle event the bottomNavigationBar also doesnt respect the small screen.

It seems like it doesn't respect nor recognize small screens in landscape mode cause it thinks that the width is higher so that is true in landscape but it should also consider that the height is low in landscape mode cause the resolution becomes 850x450(in my small screen case)

Suggestion / Possible Solution

Give us the option to specify other properties for landscape mode or by default respect landscape mode cause even if the width is high in it but the height is very low in that mode, or it should understand landscape mode by itself by checking the aspect ratio which is my case is approx 2:1 in landscape mode.

Enough Talk, Show me your code

This is the code of my builder inside MaterialApp

builder: (context, widget) => ResponsiveWrapper.builder(
  BouncingScrollWrapper.builder(context, widget),
  minWidth: 450,
  defaultScale: true,
  breakpoints: [
    ResponsiveBreakpoint.resize(500, name: MOBILE),
    ResponsiveBreakpoint.autoScale(800, name: TABLET),
    ResponsiveBreakpoint.autoScale(1000, name: TABLET),
    ResponsiveBreakpoint.resize(1200, name: DESKTOP),
    ResponsiveBreakpoint.autoScale(2460, name: "4K"),
  ],
),

Cannot use GetX context

When I use responsive framework I can't use getx context, whenever I called context with getx the context is always null.

How to produce:

  • Install getx package
  • use function that requires context, for example: Get.to(Homepage())

How to set the minWith correctly?

For example if i was using Iphone SE to build the layout, what is the proper value for minWidth ?

ResponsiveWrapper(
    child,
    maxWidth: 1200,
    minWidth: 480,
    defaultScale: true,
    breakpoints: [
        ResponsiveBreakpoint.resize(480, name: MOBILE),
        ResponsiveBreakpoint.autoScale(800, name: TABLET),
        ResponsiveBreakpoint.resize(1000, name: DESKTOP),
        ResponsiveBreakpoint.autoScale(2460, name: '4K'),
    ],
)

GridView.builder?

What about GridView.builder that has crossAxisCount and childAspectRatio, how to control it using responsive_framework, does this plugin it in any way? Or do I need to check the size of width and height to set manually this values?

Disable autoScale for specific widget

Is there a way to disable autoScale for specific widget? I'm having a problem with FloatingActionButton when navigation, it becomes bigger then goes back to normal,

play

here is the code

      height: 67,
      width: 67,
      child: FittedBox(
        child: FloatingActionButton(
          mini: true,
          elevation: 0.0,
          materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
          backgroundColor: liveBloc.isLive
              ? Color(0xFFF80000)
              : Color.fromRGBO(90, 182, 223, 1),
          onPressed: () => buttonChange(),
          child: Center(
            child: StreamBuilder<PlaybackState>(
              stream: AudioService.playbackStateStream,
              builder: (context, snapshot) {
                if (snapshot.hasData && snapshot.data.playing) {
                  _animationController.reverse();
                } else {
                  _animationController.forward();
                }
                return AnimatedIcon(
                  icon: AnimatedIcons.pause_play,
                  progress: _animateIcon,
                  color: Color(0xFFFFFFFF),
                );
              },
            ),
          ),
        ),
      ),
    );

setting defaultScale: false fixes the issue but I lose scaling for the whole app, how do I solve this?

issues when using with native ads (mobile_google_ads)

NOTE : i dont know if this ResponsiveFramework probleam or mobile_google_ads
when i try to use native ads with ResponsiveFramework working i get (see how the whole ads cropping from left)

image

when i remove ResponsiveFramework it every things work fine

image

i made simple stateful widget to test it

class TEST extends StatefulWidget {
  @override
  _TESTState createState() => _TESTState();
}

class _TESTState extends State<TEST> {
  bool useBuilder = false;
  @override
  Widget build(BuildContext context) {
    var breakpoints = <ResponsiveBreakpoint>[
      ResponsiveBreakpoint.resize(480, name: MOBILE),
      ResponsiveBreakpoint.autoScale(
        800,
        name: TABLET,
      ),
      ResponsiveBreakpoint.autoScale(1000, name: DESKTOP),
      ResponsiveBreakpoint.autoScale(2460, name: '4K'),
    ];

    return MaterialApp(
        key: ValueKey(useBuilder),
        builder: (context, child) {
          if (useBuilder)
            return ResponsiveWrapper.builder(
              child,
              defaultScale: true,
              breakpoints: breakpoints,
            );
          return child!;
        },
        home: Scaffold(
          appBar: AppBar(
            actions: [
              ElevatedButton(
                child: Text("toggle ${useBuilder}"),
                onPressed: () {
                  setState(() {
                    useBuilder = !useBuilder;
                  });
                },
              )
            ],
          ),
          body: SafeArea(child: JustTestAds()),
        ));
  }
}


void main(){
  WidgetsFlutterBinding.ensureInitialized();
  MobileAds.instance.initialize();
  runApp(TEST());
  }
  
  
  
class JustTestAds extends StatefulWidget {
  const JustTestAds({Key? key}) :super(key: key);
  @override
  _JustTestAdsState createState() => _JustTestAdsState();
}

class _JustTestAdsState extends State<JustTestAds> {
  late NativeAd _ad;

  bool _isAdLoaded = false;

  @override
  void initState() {
    super.initState();

    _ad = NativeAd(
      adUnitId: adConfig.nativeTest,
      factoryId: 'listTile',
      request: AdRequest(),
      listener: AdListener(
        onAdLoaded: (_) {
          setState(() {
            _isAdLoaded = true;
          });
        },
        onAdFailedToLoad: (ad, error) {
          ad.dispose();
          print('Ad load failed (code=${error.code} message=${error.message})');
        },
      ),
    );

    _ad.load();
  }

@override
void dispose() {
  _ad.dispose();
  super.dispose();
}


  @override
  Widget build(BuildContext context) {
    if (_isAdLoaded) {
      return Container(
          child: AdWidget(ad: _ad),
          height: 100,
          width: 450,

          color: Colors.blue ,
          alignment: Alignment.center,
        );
    }
    return Container();
  }
}

How can I adjust iPad font size?

Hi,

I tested the minimal example in iPhone 11, iPhone SE and iPad as shown below screen. In the update text becomes too small for reading. My first question is how can I adjust iPad font size?

For my second question: I already have an iOS app and trying to use your plugin to make my app more responsive. My app only for iPhone and iPad. I have a bottom navigation and my app in portrait mode. is your plugin covers flutter bottom navigator as well?

For my last question: In your example asset folders all the images width is 1080 px. Is there any reason for this? In my app there is a stack widget that has in some specified (250 x 150) container. How is your plugin deals with widget width and height as well as should I use all my images width to 1080?

Thanks

Screenshot 2021-01-28 at 15 54 19

Black screen on startup

I don't know this is bug or not

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

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
         builder: (context, widget) => ResponsiveWrapper.builder(
          BouncingScrollWrapper.builder(context, widget),
          maxWidth: 1200,
          minWidth: 450,
          defaultScale: true,
          breakpoints: [
            ResponsiveBreakpoint.resize(450, name: MOBILE),
            ResponsiveBreakpoint.autoScale(800, name: TABLET),
            ResponsiveBreakpoint.autoScale(1000, name: TABLET),
            ResponsiveBreakpoint.resize(1200, name: DESKTOP),
            ResponsiveBreakpoint.autoScale(2460, name: "4K"),
          ],
          background: Container(color: Color(0xFFF5F5F5))),
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
        // This makes the visual density adapt to the platform that you run
        // the app on. For desktop platforms, the controls will be smaller and
        // closer together (more dense) than on mobile platforms.
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Invoke "debug painting" (press "p" in the console, choose the
          // "Toggle Debug Paint" action from the Flutter Inspector in Android
          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
          // to see the wireframe for each widget.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

ezgif com-video-to-gif

Alignment of ResponsiveWrapper not working

Hello,

Alignment parameter doesn't seem to have any effect for me.
This is a sample to reproduce the problem:

class SampleNotWorking extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
        color: Colors.green,
        child: ResponsiveWrapper.builder(
            Container(
                width: MediaQuery.of(context).size.width,
                height: MediaQuery.of(context).size.height - 200,
                color: Colors.red),
            alignment: Alignment.bottomCenter));
  }
}

I would expect the red box to be aligned at the bottom center (I also tried with other values with no luck) but it is always centered instead:

image

Error being thrown with the new version of the package 0.1.2

hi @searchy2

with the new version that supports landscape responsiveness, im getting an error thats being thrown by flutter itself.

i know its the plugin causing the error because when i comment out the code for responsive framework, the error goes away

the error is:


The following StateError was thrown during a scheduler callback:
Bad state: No element

When the exception was thrown, this was the stack:
#0      ListIterable.firstWhere (dart:_internal/iterable.dart:107:5)
#1      _ResponsiveWrapperState.getActiveBreakpointSegment
(package:responsive_framework/responsive_wrapper.dart:537:10)
#2      _ResponsiveWrapperState.getScreenWidth
(package:responsive_framework/responsive_wrapper.dart:233:31)
#3      _ResponsiveWrapperState.setDimensions
(package:responsive_framework/responsive_wrapper.dart:499:19)
#4      _ResponsiveWrapperState.initState.<anonymous closure>
(package:responsive_framework/responsive_wrapper.dart:581:7)
#5      SchedulerBinding._invokeFrameCallback
(package:flutter/src/scheduler/binding.dart:1144:15)
#6      SchedulerBinding.handleDrawFrame
(package:flutter/src/scheduler/binding.dart:1090:9)
#7      SchedulerBinding.scheduleWarmUpFrame.<anonymous closure>
(package:flutter/src/scheduler/binding.dart:865:7)
(elided 11 frames from class _RawReceivePortImpl, class _Timer, dart:async, and
dart:async-patch)

please check

The responsive framework is not scaling on a particular device

builder : (context, widget) => ResponsiveWrapper.builder(
          // ? warp all the heights and widths according to screen automatically
          widget,
          defaultScale: true,
          breakpoints: [
            ResponsiveBreakpoint.autoScale(420, name: MOBILE), //  breakpoint is set based on pixel 2 dpi
          ],
          backgroundColor: Theme.of(context).primaryColor,
        ),
// nested widgets ....

flutter mode : release

autoscale should render the same UI on all the devices right ? but why oneplus 6 differs from other devices am i doing anything wrong ?

Images :

UI in oneplus 6 :
1+6 (2)
1+6 (3)
1+6

UI in rest of the device like pixel2,oneplus 5t , vivo9 , pixel4 .. :
1+5t (2)
1+5t (3)
1+5t

Improvement request.

Hey @searchy2 ! Thank you for search a great package.
I have one improvement request.

As per the implementation, it is obvious that children of ResponsiveRowColumn gets rebuilt every time we resizes our app (in my case its web app).

For example, suppose we have one StatefulWidget widget as one of the children and it makes network call in its initState() method. Then each time when we resizes our app, then its initstate method is going to run again (given that rowColumn flag must be satisfied though).

Can you make workaround to prevent this?

Thank you.

Resize not working properly after 800 pixels of width in Flutter Web

So I've been testing a few things and it looks like the resize is not working properly when you have an screen width of more than 800 pixels.
As far as I know the following widgets are not working properly: TextField, TextFormField, RaisedButton.
I've shared a git project so you can see exactly what I mean:
Git responsive test project (Test it in Flutter Web with different sizes)

When the screen width is smaller than 800 pixels, it resizes the widgets as usual, but when it is bigger, it just makes them wider.
With images it works perfectly.
If you need some more information just ask for it.
Thank you.

backgroundColor should be a widget instead of Color

======== Exception caught by widgets library =======================================================
The following _TypeError was thrown building ResponsiveWrapper(dirty, state: _ResponsiveWrapperState#c9032):
type 'Color' is not a subtype of type 'Widget'

The relevant error-causing widget was: 
  ResponsiveWrapper file:///Users/huteri/flutter/.pub-cache/hosted/pub.dartlang.org/responsive_framework-0.0.14/lib/responsive_wrapper.dart:119:12
When the exception was thrown, this was the stack: 
#0      _ResponsiveWrapperState.build (package:responsive_framework/responsive_wrapper.dart:484:5)
#1      StatefulElement.build (package:flutter/src/widgets/framework.dart:4744:28)
#2      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4627:15)
#3      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4800:11)
#4      Element.rebuild (package:flutter/src/widgets/framework.dart:4343:5)
...
====================================================================================================
 /// First frame initialization default background color.
  /// Because layout initialization is delayed by 1 frame,
  /// a solid background color is displayed instead.
  /// Default white.
  final Color backgroundColor;

Used here as widget instead of color

return (screenWidth ==
            0) // Initialization check. Window measurements not available until postFrameCallback.
        ? (widget.backgroundColor ??
            Container(
                color: Color(
                    0xFFFFFFFF))) // First frame empty background color or default white.
        : InheritedResponsiveWrapper(

Migrate to Null Safety

Now that Null Safety is about to become stable it is important to have this package migrated as well or at least have a null safety version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.