IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 移动开发 -> Flutter Spacer() 不能使用 SingleChildScrollView 解决方案 -> 正文阅读

[移动开发]Flutter Spacer() 不能使用 SingleChildScrollView 解决方案

使用后将会报错

报错的代码片段

        body: SingleChildScrollView(
          child: Column(
            children: [
              Spacer(),

错误日志输出

Performing hot reload...
Syncing files to device MI 8...

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderFlex children have non-zero flex but incoming height constraints are unbounded.

When a column is in a parent that does not provide a finite height constraint, for example if it is in a vertical scrollable, it will try to shrink-wrap its children along the vertical axis. Setting a flex on a child (e.g. using Expanded) indicates that the child is to expand to fill the remaining space in the vertical direction.
These two directives are mutually exclusive. If a parent is to shrink-wrap its child, the child cannot simultaneously expand to fit its parent.

Consider setting mainAxisSize to MainAxisSize.min and using FlexFit.loose fits for the flexible children (using Flexible rather than Expanded). This will allow the flexible children to size themselves to less than the infinite remaining space they would otherwise be forced to take, and then will cause the RenderFlex to shrink-wrap the children rather than expanding to fit the maximum constraints provided by the parent.

If this message did not help you determine the problem, consider using debugDumpRenderTree():
  https://flutter.dev/debugging/#rendering-layer
  http://api.flutter.dev/flutter/rendering/debugDumpRenderTree.html
The affected RenderFlex is: RenderFlex#5978c relayoutBoundary=up11 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
  size: MISSING
  direction: vertical
  mainAxisAlignment: start
  mainAxisSize: max
  crossAxisAlignment: center
  verticalDirection: down
...  child 1: RenderConstrainedBox#5b56c NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    parentData: offset=Offset(0.0, 0.0); flex=1; fit=FlexFit.tight
...    constraints: MISSING
...    size: MISSING
...    additionalConstraints: BoxConstraints(w=0.0, h=0.0)
...  child 2: RenderRepaintBoundary#efa50 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: offset=Offset(0.0, 0.0); flex=null; fit=null
...    constraints: MISSING
...    size: MISSING
...    usefulness ratio: no metrics collected yet (never painted)
...    child: RenderCustomPaint#9044d NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none>
...      constraints: MISSING
...      size: MISSING
...      child: RenderRepaintBoundary#6ec37 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none>
...        constraints: MISSING
...        size: MISSING
...        usefulness ratio: no metrics collected yet (never painted)
...        child: _RenderScrollSemantics#97491 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none>
...          constraints: MISSING
...          semantic boundary
...          size: MISSING
The creator information is set to: Column ← _SingleChildViewport ← IgnorePointer-[GlobalKey#1d221] ← Semantics ← Listener ← _GestureSemantics ← RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#6ef8c] ← Listener ← _ScrollableScope ← _ScrollSemantics-[GlobalKey#9de4b] ← RepaintBoundary ← CustomPaint ← ?
The nearest ancestor providing an unbounded width constraint is: _RenderSingleChildViewport#d7506 relayoutBoundary=up10 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  size: MISSING

See also: https://flutter.dev/layout/

If none of the above helps enough to fix this problem, please don't hesitate to file a bug:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md
The relevant error-causing widget was: 
  Column file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:74:18
When the exception was thrown, this was the stack: 
#0      RenderFlex.performLayout.<anonymous closure> (package:flutter/src/rendering/flex.dart:926:9)
#1      RenderFlex.performLayout (package:flutter/src/rendering/flex.dart:929:6)
#2      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#3      _RenderSingleChildViewport.performLayout (package:flutter/src/widgets/single_child_scroll_view.dart:581:14)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
...
The following RenderObject was being processed when the exception was fired: RenderFlex#5978c relayoutBoundary=up11 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
...  size: MISSING
...  direction: vertical
...  mainAxisAlignment: start
...  mainAxisSize: max
...  crossAxisAlignment: center
...  verticalDirection: down
RenderObject: RenderFlex#5978c relayoutBoundary=up11 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
  size: MISSING
  direction: vertical
  mainAxisAlignment: start
  mainAxisSize: max
  crossAxisAlignment: center
  verticalDirection: down
...  child 1: RenderConstrainedBox#5b56c NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    parentData: offset=Offset(0.0, 0.0); flex=1; fit=FlexFit.tight
...    constraints: MISSING
...    size: MISSING
...    additionalConstraints: BoxConstraints(w=0.0, h=0.0)
...  child 2: RenderRepaintBoundary#efa50 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: offset=Offset(0.0, 0.0); flex=null; fit=null
...    constraints: MISSING
...    size: MISSING
...    usefulness ratio: no metrics collected yet (never painted)
...    child: RenderCustomPaint#9044d NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none>
...      constraints: MISSING
...      size: MISSING
...      child: RenderRepaintBoundary#6ec37 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none>
...        constraints: MISSING
...        size: MISSING
...        usefulness ratio: no metrics collected yet (never painted)
...        child: _RenderScrollSemantics#97491 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none>
...          constraints: MISSING
...          semantic boundary
...          size: MISSING
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderFlex#5978c relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  SingleChildScrollView file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:73:15
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      _RenderSingleChildViewport.performLayout (package:flutter/src/widgets/single_child_scroll_view.dart:582:43)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#5      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#6      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
...
The following RenderObject was being processed when the exception was fired: _RenderSingleChildViewport#d7506 relayoutBoundary=up10 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  size: MISSING
RenderObject: _RenderSingleChildViewport#d7506 relayoutBoundary=up10 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
  size: MISSING
...  child: RenderFlex#5978c relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
...    size: MISSING
...    direction: vertical
...    mainAxisAlignment: start
...    mainAxisSize: max
...    crossAxisAlignment: center
...    verticalDirection: down
...    child 1: RenderConstrainedBox#5b56c NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      parentData: offset=Offset(0.0, 0.0); flex=1; fit=FlexFit.tight
...      constraints: MISSING
...      size: MISSING
...      additionalConstraints: BoxConstraints(w=0.0, h=0.0)
...    child 2: RenderRepaintBoundary#efa50 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: offset=Offset(0.0, 0.0); flex=null; fit=null
...      constraints: MISSING
...      size: MISSING
...      usefulness ratio: no metrics collected yet (never painted)
...      child: RenderCustomPaint#9044d NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none>
...        constraints: MISSING
...        size: MISSING
...        child: RenderRepaintBoundary#6ec37 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none>
...          constraints: MISSING
...          size: MISSING
...          usefulness ratio: no metrics collected yet (never painted)
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: _RenderSingleChildViewport#d7506 relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  SingleChildScrollView file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:73:15
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117:21)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#5      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#6      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
...
The following RenderObject was being processed when the exception was fired: RenderIgnorePointer#24446 relayoutBoundary=up9 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  size: MISSING
...  ignoring: false
...  ignoringSemantics: false
RenderObject: RenderIgnorePointer#24446 relayoutBoundary=up9 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
  size: MISSING
  ignoring: false
  ignoringSemantics: false
...  child: _RenderSingleChildViewport#d7506 relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    size: MISSING
...    child: RenderFlex#5978c relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
...      size: MISSING
...      direction: vertical
...      mainAxisAlignment: start
...      mainAxisSize: max
...      crossAxisAlignment: center
...      verticalDirection: down
...      child 1: RenderConstrainedBox#5b56c NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        parentData: offset=Offset(0.0, 0.0); flex=1; fit=FlexFit.tight
...        constraints: MISSING
...        size: MISSING
...        additionalConstraints: BoxConstraints(w=0.0, h=0.0)
...      child 2: RenderRepaintBoundary#efa50 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: offset=Offset(0.0, 0.0); flex=null; fit=null
...        constraints: MISSING
...        size: MISSING
...        usefulness ratio: no metrics collected yet (never painted)
...        child: RenderCustomPaint#9044d NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none>
...          constraints: MISSING
...          size: MISSING
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderIgnorePointer#24446 relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  SingleChildScrollView file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:73:15
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117:21)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#5      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#6      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
...
The following RenderObject was being processed when the exception was fired: RenderSemanticsAnnotations#2a00b relayoutBoundary=up8 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  size: MISSING
RenderObject: RenderSemanticsAnnotations#2a00b relayoutBoundary=up8 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
  size: MISSING
...  child: RenderIgnorePointer#24446 relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    size: MISSING
...    ignoring: false
...    ignoringSemantics: false
...    child: _RenderSingleChildViewport#d7506 relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...      size: MISSING
...      child: RenderFlex#5978c relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
...        size: MISSING
...        direction: vertical
...        mainAxisAlignment: start
...        mainAxisSize: max
...        crossAxisAlignment: center
...        verticalDirection: down
...        child 1: RenderConstrainedBox#5b56c NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          parentData: offset=Offset(0.0, 0.0); flex=1; fit=FlexFit.tight
...          constraints: MISSING
...          size: MISSING
...          additionalConstraints: BoxConstraints(w=0.0, h=0.0)
...        child 2: RenderRepaintBoundary#efa50 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: offset=Offset(0.0, 0.0); flex=null; fit=null
...          constraints: MISSING
...          size: MISSING
...          usefulness ratio: no metrics collected yet (never painted)
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderSemanticsAnnotations#2a00b relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  SingleChildScrollView file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:73:15
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117:21)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#5      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#6      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
...
The following RenderObject was being processed when the exception was fired: RenderPointerListener#664a9 relayoutBoundary=up7 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  size: MISSING
...  behavior: opaque
...  listeners: down
RenderObject: RenderPointerListener#664a9 relayoutBoundary=up7 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
  size: MISSING
  behavior: opaque
  listeners: down
...  child: RenderSemanticsAnnotations#2a00b relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    size: MISSING
...    child: RenderIgnorePointer#24446 relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...      size: MISSING
...      ignoring: false
...      ignoringSemantics: false
...      child: _RenderSingleChildViewport#d7506 relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...        size: MISSING
...        child: RenderFlex#5978c relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
...          size: MISSING
...          direction: vertical
...          mainAxisAlignment: start
...          mainAxisSize: max
...          crossAxisAlignment: center
...          verticalDirection: down
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderPointerListener#664a9 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  SingleChildScrollView file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:73:15
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117:21)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#5      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#6      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
...
The following RenderObject was being processed when the exception was fired: RenderSemanticsGestureHandler#161ef relayoutBoundary=up6 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  size: MISSING
...  behavior: opaque
...  gestures: <none>
RenderObject: RenderSemanticsGestureHandler#161ef relayoutBoundary=up6 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
  size: MISSING
  behavior: opaque
  gestures: <none>
...  child: RenderPointerListener#664a9 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    size: MISSING
...    behavior: opaque
...    listeners: down
...    child: RenderSemanticsAnnotations#2a00b relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...      size: MISSING
...      child: RenderIgnorePointer#24446 relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...        size: MISSING
...        ignoring: false
...        ignoringSemantics: false
...        child: _RenderSingleChildViewport#d7506 relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...          size: MISSING
====================================================================================================
Reloaded 0 libraries in 507ms.

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderSemanticsGestureHandler#161ef relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  SingleChildScrollView file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:73:15
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117:21)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#5      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#6      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
...
The following RenderObject was being processed when the exception was fired: RenderPointerListener#3301a relayoutBoundary=up5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  size: MISSING
...  behavior: deferToChild
...  listeners: signal
RenderObject: RenderPointerListener#3301a relayoutBoundary=up5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
  size: MISSING
  behavior: deferToChild
  listeners: signal
...  child: RenderSemanticsGestureHandler#161ef relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    size: MISSING
...    behavior: opaque
...    gestures: <none>
...    child: RenderPointerListener#664a9 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...      size: MISSING
...      behavior: opaque
...      listeners: down
...      child: RenderSemanticsAnnotations#2a00b relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...        size: MISSING
...        child: RenderIgnorePointer#24446 relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...          size: MISSING
...          ignoring: false
...          ignoringSemantics: false
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderPointerListener#3301a relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  SingleChildScrollView file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:73:15
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117:21)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#5      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#6      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
...
The following RenderObject was being processed when the exception was fired: _RenderScrollSemantics#d6905 relayoutBoundary=up4 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  semantic boundary
...  size: MISSING
RenderObject: _RenderScrollSemantics#d6905 relayoutBoundary=up4 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
  semantic boundary
  size: MISSING
...  child: RenderPointerListener#3301a relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    size: MISSING
...    behavior: deferToChild
...    listeners: signal
...    child: RenderSemanticsGestureHandler#161ef relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...      size: MISSING
...      behavior: opaque
...      gestures: <none>
...      child: RenderPointerListener#664a9 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...        size: MISSING
...        behavior: opaque
...        listeners: down
...        child: RenderSemanticsAnnotations#2a00b relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...          size: MISSING
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: _RenderScrollSemantics#d6905 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  SingleChildScrollView file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:73:15
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117:21)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#5      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
#6      RenderCustomPaint.performLayout (package:flutter/src/rendering/custom_paint.dart:545:11)
...
The following RenderObject was being processed when the exception was fired: RenderRepaintBoundary#d6132 relayoutBoundary=up3 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  size: MISSING
...  usefulness ratio: no metrics collected yet (never painted)
RenderObject: RenderRepaintBoundary#d6132 relayoutBoundary=up3 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
  size: MISSING
  usefulness ratio: no metrics collected yet (never painted)
...  child: _RenderScrollSemantics#d6905 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    semantic boundary
...    size: MISSING
...    child: RenderPointerListener#3301a relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...      size: MISSING
...      behavior: deferToChild
...      listeners: signal
...      child: RenderSemanticsGestureHandler#161ef relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...        size: MISSING
...        behavior: opaque
...        gestures: <none>
...        child: RenderPointerListener#664a9 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...          size: MISSING
...          behavior: opaque
...          listeners: down
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderRepaintBoundary#d6132 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  SingleChildScrollView file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:73:15
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117:21)
#4      RenderCustomPaint.performLayout (package:flutter/src/rendering/custom_paint.dart:545:11)
#5      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#6      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:116:14)
...
The following RenderObject was being processed when the exception was fired: RenderCustomPaint#39b1a relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  size: MISSING
RenderObject: RenderCustomPaint#39b1a relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
  size: MISSING
...  child: RenderRepaintBoundary#d6132 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    size: MISSING
...    usefulness ratio: no metrics collected yet (never painted)
...    child: _RenderScrollSemantics#d6905 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...      semantic boundary
...      size: MISSING
...      child: RenderPointerListener#3301a relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...        size: MISSING
...        behavior: deferToChild
...        listeners: signal
...        child: RenderSemanticsGestureHandler#161ef relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...          size: MISSING
...          behavior: opaque
...          gestures: <none>
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderCustomPaint#39b1a relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  SingleChildScrollView file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:73:15
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      RenderProxyBoxMixin.performLayout (package:flutter/src/rendering/proxy_box.dart:117:21)
#4      RenderObject.layout (package:flutter/src/rendering/object.dart:1779:7)
#5      MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:171:12)
#6      _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:937:7)
...
The following RenderObject was being processed when the exception was fired: RenderRepaintBoundary#dca03 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body (can use size)
...  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...  layer: OffsetLayer#db9e0 DETACHED
...    engine layer: Null#007db
...    offset: Offset(0.0, 0.0)
...  size: MISSING
...  metrics: 0.0% useful (1 bad vs 0 good)
...  diagnosis: insufficient data to draw conclusion (less than five repaints)
RenderObject: RenderRepaintBoundary#dca03 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body (can use size)
  constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
  layer: OffsetLayer#db9e0 DETACHED
    engine layer: Null#007db
    offset: Offset(0.0, 0.0)
  size: MISSING
  metrics: 0.0% useful (1 bad vs 0 good)
  diagnosis: insufficient data to draw conclusion (less than five repaints)
...  child: RenderCustomPaint#39b1a relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: <none> (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    size: MISSING
...    child: RenderRepaintBoundary#d6132 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...      size: MISSING
...      usefulness ratio: no metrics collected yet (never painted)
...      child: _RenderScrollSemantics#d6905 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...        semantic boundary
...        size: MISSING
...        child: RenderPointerListener#3301a relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...          size: MISSING
...          behavior: deferToChild
...          listeners: signal
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderRepaintBoundary#dca03 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  Scaffold file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:26:12
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      MultiChildLayoutDelegate.layoutChild (package:flutter/src/rendering/custom_layout.dart:172:18)
#4      _ScaffoldLayout.performLayout (package:flutter/src/material/scaffold.dart:937:7)
#5      MultiChildLayoutDelegate._callPerformLayout (package:flutter/src/rendering/custom_layout.dart:240:7)
#6      RenderCustomMultiChildLayoutBox.performLayout (package:flutter/src/rendering/custom_layout.dart:404:14)
...
The following RenderObject was being processed when the exception was fired: RenderCustomMultiChildLayoutBox#68e9f NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(w=392.7, h=770.2)
...  size: Size(392.7, 770.2)
RenderObject: RenderCustomMultiChildLayoutBox#68e9f NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(w=392.7, h=770.2)
  size: Size(392.7, 770.2)
...  child 1: RenderRepaintBoundary#dca03 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    layer: OffsetLayer#db9e0 DETACHED
...      engine layer: Null#007db
...      offset: Offset(0.0, 0.0)
...    size: MISSING
...    metrics: 0.0% useful (1 bad vs 0 good)
...    diagnosis: insufficient data to draw conclusion (less than five repaints)
...    child: RenderCustomPaint#39b1a relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...      size: MISSING
...      child: RenderRepaintBoundary#d6132 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...        size: MISSING
...        usefulness ratio: no metrics collected yet (never painted)
...        child: _RenderScrollSemantics#d6905 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...          semantic boundary
...          size: MISSING
...  child 2: RenderConstrainedBox#c9ef3 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.appBar (can use size)
...    constraints: BoxConstraints(w=392.7, 0.0<=h<=770.2)
...    size: Size(392.7, 88.4)
...    additionalConstraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=88.4)
...    child: RenderSemanticsAnnotations#d7283 relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(w=392.7, 0.0<=h<=88.4)
...      semantic boundary
...      size: Size(392.7, 88.4)
...      child: RenderAnnotatedRegion<SystemUiOverlayStyle>#6514a relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(w=392.7, 0.0<=h<=88.4)
...        size: Size(392.7, 88.4)
...        child: RenderPhysicalModel#ed65a relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(w=392.7, 0.0<=h<=88.4)
...          layer: PhysicalModelLayer#8897e DETACHED
...            engine layer: PhysicalShapeEngineLayer#f1ef3
...            elevation: 4.0
...            color: MaterialColor(primary value: Color(0xfff44336))
...          size: Size(392.7, 88.4)
...          elevation: 4.0
...          color: MaterialColor(primary value: Color(0xfff44336))
...          shadowColor: MaterialColor(primary value: Color(0xfff44336))
...          shape: BoxShape.rectangle
...          borderRadius: BorderRadius.zero
...  child 3: RenderPadding#33f7c relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    needs compositing
...    parentData: offset=Offset(0.0, 682.2); id=_ScaffoldSlot.bottomNavigationBar (can use size)
...    constraints: BoxConstraints(w=392.7, 0.0<=h<=770.2)
...    size: Size(392.7, 88.0)
...    padding: EdgeInsets.zero
...    textDirection: ltr
...    child: RenderPadding#cd38a relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      needs compositing
...      parentData: offset=Offset(0.0, 0.0) (can use size)
...      constraints: BoxConstraints(w=392.7, 0.0<=h<=770.2)
...      size: Size(392.7, 88.0)
...      padding: EdgeInsets.all(20.0)
...      textDirection: ltr
...      child: RenderFlex#09cac relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        needs compositing
...        parentData: offset=Offset(20.0, 20.0) (can use size)
...        constraints: BoxConstraints(w=352.7, 0.0<=h<=730.2)
...        size: Size(352.7, 48.0)
...        direction: horizontal
...        mainAxisAlignment: start
...        mainAxisSize: max
...        crossAxisAlignment: center
...        textDirection: ltr
...        verticalDirection: down
...        child 1: RenderSemanticsAnnotations#b8a9e relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: offset=Offset(0.0, 0.0); flex=2; fit=FlexFit.tight (can use size)
...          constraints: BoxConstraints(w=137.1, 0.0<=h<=730.2)
...          semantic boundary
...          size: Size(137.1, 48.0)
...        child 2: RenderConstrainedBox#b709c relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          parentData: offset=Offset(137.1, 24.0); flex=null; fit=null (can use size)
...          constraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=730.2)
...          size: Size(10.0, 0.0)
...          additionalConstraints: BoxConstraints(w=10.0, 0.0<=h<=Infinity)
...        child 3: RenderSemanticsAnnotations#43cee relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...          needs compositing
...          parentData: offset=Offset(147.1, 0.0); flex=3; fit=FlexFit.tight (can use size)
...          constraints: BoxConstraints(w=205.6, 0.0<=h<=730.2)
...          semantic boundary
...          size: Size(205.6, 48.0)
...  child 4: RenderStack#27154 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...    parentData: offset=Offset(376.7, 666.2); id=_ScaffoldSlot.floatingActionButton (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=770.2)
...    size: Size(0.0, 0.0)
...    alignment: Alignment.centerRight
...    textDirection: ltr
...    fit: loose
...    child 1: RenderTransform#d1e84 relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...      parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=770.2)
...      size: Size(0.0, 0.0)
...      transform matrix: [0] 0.0,0.0,0.0,0.0
[1] 0.0,0.0,0.0,0.0
[2] 0.0,0.0,1.0,0.0
[3] 0.0,0.0,0.0,1.0
...      origin: null
...      alignment: Alignment.center
...      textDirection: ltr
...      transformHitTests: true
...      child: RenderTransform#20444 relayoutBoundary=up3 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=770.2)
...        size: Size(0.0, 0.0)
...        transform matrix: [0] 0.7,0.7,0.0,0.0
[1] -0.7,0.7,0.0,0.0
[2] 0.0,0.0,1.0,0.0
[3] 0.0,0.0,0.0,1.0
...        origin: null
...        alignment: Alignment.center
...        textDirection: ltr
...        transformHitTests: true
====================================================================================================

======== Exception caught by rendering library =====================================================
The following assertion was thrown during paint():
RenderBox was not laid out: RenderRepaintBoundary#dca03 relayoutBoundary=up1 NEEDS-PAINT
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1930 pos 12: 'hasSize'


Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

The relevant error-causing widget was: 
  Scaffold file:///H:/project/flutter/anguo/flutter_plugin_anguo/lib/page/my/passport/destory_account_page.dart:26:12
When the exception was thrown, this was the stack: 
#2      RenderBox.size (package:flutter/src/rendering/box.dart:1930:12)
#3      RenderBox.paintBounds (package:flutter/src/rendering/box.dart:2568:41)
#4      PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:138:59)
#5      PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:100:5)
#6      PaintingContext._compositeChild (package:flutter/src/rendering/object.dart:204:7)
...
The following RenderObject was being processed when the exception was fired: RenderCustomMultiChildLayoutBox#68e9f
...  needs compositing
...  parentData: <none> (can use size)
...  constraints: BoxConstraints(w=392.7, h=770.2)
...  size: Size(392.7, 770.2)
RenderObject: RenderCustomMultiChildLayoutBox#68e9f
  needs compositing
  parentData: <none> (can use size)
  constraints: BoxConstraints(w=392.7, h=770.2)
  size: Size(392.7, 770.2)
...  child 1: RenderRepaintBoundary#dca03 relayoutBoundary=up1 NEEDS-PAINT
...    needs compositing
...    parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.body (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...    layer: OffsetLayer#db9e0 DETACHED
...      engine layer: Null#007db
...      offset: Offset(0.0, 0.0)
...    size: MISSING
...    metrics: 0.0% useful (2 bad vs 0 good)
...    diagnosis: insufficient data to draw conclusion (less than five repaints)
...    child: RenderCustomPaint#39b1a relayoutBoundary=up2 NEEDS-PAINT
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...      size: MISSING
...      child: RenderRepaintBoundary#d6132 relayoutBoundary=up3 NEEDS-PAINT
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...        size: MISSING
...        usefulness ratio: no metrics collected yet (never painted)
...        child: _RenderScrollSemantics#d6905 relayoutBoundary=up4 NEEDS-PAINT
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=593.8)
...          semantic boundary
...          size: MISSING
...  child 2: RenderConstrainedBox#c9ef3 relayoutBoundary=up1 NEEDS-PAINT
...    needs compositing
...    parentData: offset=Offset(0.0, 0.0); id=_ScaffoldSlot.appBar (can use size)
...    constraints: BoxConstraints(w=392.7, 0.0<=h<=770.2)
...    size: Size(392.7, 88.4)
...    additionalConstraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=88.4)
...    child: RenderSemanticsAnnotations#d7283 relayoutBoundary=up2 NEEDS-PAINT
...      needs compositing
...      parentData: <none> (can use size)
...      constraints: BoxConstraints(w=392.7, 0.0<=h<=88.4)
...      semantic boundary
...      size: Size(392.7, 88.4)
...      child: RenderAnnotatedRegion<SystemUiOverlayStyle>#6514a relayoutBoundary=up3 NEEDS-PAINT
...        needs compositing
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(w=392.7, 0.0<=h<=88.4)
...        size: Size(392.7, 88.4)
...        child: RenderPhysicalModel#ed65a relayoutBoundary=up4 NEEDS-PAINT
...          needs compositing
...          parentData: <none> (can use size)
...          constraints: BoxConstraints(w=392.7, 0.0<=h<=88.4)
...          layer: PhysicalModelLayer#8897e DETACHED
...            engine layer: PhysicalShapeEngineLayer#f1ef3
...            elevation: 4.0
...            color: MaterialColor(primary value: Color(0xfff44336))
...          size: Size(392.7, 88.4)
...          elevation: 4.0
...          color: MaterialColor(primary value: Color(0xfff44336))
...          shadowColor: MaterialColor(primary value: Color(0xfff44336))
...          shape: BoxShape.rectangle
...          borderRadius: BorderRadius.zero
...  child 3: RenderPadding#33f7c relayoutBoundary=up1 NEEDS-PAINT
...    needs compositing
...    parentData: offset=Offset(0.0, 682.2); id=_ScaffoldSlot.bottomNavigationBar (can use size)
...    constraints: BoxConstraints(w=392.7, 0.0<=h<=770.2)
...    size: Size(392.7, 88.0)
...    padding: EdgeInsets.zero
...    textDirection: ltr
...    child: RenderPadding#cd38a relayoutBoundary=up2 NEEDS-PAINT
...      needs compositing
...      parentData: offset=Offset(0.0, 0.0) (can use size)
...      constraints: BoxConstraints(w=392.7, 0.0<=h<=770.2)
...      size: Size(392.7, 88.0)
...      padding: EdgeInsets.all(20.0)
...      textDirection: ltr
...      child: RenderFlex#09cac relayoutBoundary=up3 NEEDS-PAINT
...        needs compositing
...        parentData: offset=Offset(20.0, 20.0) (can use size)
...        constraints: BoxConstraints(w=352.7, 0.0<=h<=730.2)
...        size: Size(352.7, 48.0)
...        direction: horizontal
...        mainAxisAlignment: start
...        mainAxisSize: max
...        crossAxisAlignment: center
...        textDirection: ltr
...        verticalDirection: down
...        child 1: RenderSemanticsAnnotations#b8a9e relayoutBoundary=up4 NEEDS-PAINT
...          needs compositing
...          parentData: offset=Offset(0.0, 0.0); flex=2; fit=FlexFit.tight (can use size)
...          constraints: BoxConstraints(w=137.1, 0.0<=h<=730.2)
...          semantic boundary
...          size: Size(137.1, 48.0)
...        child 2: RenderConstrainedBox#b709c relayoutBoundary=up4 NEEDS-PAINT
...          parentData: offset=Offset(137.1, 24.0); flex=null; fit=null (can use size)
...          constraints: BoxConstraints(0.0<=w<=Infinity, 0.0<=h<=730.2)
...          size: Size(10.0, 0.0)
...          additionalConstraints: BoxConstraints(w=10.0, 0.0<=h<=Infinity)
...        child 3: RenderSemanticsAnnotations#43cee relayoutBoundary=up4 NEEDS-PAINT
...          needs compositing
...          parentData: offset=Offset(147.1, 0.0); flex=3; fit=FlexFit.tight (can use size)
...          constraints: BoxConstraints(w=205.6, 0.0<=h<=730.2)
...          semantic boundary
...          size: Size(205.6, 48.0)
...  child 4: RenderStack#27154 relayoutBoundary=up1 NEEDS-LAYOUT NEEDS-PAINT
...    parentData: offset=Offset(376.7, 666.2); id=_ScaffoldSlot.floatingActionButton (can use size)
...    constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=770.2)
...    size: Size(0.0, 0.0)
...    alignment: Alignment.centerRight
...    textDirection: ltr
...    fit: loose
...    child 1: RenderTransform#d1e84 relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-PAINT
...      parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
...      constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=770.2)
...      size: Size(0.0, 0.0)
...      transform matrix: [0] 0.0,0.0,0.0,0.0
[1] 0.0,0.0,0.0,0.0
[2] 0.0,0.0,1.0,0.0
[3] 0.0,0.0,0.0,1.0
...      origin: null
...      alignment: Alignment.center
...      textDirection: ltr
...      transformHitTests: true
...      child: RenderTransform#20444 relayoutBoundary=up3 NEEDS-LAYOUT NEEDS-PAINT
...        parentData: <none> (can use size)
...        constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=770.2)
...        size: Size(0.0, 0.0)
...        transform matrix: [0] 0.7,0.7,0.0,0.0
[1] -0.7,0.7,0.0,0.0
[2] 0.0,0.0,1.0,0.0
[3] 0.0,0.0,0.0,1.0
...        origin: null
...        alignment: Alignment.center
...        textDirection: ltr
...        transformHitTests: true
====================================================================================================

解决方案

使用?

bottomNavigationBar  吸住底部 而不是使用Spacer() 隔开.

滑动需要保留。但是又不能出错?

代码

import 'package:anguo/utils/passport_manager.dart';
import 'package:flutter/material.dart';

class DestoryAccountPage extends StatefulWidget {
  final Color color;

  const DestoryAccountPage({Key? key, required this.color}) : super(key: key);

  @override
  _DestoryAccountPageState createState() => _DestoryAccountPageState();
}

class _DestoryAccountPageState extends State<DestoryAccountPage> {
  late String _email;
  late String _userName;

  @override
  void initState() {
    _email = PassportManager.getUserInfo()!.email!;
    _userName = PassportManager.getUserInfo()!.username!;
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text("注销账号"),
          backgroundColor: widget.color,
        ),
        bottomNavigationBar: SafeArea(
          child: Padding(
            padding: const EdgeInsets.all(20.0),
            child: Row(
              children: [
                Expanded(
                  flex: 2,
                  child: OutlinedButton(
                    onPressed: () {},
                    child: Text(
                      "确认注销",
                      style: TextStyle(color: Colors.grey),
                    ),
                    style: OutlinedButton.styleFrom(
                      shape: RoundedRectangleBorder(
                        borderRadius: BorderRadius.circular(18.0),
                      ),
                      side: BorderSide(width: 1, color: Colors.grey),
                    ),
                  ),
                ),
                SizedBox(
                  width: 10,
                ),
                Expanded(
                  flex: 3,
                  child: MaterialButton(
                    color: widget.color,
                    onPressed: () {},
                    child: Text(
                      "我再想想",
                      style: TextStyle(color: Colors.white),
                    ),
                    shape: RoundedRectangleBorder(
                      borderRadius: BorderRadius.circular(18.0),
                    ),
                  ),
                ),
              ],
            ),
          ),
        ),
        body: ListView(
          padding: EdgeInsets.all(20),
          shrinkWrap: true,
          children: [
            Text(
              "申请注销账号:${_userName}",
              style: TextStyle(
                  fontWeight: FontWeight.bold,
                  color: Colors.black87,
                  fontSize: 20),
            ),
            Text(
              "注销后无法恢复,请谨慎操作。",
              style: TextStyle(color: Colors.black87, fontSize: 16),
            ),
            SizedBox(
              height: 20,
            ),
            Row(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Container(
                  width: 10,
                  height: 10,
                  decoration: BoxDecoration(
                      color: Colors.black87,
                      borderRadius: BorderRadius.all(Radius.circular(5))),
                ),
                SizedBox(
                  width: 5,
                ),
                Text(
                  "清空与保留:",
                  style: TextStyle(
                      color: Colors.black87,
                      fontSize: 16,
                      fontWeight: FontWeight.bold),
                ),
              ],
            ),
            SizedBox(
              height: 5,
            ),
            Padding(
              padding: const EdgeInsets.only(left: 20),
              child: Text(
                "账号信息会被清空,个人发布的内容等信息不会被删除,您可以通过手动删除后再进行注销账号操作;",
                style: TextStyle(color: Colors.black87, fontSize: 16),
              ),
            ),
            SizedBox(
              height: 20,
            ),
            Row(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Container(
                  width: 10,
                  height: 10,
                  decoration: BoxDecoration(
                      color: Colors.black87,
                      borderRadius: BorderRadius.all(Radius.circular(5))),
                ),
                SizedBox(
                  width: 5,
                ),
                Text(
                  "无法使用账号",
                  style: TextStyle(
                      color: Colors.black87,
                      fontSize: 16,
                      fontWeight: FontWeight.bold),
                ),
              ],
            ),
            SizedBox(
              height: 5,
            ),
            Padding(
              padding: const EdgeInsets.only(left: 20),
              child: Text(
                "如果您确认注销,在安果开发的系列产品上面,您将无法继续使用此账号;",
                style: TextStyle(color: Colors.black87, fontSize: 16),
              ),
            ),
            SizedBox(
              height: 20,
            ),
            Row(
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Container(
                  width: 10,
                  height: 10,
                  decoration: BoxDecoration(
                      color: Colors.black87,
                      borderRadius: BorderRadius.all(Radius.circular(5))),
                ),
                SizedBox(
                  width: 5,
                ),
                Text(
                  "时效与不可撤销",
                  style: TextStyle(
                      color: Colors.black87,
                      fontSize: 16,
                      fontWeight: FontWeight.bold),
                ),
              ],
            ),
            SizedBox(
              height: 5,
            ),
            Padding(
              padding: const EdgeInsets.only(left: 20),
              child: Text(
                "删除后账号将立刻不能使用,而且此操作无法撤销;",
                style: TextStyle(color: Colors.black87, fontSize: 16),
              ),
            ),
            SizedBox(
              height: 20,
            ),
            Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                Container(
                  // margin: EdgeInsets.only(top: 4),
                  width: 10,
                  height: 10,
                  decoration: BoxDecoration(
                      color: Colors.black87,
                      borderRadius: BorderRadius.all(Radius.circular(5))),
                ),
                SizedBox(
                  width: 5,
                ),
                Expanded(
                  child: Text(
                    "点击“确认注销”将被视为您授权并认可系统清空以上信息",
                    style: TextStyle(
                        color: Colors.black87,
                        fontSize: 16,
                        fontWeight: FontWeight.bold),
                  ),
                ),
              ],
            ),
            SizedBox(
              height: 30,
            ),
            Text(
              "感谢您一直以来的陪伴。",
              style: TextStyle(
                  color: Colors.black87,
                  fontSize: 16,
                  fontWeight: FontWeight.bold),
            ),
          ],
        ));
  }
}

效果

?

  移动开发 最新文章
Vue3装载axios和element-ui
android adb cmd
【xcode】Xcode常用快捷键与技巧
Android开发中的线程池使用
Java 和 Android 的 Base64
Android 测试文字编码格式
微信小程序支付
安卓权限记录
知乎之自动养号
【Android Jetpack】DataStore
上一篇文章      下一篇文章      查看所有文章
加:2021-08-14 14:11:29  更:2021-08-14 14:11:32 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/18 23:55:05-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码