muhammad369 / ResponsiveGrid_Flutter

Responsive Grid Layout for Flutter
MIT License
88 stars 27 forks source link

CrossAxisAlignment.stretch does not work #11

Open BeliliFahem opened 4 years ago

BeliliFahem commented 4 years ago

Error

════════ Exception caught by rendering library ═════════════════════════════════════════════════════ The following assertion was thrown during performLayout(): BoxConstraints forces an infinite height.

The offending constraints were: BoxConstraints(w=770.6, h=Infinity) The relevant error-causing widget was: Row file:///Users/fahembelili/.pub-cache/hosted/pub.dartlang.org/responsive_grid-1.2.1+1/lib/responsive_grid.dart:104:16 When the exception was thrown, this was the stack: dart-sdk/lib/_internal/js_dev_runtime/private/ddcruntime/errors.dart 212:49 throw packages/flutter/src/rendering/box.dart 517:9 throwError packages/flutter/src/rendering/box.dart 561:21 packages/flutter/src/rendering/box.dart 564:7 debugAssertIsValid packages/flutter/src/rendering/object.dart 1677:23 layout

code

Padding(
        padding: const EdgeInsets.symmetric(horizontal: 32),
        child: ResponsiveGridRow(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: [
            ResponsiveGridCol(
              md: 12,
              lg: 7,
              child: Container(
                color: Colors.pink,
              ),
            ),
            ResponsiveGridCol(
              md: 12,
              lg: 5,
              child: Container(
                color: Colors.green,
              ),
            ),
          ],
        ),
      )

Flutter doctor

[✓] Flutter (Channel beta, 1.22.0-12.1.pre, on Mac OS X 10.15.6 19G2021, locale fr-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[!] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        sudo gem install cocoapods
[✓] Chrome - develop for the web