当前位置:网站首页>[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,),
边栏推荐
- High resolution network (Part 1): Principle Analysis
- Database SQL language 02 connection query
- CF1617B Madoka and the Elegant Gift、CF1654C Alice and the Cake、 CF1696C Fishingprince Plays With Arr
- Pytest learning notes (12) -allure feature · @allure Step () and allure attach
- [interview question] 1369 when can't I use arrow function?
- Arduino DY-SV17F自动语音播报
- CF1617B Madoka and the Elegant Gift、CF1654C Alice and the Cake、 CF1696C Fishingprince Plays With Arr
- [Androd] Gradle 使用技巧之模块依赖替换
- QTableWidget懒加载剩内存,不卡!
- C language course information management system
猜你喜欢
[Androd] Gradle 使用技巧之模块依赖替换
How is the mask effect achieved in the LPL ban/pick selection stage?
Give you an array numbers that may have duplicate element values. It was originally an array arranged in ascending order, and it was rotated once according to the above situation. Please return the sm
一位苦逼程序员的找工作经历
[Arduino experiment 17 L298N motor drive module]
力扣 204. 计数质数
Force buckle 204 Count prime
Telecom Customer Churn Prediction challenge
MySQL --- 数据库查询 - 基本查询
Arduino dy-sv17f automatic voice broadcast
随机推荐
Basic concept and implementation of overcoming hash
Druid database connection pool
What is tone. Diao's story
音程的知识的总结
tp6快速安装使用MongoDB实现增删改查
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
openresty 缓存
按鍵精靈打怪學習-多線程後臺坐標識別
Common English Vocabulary
Learn the five skills you need to master in cloud computing application development
【第29天】给定一个整数,请你求出它的因子数
Steps to obtain SSL certificate private key private key file
MySQL - database query - basic query
Database SQL language 02 connection query
MySQL
d,ldc構建共享庫
Basic remote connection tool xshell
给你一个可能存在 重复 元素值的数组 numbers ,它原来是一个升序排列的数组,并按上述情形进行了一次旋转。请返回旋转数组的最小元素。【剑指Offer】
【数据挖掘】任务6:DBSCAN聚类
Using tensorboard to visualize the model, data and training process