- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在处理堆栈中的可拖动小部件。每次我重新启动应用程序并启动状态时,它都会给我“Offset argument contained a NaN value”。
主事件包含标签栏堆栈和可拖动的帮助小部件。我将可拖动小部件的初始位置 offset(300,300) 设置在页面的右下角。
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:marqoum/Bookmarks.dart';
import 'Helper.dart';
import 'PdfViewPage.dart';
import 'HelpingList.dart';
class MainActivityPage extends StatefulWidget {
final String path;
const MainActivityPage({Key key, this.path}) : super(key: key);
@override
State<StatefulWidget> createState() {
return bMainActivityPage();
}
}
class bMainActivityPage extends State<MainActivityPage>
with TickerProviderStateMixin {
static final myTabbedPageKey = new GlobalKey<bMainActivityPage>();
TabController etabController;
bool isClicked = false;
int delay = 1000;
@override
void initState() {
super.initState();
etabController = TabController(vsync: this, length: 2);
}
@override
void dispose() {
etabController.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
List<Widget> myTabs = [PdfViewPage(path: widget.path), Bookmarks()];
return DefaultTabController(
length: 2,
initialIndex: 0,
child: Scaffold(
bottomNavigationBar: Container(
margin: EdgeInsets.only(bottom: 20),
child: TabBar(
controller: etabController,
onTap: (tappedPage) {
setState(() {
if (tappedPage == 1) {
print("Hi one");
}
});
},
tabs: <Widget>[
Tab(
text: 'الكتاب ',
icon: Icon(
Icons.picture_as_pdf,
),
),
Tab(
text: 'المفضلة ',
icon: Icon(
Icons.bookmark_border,
),
),
],
unselectedLabelColor: Colors.black,
labelColor: Color(0xfffc3b398),
indicatorColor: Color(0xfffc3b398),
indicatorWeight: 2,
),
),
body: Stack(
children: <Widget>[
TabBarView(
controller: etabController,
children: myTabs,
physics: NeverScrollableScrollPhysics(),
),
Helper(
initPos: Offset(232, 2),
isPressed: (bool isPressed) {
setState(() {
isClicked = isPressed;
});
},
),
Visibility(
child: HelpingList(),
visible: isClicked,
)
],
)),
);
}
}
可拖动
import 'package:flutter/material.dart';
class Helper extends StatefulWidget {
//DECLARING THE HELPING WIDGET INITIAL POSITION
final Offset initPos;
final Function(bool ispressed) isPressed;
//INITIAL POITION'S CONSTRUCTOR
Helper({this.initPos, this.isPressed});
@override
State<StatefulWidget> createState() {
return _helper();
}
}
class _helper extends State<Helper> {
Offset position ;
double height = 50, width = 50;
bool isclicked = false;
@override
void initState() {
super.initState();
position = widget.initPos;
}
@override
Widget build(BuildContext context) {
return Positioned(
left: position.dx,
top: position.dy,
child: Draggable(
child: helpingButton(),
onDraggableCanceled: (velocity, offset) {
setState(() {
isclicked = false;
widget.isPressed(isclicked);
height = 50;
width = 50;
position = offset;
});
},
feedback: feedBackHelpingButton()));
}
Widget helpingButton() {
return AnimatedContainer(
height: height,
width: width,
duration: Duration(milliseconds: 300),
curve: Curves.easeInSine,
child: FloatingActionButton(
backgroundColor: Color(0xfffc3b398),
child: helpingIcon(),
onPressed: () {
setState(() {
isclicked = true;
isclicked
? {
height = 100,
width = 100,
widget.isPressed(isclicked),
position = Offset(150, 150),
}
: {
isclicked = false,
};
});
},
),
);
}
Widget helpingIcon() {
return Icon(
Icons.list,
color: Colors.white,
);
}
Widget feedBackHelpingButton() {
return Container(
height: height + 10,
width: width + 10,
child: FloatingActionButton(
backgroundColor: Color(0xfffc3b398).withOpacity(0.5),
child: helpingIcon(),
onPressed: () {
return null;
},
));
}
}
D/jniPdfium(12697): Destroy FPDF library
W/libEGL (12697): EGLNativeWindowType 0x71ea582010 disconnect failed
Restarted application in 1,865ms.
I/flutter (12697): /data/user/0/com.example.marqoum/app_flutter/test.pdf
V/AudioManager(12697): playSoundEffect effectType: 0
E/BufferQueueProducer(12697): [] [hwsched]Can not get hwsched service
D/CubicBezierInterpolator(12697): CubicBezierInterpolator mControlPoint1x = 0.23, mControlPoint1y = 0.06, mControlPoint2x = 0.09, mControlPoint2y = 0.97
D/CubicBezierInterpolator(12697): CubicBezierInterpolator mControlPoint1x = 0.6, mControlPoint1y = 0.9, mControlPoint2x = 0.8, mControlPoint2y = 1.0
D/CubicBezierInterpolator(12697): CubicBezierInterpolator mControlPoint1x = 0.23, mControlPoint1y = 0.06, mControlPoint2x = 0.09, mControlPoint2y = 0.97
D/CubicBezierInterpolator(12697): CubicBezierInterpolator mControlPoint1x = 0.6, mControlPoint1y = 0.9, mControlPoint2x = 0.8, mControlPoint2y = 1.0
D/com.shockwave.pdfium.PdfiumCore(12697): Starting PdfiumAndroid 1.9.0
D/HwRTBlurUtils(12697): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3@616db92, Nhwext : 0, get Blur : disable with , null
D/HwRTBlurUtils(12697): check blur style for HwPhoneWindow, themeResId : 0x0103023e, context : android.app.Presentation$3@616db92, Nhwext : 0, get Blur : disable with , null
D/OpenGLRenderer(12697): HWUI Binary is enabled
I/PressGestureDetector(12697): HiTouch restricted: Sub windows restricted.
D/jniPdfium(12697): Init FPDF library
D/mali_winsys(12697): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, egl_color_buffer_format *, EGLBoolean) returns 0x3000
D/OpenGLRenderer(12697): HWUI Binary is enabled
I/flutter (12697): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter (12697): The following assertion was thrown during paint():
I/flutter (12697): Offset argument contained a NaN value.
I/flutter (12697): 'dart:ui/painting.dart': Failed assertion: line 38: '<optimized out>'
I/flutter (12697):
I/flutter (12697): Either the assertion indicates an error in the framework itself, or we should provide substantially
I/flutter (12697): more information in this error message to help you determine and fix the underlying cause.
I/flutter (12697): In either case, please report this assertion by filing a bug on GitHub:
I/flutter (12697): https://github.com/flutter/flutter/issues/new?template=BUG.md
I/flutter (12697):
I/flutter (12697): When the exception was thrown, this was the stack:
I/flutter (12697): #2 _offsetIsValid (dart:ui/painting.dart:38:10)
I/flutter (12697): #3 Canvas.drawCircle (dart:ui/painting.dart:3382:12)
I/flutter (12697): #4 _BoxDecorationPainter._paintBox
I/flutter (12697): #5 _BoxDecorationPainter._paintBackgroundColor
I/flutter (12697): #6 _BoxDecorationPainter.paint
I/flutter (12697): #7 RenderDecoratedBox.paint
I/flutter (12697): #8 RenderObject._paintWithContext
I/flutter (12697): #9 PaintingContext.paintChild
I/flutter (12697): #10 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #11 RenderObject._paintWithContext
I/flutter (12697): #12 PaintingContext.paintChild
I/flutter (12697): #13 RenderShiftedBox.paint
I/flutter (12697): #14 RenderObject._paintWithContext
I/flutter (12697): #15 PaintingContext.paintChild
I/flutter (12697): #16 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #17 RenderFractionalTranslation.paint
I/flutter (12697): #18 RenderObject._paintWithContext
I/flutter (12697): #19 PaintingContext.paintChild
I/flutter (12697): #20 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #21 RenderTransform.paint
I/flutter (12697): #22 RenderObject._paintWithContext
I/flutter (12697): #23 PaintingContext.paintChild
I/flutter (12697): #24 _RenderLayoutBuilder.paint
I/flutter (12697): #25 RenderObject._paintWithContext
I/flutter (12697): #26 PaintingContext.paintChild
I/flutter (12697): #27 _RenderStack&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint
I/flutter (12697): #28 RenderStack.paintStack
I/flutter (12697): #29 RenderStack.paint
I/flutter (12697): #30 RenderObject._paintWithContext
I/flutter (12697): #31 PaintingContext.paintChild
I/flutter (12697): #32 RenderShiftedBox.paint
I/flutter (12697): #33 RenderObject._paintWithContext
I/flutter (12697): #34 PaintingContext.paintChild
I/flutter (12697): #35 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #36 RenderObject._paintWithContext
I/flutter (12697): #37 PaintingContext.paintChild
I/flutter (12697): #38 RenderShiftedBox.paint
I/flutter (12697): #39 RenderObject._paintWithContext
I/flutter (12697): #40 PaintingContext.paintChild
I/flutter (12697): #41 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #42 RenderObject._paintWithContext
I/flutter (12697): #43 PaintingContext.paintChild
I/flutter (12697): #44 RenderShiftedBox.paint
I/flutter (12697): #45 RenderObject._paintWithContext
I/flutter (12697): #46 PaintingContext.paintChild
I/flutter (12697): #47 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #48 RenderDecoratedBox.paint
I/flutter (12697): #49 RenderObject._paintWithContext
I/flutter (12697): #50 PaintingContext.paintChild
I/flutter (12697): #51 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #52 RenderObject._paintWithContext
I/flutter (12697): #53 PaintingContext.paintChild
I/flutter (12697): #54 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #55 RenderPointerListener.paint
I/flutter (12697): #56 RenderObject._paintWithContext
I/flutter (12697): #57 PaintingContext.paintChild
I/flutter (12697): #58 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #59 RenderObject._paintWithContext
I/flutter (12697): #60 PaintingContext.paintChild
I/flutter (12697): #61 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #62 RenderDecoratedBox.paint
I/flutter (12697): #63 RenderObject._paintWithContext
I/flutter (12697): #64 PaintingContext.paintChild
I/flutter (12697): #65 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #66 RenderObject._paintWithContext
I/flutter (12697): #67 PaintingContext.paintChild
I/flutter (12697): #68 RenderShiftedBox.paint
I/flutter (12697): #69 RenderObject._paintWithContext
I/flutter (12697): #70 PaintingContext.paintChild
I/flutter (12697): #71 RenderShiftedBox.paint
I/flutter (12697): #72 RenderObject._paintWithContext
I/flutter (12697): #73 PaintingContext.paintChild
I/flutter (12697): #74 _RenderStack&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint
I/flutter (12697): #75 RenderStack.paintStack
I/flutter (12697): #76 RenderStack.paint
I/flutter (12697): #77 RenderObject._paintWithContext
I/flutter (12697): #78 PaintingContext.paintChild
I/flutter (12697): #79 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #80 RenderObject._paintWithContext
I/flutter (12697): #81 PaintingContext._repaintCompositedChild
I/flutter (12697): #82 PaintingContext.repaintCompositedChild
I/flutter (12697): #83 PaintingContext._compositeChild
I/flutter (12697): #84 PaintingContext.paintChild
I/flutter (12697): #85 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #86 RenderObject._paintWithContext
I/flutter (12697): #87 PaintingContext.paintChild
I/flutter (12697): #88 RenderSliverMultiBoxAdaptor.paint
I/flutter (12697): #89 RenderObject._paintWithContext
I/flutter (12697): #90 PaintingContext.paintChild
I/flutter (12697): #91 RenderViewportBase._paintContents
I/flutter (12697): #92 PaintingContext.pushLayer
I/flutter (12697): #93 PaintingContext.pushClipRect
I/flutter (12697): #94 RenderViewportBase.paint
I/flutter (12697): #95 RenderObject._paintWithContext
I/flutter (12697): #96 PaintingContext._repaintCompositedChild
I/flutter (12697): #97 PaintingContext.repaintCompositedChild
I/flutter (12697): #98 PaintingContext._compositeChild
I/flutter (12697): #99 PaintingContext.paintChild
I/flutter (12697): #100 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #101 RenderObject._paintWithContext
I/flutter (12697): #102 PaintingContext.paintChild
I/flutter (12697): #103 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #104 RenderObject._paintWithContext
I/flutter (12697): #105 PaintingContext.paintChild
I/flutter (12697): #106 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #107 RenderPointerListener.paint
I/flutter (12697): #108 RenderObject._paintWithContext
I/flutter (12697): #109 PaintingContext.paintChild
I/flutter (12697): #110 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #111 RenderObject._paintWithContext
I/flutter (12697): #112 PaintingContext.paintChild
I/flutter (12697): #113 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #114 RenderPointerListener.paint
I/flutter (12697): #115 RenderObject._paintWithContext
I/flutter (12697): #116 PaintingContext.paintChild
I/flutter (12697): #117 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #118 RenderObject._paintWithContext
I/flutter (12697): #119 PaintingContext.paintChild
I/flutter (12697): #120 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #121 RenderObject._paintWithContext
I/flutter (12697): #122 PaintingContext._repaintCompositedChild
I/flutter (12697): [onPageChanged, {total: 22, page: 0}]
I/flutter (12697): [onRender, {pages: 22}]
I/flutter (12697): [onPageChanged, {total: 22, page: 0}]
I/flutter (12697): [onPageChanged, {total: 22, page: 0}]
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): Failed to handle method call
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): java.lang.IllegalStateException: Reply already submitted
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:124)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:204)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at io.endigo.plugins.pdfviewflutter.FlutterPDFView.setPage(FlutterPDFView.java:119)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at io.endigo.plugins.pdfviewflutter.FlutterPDFView.onMethodCall(FlutterPDFView.java:102)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:201)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:88)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:219)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at android.os.MessageQueue.next(MessageQueue.java:379)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at android.os.Looper.loop(Looper.java:144)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at android.app.ActivityThread.main(ActivityThread.java:7555)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
E/MethodChannel#plugins.endigo.io/pdfview_0(12697): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
E/DartMessenger(12697): Uncaught exception in binary message listener
E/DartMessenger(12697): java.lang.IllegalStateException: Reply already submitted
E/DartMessenger(12697): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:124)
E/DartMessenger(12697): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:219)
E/DartMessenger(12697): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:88)
E/DartMessenger(12697): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:219)
E/DartMessenger(12697): at android.os.MessageQueue.nativePollOnce(Native Method)
E/DartMessenger(12697): at android.os.MessageQueue.next(MessageQueue.java:379)
E/DartMessenger(12697): at android.os.Looper.loop(Looper.java:144)
E/DartMessenger(12697): at android.app.ActivityThread.main(ActivityThread.java:7555)
E/DartMessenger(12697): at java.lang.reflect.Method.invoke(Native Method)
E/DartMessenger(12697): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
E/DartMessenger(12697): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
I/flutter (12697): #123 PaintingContext.repaintCompositedChild
I/flutter (12697): #124 PaintingContext._compositeChild
I/flutter (12697): #125 PaintingContext.paintChild
I/flutter (12697): #126 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #127 RenderCustomPaint.paint
I/flutter (12697): #128 RenderObject._paintWithContext
I/flutter (12697): #129 PaintingContext.paintChild
I/flutter (12697): #130 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #131 RenderObject._paintWithContext
I/flutter (12697): #132 PaintingContext._repaintCompositedChild
I/flutter (12697): #133 PaintingContext.repaintCompositedChild
I/flutter (12697): #134 PaintingContext._compositeChild
I/flutter (12697): #135 PaintingContext.paintChild
I/flutter (12697): #136 _RenderStack&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint
I/flutter (12697): #137 RenderStack.paintStack
I/flutter (12697): #138 RenderStack.paint
I/flutter (12697): #139 RenderObject._paintWithContext
I/flutter (12697): #140 PaintingContext.paintChild
I/flutter (12697): #141 _RenderCustomMultiChildLayoutBox&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint
I/flutter (12697): #142 RenderCustomMultiChildLayoutBox.paint
I/flutter (12697): #143 RenderObject._paintWithContext
I/flutter (12697): #144 PaintingContext.paintChild
I/flutter (12697): #145 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #146 _RenderInkFeatures.paint
I/flutter (12697): #147 RenderObject._paintWithContext
I/flutter (12697): #148 PaintingContext.paintChild
I/flutter (12697): #149 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #150 PaintingContext.pushLayer
I/flutter (12697): #151 RenderPhysicalModel.paint
I/flutter (12697): #152 RenderObject._paintWithContext
I/flutter (12697): #153 PaintingContext.paintChild
I/flutter (12697): #154 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #155 RenderObject._paintWithContext
I/flutter (12697): #156 PaintingContext.paintChild
I/flutter (12697): #157 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #158 RenderObject._paintWithContext
I/flutter (12697): #159 PaintingContext._repaintCompositedChild
I/flutter (12697): #160 PaintingContext.repaintCompositedChild
I/flutter (12697): #161 PaintingContext._compositeChild
I/flutter (12697): #162 PaintingContext.paintChild
I/flutter (12697): #163 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #164 RenderObject._paintWithContext
I/flutter (12697): #165 PaintingContext.paintChild
I/flutter (12697): #166 RenderAnimatedOpacity.paint
I/flutter (12697): #167 RenderObject._paintWithContext
I/flutter (12697): #168 PaintingContext.paintChild
I/flutter (12697): #169 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #170 RenderFractionalTranslation.paint
I/flutter (12697): #171 RenderObject._paintWithContext
I/flutter (12697): #172 PaintingContext.paintChild
I/flutter (12697): #173 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #174 RenderObject._paintWithContext
I/flutter (12697): #175 PaintingContext._repaintCompositedChild
I/flutter (12697): #176 PaintingContext.repaintCompositedChild
I/flutter (12697): #177 PaintingContext._compositeChild
I/flutter (12697): #178 PaintingContext.paintChild
I/flutter (12697): #179 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #180 RenderObject._paintWithContext
I/flutter (12697): #181 PaintingContext.paintChild
I/flutter (12697): #182 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #183 RenderOffstage.paint
I/flutter (12697): #184 RenderObject._paintWithContext
I/flutter (12697): #185 PaintingContext.paintChild
I/flutter (12697): #186 _RenderStack&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint
I/flutter (12697): #187 RenderStack.paintStack
I/flutter (12697): #188 RenderStack.paint
I/flutter (12697): #189 RenderObject._paintWithContext
I/flutter (12697): #190 PaintingContext.paintChild
I/flutter (12697): #191 __RenderTheatre&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #192 RenderObject._paintWithContext
I/flutter (12697): #193 PaintingContext.paintChild
I/flutter (12697): #194 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #195 RenderObject._paintWithContext
I/flutter (12697): #196 PaintingContext.paintChild
I/flutter (12697): #197 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #198 RenderObject._paintWithContext
I/flutter (12697): #199 PaintingContext.paintChild
I/flutter (12697): #200 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #201 RenderPointerListener.paint
I/flutter (12697): #202 RenderObject._paintWithContext
I/flutter (12697): #203 PaintingContext.paintChild
I/flutter (12697): #204 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #205 RenderCustomPaint.paint
I/flutter (12697): #206 RenderObject._paintWithContext
I/flutter (12697): #207 PaintingContext.paintChild
I/flutter (12697): #208 _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint
I/flutter (12697): #209 RenderObject._paintWithContext
I/flutter (12697): #210 PaintingContext.paintChild
I/flutter (12697): #211 RenderView.paint
I/flutter (12697): #212 RenderObject._paintWithContext
I/flutter (12697): #213 PaintingContext._repaintCompositedChild
I/flutter (12697): #214 PaintingContext.repaintCompositedChild
I/flutter (12697): #215 PipelineOwner.flushPaint
I/flutter (12697): #216 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame
I/flutter (12697): #217 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame
I/flutter (12697): #218 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback
I/flutter (12697): #219 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback
I/flutter (12697): #220 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame
I/flutter (12697): #221 _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame
I/flutter (12697): #225 _invoke (dart:ui/hooks.dart:219:10)
I/flutter (12697): #226 _drawFrame (dart:ui/hooks.dart:178:3)
I/flutter (12697): (elided 5 frames from class _AssertionError and package dart:async)
I/flutter (12697):
I/flutter (12697): The following RenderObject was being processed when the exception was fired:
I/flutter (12697): RenderDecoratedBox#0f20d
I/flutter (12697): creator: DecoratedBox ← ConstrainedBox ← Container ← CircleThumb ← Center ← FractionalTranslation
I/flutter (12697): ← Transform ← LayoutBuilder ← Stack ← Padding ← AspectRatio ← Center ← ⋯
I/flutter (12697): parentData: <none> (can use size)
I/flutter (12697): constraints: BoxConstraints(w=20.0, h=20.0)
I/flutter (12697): size: Size(20.0, 20.0)
I/flutter (12697): decoration: BoxDecoration
I/flutter (12697): configuration: ImageConfiguration(bundle: PlatformAssetBundle#0f312(), devicePixelRatio: 3.0,
I/flutter (12697): locale: en_US, textDirection: TextDirection.ltr, platform: android)
I/flutter (12697): This RenderObject has no descendants.
I/flutter (12697): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (12697): Another exception was thrown: Offset argument contained a NaN value.
I/flutter (12697): Another exception was thrown: Offset argument contained a NaN value.
最佳答案
错误 NaN
可能是由除以不能转换为数字的变量引起的。
Flutter 在除以 0 时不会抛出错误。因此您可以使用以下方法检查 NaN
:
if (number == double.nan)
关于flutter - 偏移量参数包含 NaN 值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56852760/
我正在尝试从第 4 到 9 页以及第 12 和 13 页上的单元格中清除所有内容(包括图像)。我有以下代码,但它正在清除第 3-9 和 12-15 页中的内容,我不知道为什么。 有什么想法吗? Sub
有没有办法增加极坐标图刻度标签(θ)的填充/偏移? import matplotlib import numpy as np from matplotlib.pyplot import figure,
我正在调用本地 API 并尝试以分页 样式进行操作。我有 n 张图片,我想将它们分成 n/4 行(每行 4 张图片)。因此,我正在调用我的 API,images/count,offset。但不知何故,
我的问题解释起来有点棘手,但无论如何我都会尝试。我有两个水平选项卡,当您单击它们时,会打开一个文本框内容。当他们被点击时,我试图“关注”他们。我在网上找到了很多资料,但除了我在下面显示的这段代码外,没
所以我有一个 float 的 div,我需要它始终向右 200 像素,并填充窗口的其余部分。有没有某种跨浏览器兼容的方法,我可以在不借助 javascript 的情况下使宽度填满页面的其余部分? 最佳
我有以下片段 $('html,body').animate({scrollTop: $('#menu').offset().top}, 'slow'); 单击链接时,我希望浏览器从#menu div
我目前正在为我的应用程序使用 JASidePanel,并且我有一个 UITableViewcontroller 和一个 UIRefreshControl 作为它的 ViewController 之一。
给出以下代码: imshow(np.arange(16*16).reshape(16,16)) cb = colorbar() cb.set_label("Foo") cb.set_ticks([0,
我是编程新手,我认为 VBA 是一个很好的起点,因为我在 Excel 中做了很多工作。 我创建了一个宏,它从输入框中获取一个整数(我一直使用 2、3 和 4 来测试),并创建该数字的一组 4 层层次结
我在 PHP 中有一个 unix 时间戳: $timestamp = 1346300336; 然后我有一个我想要应用的时区的偏移量。基本上,我想应用偏移量并返回一个新的 unix 时间戳。偏移量遵循这
演示:http://jsfiddle.net/H45uY/6/ 我在这里想做的是将 的左上角设为跟随鼠标。代码在没有段落的情况下工作正常(请参阅上面的演示),但是当您添加段落时,被向上推,鼠标位于盒
假设我们有两个由无符号长(64 位)数组表示的位图。我想使用特定的移位(偏移)合并这两个位图。例如,将位图 1(较大)合并到位图 2(较小)中,起始偏移量为 3。偏移量 3 表示位图 1 的第 3 位
通过在 pageViewController 中实现 tableView,tableView 与其显示的内容不一致。对此最好的解决办法是什么? 最佳答案 如果您的 TableView 是 View C
我设置了一个在 nib 中显示地点信息的地点配置文件。当我在标准屏幕流程中推送此 View 时,它工作正常。但是,当我从另一个选项卡推送此 View 时,UINavigationBar 似乎抵消了它,
如果我想选择 5 条记录,我会这样做: SELECT * FROM mytable LIMIT 5 如果我想添加偏移量,我会这样做: SELECT * FROM mytable OFFSET 5 LI
我有一个应用程序,其中某些 View 需要全屏,而其他 View 不需要全屏。在某些情况下,我希望背景显示在状态栏下方,所以我在 View 加载时使用它来使 Activity 全屏显示: window
在下图中,我进行绘制,结果位于 A 点,就在我手指接触的地方。 如何使图像显示在实际触摸上方约 40pt。 (二) 我正在使用经典的 coreGraphic UITouch 代码,如下所示: - (v
只要键盘处于事件状态,我就会尝试偏移 UITextField,效果很好,直到我尝试了表情符号布局。有没有办法检测键盘输入的类型,以便找出高度差?谢谢 最佳答案 不是使用 UIKeyboardDidSh
这是我的 Swift 代码 (AppDelegate.swift): var window: UIWindow? var rootViewController :UIViewController? f
我有一个 div 作为绝对定位的 body 的直接子节点,其 css 属性定义如下: div[id^="Container"] { display: block; position: a
我是一名优秀的程序员,十分优秀!