Skip to content

Images and font size changing when keyboard shows up #297

Closed
@Yazan4m7

Description

Issue: Image height and font size changes when keyboard shows up, and resizes back when it closes,
tried to set "resizeToAvoidBottomInset: false" but it didnt work, here a minimum working code:

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

main() async {
  runApp(
    MaterialApp(
      home: Scaffold(body: EntryPoint()),
    ),
  );
}

class EntryPoint extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ScreenUtilInit(
        designSize: Size(1080, 1920),
        builder: () => MaterialApp(
              home: Scaffold(
                resizeToAvoidBottomInset: false,
                body: Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    TextField(
                      style: TextStyle(fontSize: 180.sp),
                    ),
                  ],
                ),
              ),
            ));
  }
}

Screenshots :
Screenshot_1638715744
Screenshot_1638715742

What I want is to only resize stuff according to device screen, and not to change after that.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions