flutter_screenutil icon indicating copy to clipboard operation
flutter_screenutil copied to clipboard

Widget tree rebuild when keyboard show

Open Hvt261 opened this issue 1 year ago • 22 comments

I used screenUtil from old version to current version (5.9.0) When keyboard show, widget tree was rebuild. When I remove SreenUtil lib, it worked normally.

Flutter 3.10.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision 796c8ef792 (2 months ago) • 2023-06-13 15:51:02 -0700 Engine • revision 45f6e00911 Tools • Dart 3.0.5 • DevTools 2.23.1

Hvt261 avatar Aug 24 '23 07:08 Hvt261

@Hvt261 Not the widget tree, but the widgets you declared see README.md file. We're listening to MediaQuery changes in core, so rebuilds on screen changes depends on core MediaQuery functionnality. Some improvements are planned by the end of Sep, but it will be a minor version.

Mounir-Bouaiche avatar Aug 24 '23 08:08 Mounir-Bouaiche

@Mounir-Bouaiche I removed all sources which have MediaQuery but error still happen I wrap ScreenUtilInit out of MaterialApp.

Hvt261 avatar Aug 24 '23 08:08 Hvt261

@Mounir-Bouaiche I removed all sources which have MediaQuery but error still happen I wrap ScreenUtilInit out of MaterialApp.

The libarary uses MediaQuery, not you. You can't change this behaivior, it's a core functionnality. If you have better options for listening to screen changes other than MediaQuery we can suggest that, you're welcome to open a pull request.

Mounir-Bouaiche avatar Aug 24 '23 08:08 Mounir-Bouaiche

Hello, my app crashes every time i open the keyboard, I removed ScreenUtilInit and it solved the problem. I think the way I used ScreenUtilInit is wrong please help.

`class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key);

@override Widget build(BuildContext context) { return ScreenUtilInit( useInheritedMediaQuery: true , designSize: const Size(390, 844), // Set your design size here builder: (_ , child) { return MultiProvider( providers: [ ChangeNotifierProvider(create: (context) => UserModel()), ChangeNotifierProvider(create: (context) => EmailProvider()), ChangeNotifierProvider(create: (context) => QuestionProvider()), ChangeNotifierProvider(create: (context) => QuizSessionsProvider()), ChangeNotifierProvider(create: (context) => AnalyticsProvider()), ChangeNotifierProvider(create: (context) => DailyQuestionStreakProvider()), ChangeNotifierProvider(create: (context) => GameProvider()), ChangeNotifierProvider(create: (context) => IconSelectionProvider()) ], child: MaterialApp.router( theme: ThemeData( scaffoldBackgroundColor: const Color(0xFF333863), textTheme: GoogleFonts.nunitoTextTheme(Theme.of(context).textTheme), bottomNavigationBarTheme: BottomNavigationBarThemeData( backgroundColor: AppColors.bg_color, selectedItemColor: Colors.white, unselectedItemColor: Colors.grey, ), ), debugShowCheckedModeBanner: true, routerConfig: AppRouter.createRouter(), ), ); }, ); } }`

AsadMoulviDev avatar Aug 30 '23 02:08 AsadMoulviDev

Yeah this also happen to me. My text got bigger when on screen keyboard pops up

fuadreza avatar Aug 30 '23 08:08 fuadreza

There is also a problem with mine. When using 5.9.0, the keyboard will pop up and push the entire page up

WeicongLi124 avatar Sep 07 '23 10:09 WeicongLi124

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 08 '23 01:10 github-actions[bot]

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

WeicongLi124 avatar Oct 08 '23 01:10 WeicongLi124

I am having same issues on forms when keybaord opens all text gone

fisforfaheem avatar Oct 11 '23 11:10 fisforfaheem

try solution from this comment https://github.com/OpenFlutter/flutter_screenutil/issues/495#issuecomment-1598513177

xalikoutis avatar Oct 16 '23 12:10 xalikoutis

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Nov 16 '23 01:11 github-actions[bot]

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

WeicongLi124 avatar Nov 16 '23 01:11 WeicongLi124

I'm getting same issue

abdullah432 avatar Dec 01 '23 17:12 abdullah432

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

WeicongLi124 avatar Dec 01 '23 17:12 WeicongLi124

Will this be Fixed? Or shall use something else

On Fri, Dec 1, 2023, 10:03 PM WeicongLee @.***> wrote:

这是来自QQ邮箱的假期自动回复邮件。

您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

— Reply to this email directly, view it on GitHub https://github.com/OpenFlutter/flutter_screenutil/issues/512#issuecomment-1836469463, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRXJSBFAFXF6O5YPMVS4FDYHIEXDAVCNFSM6AAAAAA34TGQMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZWGQ3DSNBWGM . You are receiving this because you commented.Message ID: @.***>

fisforfaheem avatar Dec 01 '23 17:12 fisforfaheem

try solution from this comment #495 (comment)

Thanks it work for me

aman246149 avatar Dec 24 '23 14:12 aman246149

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

WeicongLi124 avatar Dec 24 '23 14:12 WeicongLi124

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Jan 24 '24 01:01 github-actions[bot]

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

WeicongLi124 avatar Jan 24 '24 01:01 WeicongLi124

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Feb 25 '24 01:02 github-actions[bot]

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

WeicongLi124 avatar Feb 25 '24 01:02 WeicongLi124

Reply

On Sun, Feb 25, 2024, 6:47 AM WeicongLee @.***> wrote:

这是来自QQ邮箱的假期自动回复邮件。

您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

— Reply to this email directly, view it on GitHub https://github.com/OpenFlutter/flutter_screenutil/issues/512#issuecomment-1962783629, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRXJSCPCINRAUU4LBA7ZYTYVKJ3ZAVCNFSM6AAAAAA34TGQMKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSG44DGNRSHE . You are receiving this because you commented.Message ID: @.***>

fisforfaheem avatar Feb 26 '24 05:02 fisforfaheem

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Mar 28 '24 01:03 github-actions[bot]

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

WeicongLi124 avatar Mar 28 '24 01:03 WeicongLi124

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Apr 28 '24 01:04 github-actions[bot]

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

WeicongLi124 avatar Apr 28 '24 01:04 WeicongLi124

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

WeicongLi124 avatar May 27 '24 14:05 WeicongLi124