动画正常运行 但控制台有一堆输出信息,请老师帮忙看下!
来源:7-6 动画Animation开发指南-AnimatedWidget与AnimatedBuilder-1【跟着做】
月风
2019-07-09
源代码如下
import 'package:flutter/material.dart';
class Animated extends StatefulWidget {
@override
AppState createState()=> AppState();
}
class AppState extends State<Animated> with SingleTickerProviderStateMixin{
Animation<double> animation;
AnimationController controller;
AnimationStatus animationStatus;
double animationValue;
@override
void initState() {
super.initState();
controller =AnimationController(vsync: this,duration: Duration(seconds: 2));
animation =Tween<double>(begin: 0,end: 300).animate(controller)
..addListener((){
//动画监听
setState(() {
animationValue= animation.value;
});
})
..addStatusListener((AnimationStatus state){
//state监听
setState(() {
animationStatus= state;
});
});
}
@override
void dispose() {
controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Container(
child: Column(
children: <Widget>[
GestureDetector(
onTap: (){
controller.reset();
controller.forward();
},
child: Text('data'),
),
Container(
height: animation.value,
width: animation.value,
child: FlutterLogo(),
)
],
),
);
}
}
输出信息如下
D/skia ( 5363): Errors:
D/skia ( 5363): ERROR: 0:3: 'GL_EXT_shader_framebuffer_fetch' : extension is not supported
D/skia ( 5363): ERROR: 0:5: 'inout' : syntax error
D/skia ( 5363):
D/skia ( 5363): GLSL compilation error
D/skia ( 5363): ----------------------
D/skia ( 5363): GLSL:
D/skia ( 5363): 1 #version 300 es
D/skia ( 5363): 2
D/skia ( 5363): 3 #extension GL_EXT_shader_framebuffer_fetch : require
D/skia ( 5363): 4 precision mediump float;
D/skia ( 5363): 5 inout mediump vec4 sk_FragColor;
D/skia ( 5363): 6 uniform mediump vec4 uleftBorderColor_Stage1_c0;
D/skia ( 5363): 7 uniform mediump vec4 urightBorderColor_Stage1_c0;
D/skia ( 5363): 8 uniform sampler2D uTextureSampler_0_Stage1;
D/skia ( 5363): 9 in mediump vec4 vQuadEdge_Stage0;
D/skia ( 5363): 10 in mediump vec4 vinColor_Stage0;
D/skia ( 5363): 11 in highp vec2 vTransformedCoords_0_Stage0;
D/skia ( 5363): 12 void main() {
D/skia ( 5363): 13 mediump vec4 outputCoverage_Stage0;
D/skia ( 5363): 14 {
D/skia ( 5363): 15 mediump float edgeAlpha;
D/skia ( 5363): 16 mediump vec2 duvdx = dFdx(vQuadEdge_Stage0.xy);
D/skia ( 5363): 17 mediump vec2 duvdy = -dFdy(vQuadEdge_Stage0.xy);
D/skia ( 5363): 18 if (vQuadEdge_Stage0.z > 0.0 && vQuadEdge_Stage0.w > 0.0) {
D/skia ( 5363): 19 edgeAlpha = min(min(vQuadEdge_Stage0.z, vQuadEdge_Stage0.w) + 0.5, 1.0);
D/skia ( 5363): 20 } else {
D/skia ( 5363): 21 mediump vec2 gF = vec2((2.0 * vQuadEdge_Stage0.x) * duvdx.x - duvdx.y, (2.0 * vQuadEdge_Stage0.x) * duvdy.x - duvdy.y);
D/skia ( 5363): 22 edgeAlpha = vQuadEdge_Stage0.x * vQuadEdge_Stage0.x - vQuadEdge_Stage0.y;
D/skia ( 5363): 23 edgeAlpha = clamp(0.5 - edgeAlpha / length(gF), 0.0, 1.0);
D/skia ( 5363): 24 }
D/skia ( 5363): 25 outputCoverage_Stage0 = vec4(edgeAlpha);
D/skia ( 5363): 26 }
D/skia ( 5363): 27 mediump vec4 output_Stage1;
D/skia ( 5363): 28 {
D/skia ( 5363): 29 mediump vec4 _child0;
D/skia ( 5363): 30 {
D/skia ( 5363): 31 mediump vec4 _child1_c0;
D/skia ( 5363): 32 {
D/skia ( 5363): 33 mediump float t = vTransformedCoords_0_Stage0.x + 1.0000000000000001e-05;
D/skia ( 5363): 34 _child1_c0 = vec4(t, 1.0, 0.0, 0.0);
D/skia ( 5363): 35 }
D/skia ( 5363): 36 mediump vec4 t = _child1_c0;
D/skia ( 5363): 37 if (t.x < 0.0) {
D/skia ( 5363): 38 _child0 = uleftBorderColor_Stage1_c0;
D/skia ( 5363): 39 } else if (t.x > 1.0) {
D/skia ( 5363): 40 _child0 = urightBorderColor_Stage1_c0;
D/skia ( 5363): 41 } else {
D/skia ( 5363): 42 mediump vec4 _child0_c0;
D/skia ( 5363): 43 mediump vec4 _childInput_c0_c1 = t;
D/skia ( 5363): 44 {
D/skia ( 5363): 45 mediump vec2 coord = vec2(_childInput_c0_c1.x, 0.5);
D/skia ( 5363): 46 _child0_c0 = texture(uTextureSampler_0_Stage1, coord).xyzw;
D/skia ( 5363): 47 }
D/skia ( 5363): 48 _child0 = _child0_c0;
D/skia ( 5363): 49 }
D/skia ( 5363): 50 {
D/skia ( 5363): 51 _child0.xyz *= _child0.w;
D/skia ( 5363): 52 }
D/skia ( 5363): 53 }
D/skia ( 5363): 54 output_Stage1 = _child0;
D/skia ( 5363): 55 }
D/skia ( 5363): 56 {
D/skia ( 5363): 57 mediump vec4 _dstColor = sk_FragColor;
D/skia ( 5363): 58 sk_FragColor.w = output_Stage1.w + (1.0 - output_Stage1.w) * _dstColor.w;
D/skia ( 5363): 59 sk_FragColor.xyz = ((1.0 - output_Stage1.w) * _dstColor.xyz + (1.0 - _dstColor.w) * output_Stage1.xyz) + output_Stage1.xyz * _dstColor.xyz;
D/skia ( 5363): 60 sk_FragColor = outputCoverage_Stage0 * sk_FragColor + (vec4(1.0) - outputCoverage_Stage0) * _dstColor;
D/skia ( 5363): 61 }
D/skia ( 5363): 62 }
D/skia ( 5363): 63
写回答
1回答
-
CrazyCodeBoy
2019-07-11
Flutter的log信息,不影响,可忽略
00
相似问题