当前位置:网站首页>[error record] the shutter component reports an error (no directionality widget found. | richtext widgets require a directionality)
[error record] the shutter component reports an error (no directionality widget found. | richtext widgets require a directionality)
2022-07-03 01:33:00 【Programmer community】
One 、 Error message
Error message :
Performing hot reload...Syncing files to device Pixel 2...Reloaded 0 libraries in 353ms.======== Exception caught by widgets library =======================================================The following assertion was thrown building Text(" Animation state : null"):No Directionality widget found.RichText widgets require a Directionality widget ancestor.The specific widget that could not find a Directionality ancestor was: RichText softWrap: wrapping at box width maxLines: unlimited text: " Animation state : null" dirtyThe ownership chain for the affected widget is: "RichText ← Text ← Column ← Padding ← Container ← AnimationApp ← [root]"Typically, the Directionality widget is introduced by the MaterialApp or WidgetsApp widget at the top of your application widget tree. It determines the ambient reading direction and is used, for example, to determine how to lay out text, how to interpret "start" and "end" values, and to resolve EdgeInsetsDirectional, AlignmentDirectional, and other *Directional objects.The relevant error-causing widget was: Text file:///D:/002_Project/002_Android_Learn/flutter_animation/lib/main.dart:118:11When the exception was thrown, this was the stack: #0 debugCheckHasDirectionality.<anonymous closure> (package:flutter/src/widgets/debug.dart:272:7)#1 debugCheckHasDirectionality (package:flutter/src/widgets/debug.dart:292:4)#2 RichText.createRenderObject (package:flutter/src/widgets/basic.dart:5539:37)#3 RenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5423:28)#4 MultiChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:6166:11)...============================================================================================================ Exception caught by widgets library =======================================================No Directionality widget found.The relevant error-causing widget was: Text file:///D:/002_Project/002_Android_Learn/flutter_animation/lib/main.dart:120:11============================================================================================================ Exception caught by rendering library =====================================================A RenderFlex overflowed by 199358 pixels on the bottom.The relevant error-causing widget was: Column file:///D:/002_Project/002_Android_Learn/flutter_animation/lib/main.dart:96:14====================================================================================================
Error component :
Text(" Animation state : $animationStatus"),Text(" Animation values : $animationValue"),
Two 、 Solution
Flutter in Text Component needs to set text direction ;
The revised code is :
Text(" Animation state : $animationStatus", textDirection: TextDirection.ltr,),Text(" Animation values : $animationValue", textDirection: TextDirection.ltr,),
边栏推荐
- 一比特苦逼程序員的找工作經曆
- 电信客户流失预测挑战赛
- Meituan dynamic thread pool practice ideas, open source
- [Cao gongzatan] after working in goose factory for a year in 2021, some of my insights
- 按鍵精靈打怪學習-多線程後臺坐標識別
- Basis of information entropy
- What is tone. Diao's story
- Appuyez sur l'apprentissage de l'esprit de frappe - reconnaissance des coordonnées de fond multithreadées
- LeetCode 987. Vertical order transverse of a binary tree - Binary Tree Series Question 7
- Machine learning terminology
猜你喜欢
[fh-gfsk] fh-gfsk signal analysis and blind demodulation research
What is tone. Diao's story
[flutter] icons component (fluttericon Download Icon | customize SVG icon to generate TTF font file | use the downloaded TTF icon file)
Basic remote connection tool xshell
【数据挖掘】任务5:K-means/DBSCAN聚类:双层正方形
CF1617B Madoka and the Elegant Gift、CF1654C Alice and the Cake、 CF1696C Fishingprince Plays With Arr
MySQL - database query - condition query
[my advanced journey of OpenGL learning] collation of Euler angle, rotation order, rotation matrix, quaternion and other knowledge
Work experience of a hard pressed programmer
Machine learning terminology
随机推荐
电信客户流失预测挑战赛
测试右移:线上质量监控 ELK 实战
High resolution network (Part 1): Principle Analysis
wirehark数据分析与取证A.pacapng
C#应用程序界面开发基础——窗体控制(3)——文件类控件
SSL flood attack of DDoS attack
Mathematical Knowledge: Steps - Nim Games - Game Theory
[FPGA tutorial case 6] design and implementation of dual port RAM based on vivado core
[system analyst's road] Chapter V double disk software engineering (development model development method)
ThinkPHP+Redis实现简单抽奖
MySQL foundation 07-dcl
Soft exam information system project manager_ Real topic over the years_ Wrong question set in the second half of 2019_ Morning comprehensive knowledge question - Senior Information System Project Man
The industrial scope of industrial Internet is large enough. The era of consumer Internet is only a limited existence in the Internet industry
Appuyez sur l'apprentissage de l'esprit de frappe - reconnaissance des coordonnées de fond multithreadées
Basic remote connection tool xshell
SwiftUI 组件大全之使用 SceneKit 和 SwiftUI 构建交互式 3D 饼图(教程含源码)
Machine learning terminology
[understanding of opportunity -36]: Guiguzi - flying clamp chapter - prevention against killing and bait
Dotconnect for PostgreSQL data provider
GDB 在嵌入式中的相关概念