skip to Main Content

I’m the details page. This works fine for me. When I display in landscape mode then I get an error Bottom overloaded by 27 pixels.

Image

Code:

body: SafeArea(
  child: Column(
    children: [
      Container(
        padding: const EdgeInsets.symmetric(
          horizontal: kPadding8,
        ),
        height: 43,
        width: double.infinity,
        margin: const EdgeInsets.symmetric(
          horizontal: kPadding20,
        ),
        child: Row(
          children: [
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  Text(
                    'Harga',
                    style: kRalewayRegular.copyWith(
                      color: kGrey85,
                      fontSize: SizeConfig.blockSizeHorizontal! * 2.5,
                    ),
                  ),
                  SizedBox(
                    height: SizeConfig.blockSizeVertical! * 0.5,
                  ),
                  Text(
                    'Rp. 25.000.000 / Tahun',
                    style: kRalewayMedium.copyWith(
                      color: kBlack,
                      fontSize: SizeConfig.blockSizeHorizontal! * 4,
                    ),
                  )
                ],
              ),
            ),
            GestureDetector(
              onTap: () {
                debugPrint('Telah Disewa');
              },
              child: Container(
                height: 43,
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(
                    kBorderRadius10,
                  ),
                  gradient: kLinearGradientBlue,
                ),
                padding: const EdgeInsets.symmetric(
                  horizontal: kPadding24,
                ),
                child: Center(
                  child: Text(
                    'Sewa',
                    style: kRalewaySemibold.copyWith(
                      color: kWhite,
                      fontSize: SizeConfig.blockSizeHorizontal! * 4,
                    ),
                  ),
                ),
              ),
            )
          ],
        ),
      ),
    ],
  ),
)

Does anyone know what could be the issue ?

2

Answers


  1. Wrap your Column with SingleChildScrollView

    Login or Signup to reply.
  2. For each container in your Screen remove height
    then you can see which component is overflowing,
    Better try to don’t specify Height for Container so it will take the height of child widget

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search