-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when selecting text inside a FormField #1
Comments
some problem, any solution? |
Hi, could you please provide more infomation about this issue? @WingCH |
@ice-j |
Thanks your quick reply i just create sample demo code.
video: https://drive.google.com/file/d/1xUKi21OO9O5b6bFgyqot0kYrgNa3QHm9/view?usp=sharing void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return FlutterEasyLoading(
child: MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
),
home: MyHomePage(),
),
);
}
}
class MyHomePage extends StatefulWidget {
@override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: TextField(
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Text input',
),
),
));
}
} |
@WingCH I will check soon |
Hi, It's ok when i try to repeat this bug can you tell me more infomation about this bug, such as OS version etc. |
Very magical According to my memory imac is using macbook
|
imac
|
I have the same problem. It will appear when you click textfield several times in a row. MaterialApp( |
Having the same issue here...
|
@huangjianke the same bug here is happening to me...
This bug is only happening for me when testing on Android devices. Tell me if you want me to send my code to your mail for debugging. |
flutter_easyloading 和 flutter_localizations 是否有冲突 ? |
有大佬解决了吗 加上textfield长按就报错 |
@zhujiahong 先使用flutter稳定版试试 |
谢谢可以了 |
有大佬解决了吗加上textfield长按就报错 |
this is happening in flutter 1.17 stable release |
有谁解决了可以把方法共享下,让其他人参考下 |
Steps to reproduce:
Log
I/flutter (30736): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (30736): The following assertion was thrown building
I/flutter (30736): _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#0c596](dirty, state: _OverlayEntryState#026a0):
I/flutter (30736): No MediaQuery widget found.
I/flutter (30736): _OverlayEntry widgets require a MediaQuery widget ancestor.
I/flutter (30736): The specific widget that could not find a MediaQuery ancestor was:
I/flutter (30736): _OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#0c596]
I/flutter (30736): The ownership chain for the affected widget is:
I/flutter (30736): "_OverlayEntry-[LabeledGlobalKey<_OverlayEntryState>#0c596] ← Stack ← _Theatre ← Overlay ←
I/flutter (30736): Directionality ← FlutterEasyLoading ← MyApp ← [root]"
I/flutter (30736): Typically, the MediaQuery widget is introduced by the MaterialApp or WidgetsApp widget at the top of
I/flutter (30736): your application widget tree.
I/flutter (30736):
I/flutter (30736): The relevant error-causing widget was:
I/flutter (30736): Overlay file:///D:/Projects/flutter_easyloading/lib/src/widgets/loading.dart:35:14
I/flutter (30736):
I/flutter (30736): When the exception was thrown, this was the stack:
I/flutter (30736): #0 debugCheckHasMediaQuery. (package:flutter/src/widgets/debug.dart:219:7)
I/flutter (30736): #1 debugCheckHasMediaQuery (package:flutter/src/widgets/debug.dart:231:4)
I/flutter (30736): #2 _MaterialTextSelectionControls.buildToolbar (package:flutter/src/material/text_selection.dart:148:12)
I/flutter (30736): #3 TextSelectionOverlay._buildToolbar (package:flutter/src/widgets/text_selection.dart:556:34)
I/flutter (30736): #4 _OverlayEntryState.build (package:flutter/src/widgets/overlay.dart:169:25)
I/flutter (30736): #5 StatefulElement.build (package:flutter/src/widgets/framework.dart:4440:27)
I/flutter (30736): #6 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4329:15)
I/flutter (30736): #7 Element.rebuild (package:flutter/src/widgets/framework.dart:4053:5)
I/flutter (30736): #8 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4312:5)
I/flutter (30736): #9 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4487:11)
I/flutter (30736): #10 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4307:5)
I/flutter (30736): #11 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3297:14)
I/flutter (30736): #12 Element.updateChild (package:flutter/src/widgets/framework.dart:3091:12)
I/flutter (30736): #13 RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5326:32)
I/flutter (30736): #14 MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5694:17)
I/flutter (30736): #15 Element.updateChild (package:flutter/src/widgets/framework.dart:3080:15)
I/flutter (30736): #16 _TheatreElement.update (package:flutter/src/widgets/overlay.dart:615:16)
I/flutter (30736): #17 Element.updateChild (package:flutter/src/widgets/framework.dart:3080:15)
I/flutter (30736): #18 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4349:16)
I/flutter (30736): #19 Element.rebuild (package:flutter/src/widgets/framework.dart:4053:5)
I/flutter (30736): #20 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2532:33)
I/flutter (30736): #21 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:796:20)
I/flutter (30736): #22 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:283:5)
I/flutter (30736): #23 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1108:15)
I/flutter (30736): #24 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1047:9)
I/flutter (30736): #25 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:963:5)
I/flutter (30736): #29 _invoke (dart:ui/hooks.dart:260:10)
I/flutter (30736): #30 _drawFrame (dart:ui/hooks.dart:218:3)
I/flutter (30736): (elided 3 frames from package dart:async)
I/flutter (30736):
I/flutter (30736): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (30736): Another exception was thrown: No MediaQuery widget found.
The text was updated successfully, but these errors were encountered: