0

Here is my code

   class BroadCaster extends StatelessWidget {
  BroadCaster({Key? key}) : super(key: key);
  final height = Get.size.height;
  final width = Get.size.width;
  final arg = Get.arguments;

  late ZegoEngineProfile profile;
  late ZegoUser user;
  late ZegoRoomConfig config;

  late Widget localPreview;
  late Widget remotePreview;
  final groupChat = FirebaseFirestore.instance;
  BroadCasterController broadCasterController =
      Get.put<BroadCasterController>(BroadCasterController());
  MainStateManager mainStateManager = Get.find<MainStateManager>();
  ScrollController scrollController =
      ScrollController(initialScrollOffset: 2.2);

  @override
  Widget build(BuildContext context) {
    getToken();
    // isStreamingOn(true);

// init();
return Scaffold(
    extendBodyBehindAppBar: true,
    resizeToAvoidBottomInset: false,
    appBar: AppBar(
        backgroundColor: Colors.transparent,
        elevation: 0,
        title: Text("Shourya25"),
        actions: [
          Padding(
            padding: const EdgeInsets.all(9.0),
            child: InkWell(
              onTap: () {
                Get.bottomSheet(
                  Text("jhj"),
                  backgroundColor: Colors.white,
                );
              },
              child: Container(
                padding: EdgeInsets.only(right: 4, left: 3),
                child: Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      Icon(
                        Icons.visibility,
                        color: Colors.black,
                      ),
                      Text(
                        "2578",
                        style: TextStyle(color: Colors.black),
                      )
                    ]),
                decoration: BoxDecoration(
                    color: Colors.white,
                    borderRadius: BorderRadius.circular(50)),
              ),
            ),
          )
        ],
        leading: CircleAvatar(
          backgroundImage: NetworkImage(
              "https://cdn.pixabay.com/photo/2021/05/10/14/15/corset-6243486__480.jpg"),
        )),
    backgroundColor: CustomColors.bluetitn,
    body: Container(
      height: height,
      width: width,
      child: Stack(
        fit: StackFit.expand,
        children: [
          Container(
            child: GetBuilder<BroadCasterController>(
              builder: (controller) {
                return controller.isRoomJoined
                    ? localPreview
                    : Center(
                        child: CircularProgressIndicator(),
                      );
              },
            ),
          ),
          SingleChildScrollView(
            primary: true,
            child: Column(
              mainAxisAlignment: MainAxisAlignment.end,
              children: [
                Padding(
                  padding: EdgeInsets.only(top: height * 0.8),
                  child: TextField(),
                )
              ],
            ),
          )
        ],
      ),
    ));

}

so my problem is when i tap on textfield due to auto resizing my localpreview get squizzed like this enter image description here i had also tired resizeToAvoidBottomInset: false, but because of this textfiel gets hide under keyboard this is normal enter image description here actually i wanted to make fit localview to screen height and width while using textfield in stack

  • Try these solutions mentioned here, might work https://stackoverflow.com/questions/46551268/when-the-keyboard-appears-the-flutter-widgets-resize-how-to-prevent-this – theshivamlko May 20 '22 at 08:28
  • thanks for helping but its not working it always squeeze the camera view when ever keyboard comes up. if any other help will be appreciated – shourya pandey May 20 '22 at 10:25

0 Answers0