在花费时间从Firestore提取数据时如何使用循环进度指示器
并且我希望该指示器位于圆盘传送带内,以及如何为该指示器赋予2种颜色,例如本视频https://youtu.be/O-rhXZLtpv0
这是我的代码
child: Material(
borderRadius: BorderRadius.circular(24.0),
child: SizedBox(
width: SizeConfig.safeBlockHorizontal * 80,
height: SizeConfig.safeBlockHorizontal * 80,
child: StreamBuilder<QuerySnapshot>(
stream: Firestore.instance.collection('About').snapshots(),
builder: (context, snapshot) {
if (!snapshot.hasData) {
return Center(
child: CircularProgressIndicator(
),
);
}
else {
return ListView.builder(
itemCount: snapshot.data.documents.length,
itemBuilder: (BuildContext context, int index) {
_listOfImages = [];
for (int i = 0;
i < snapshot.data.documents[index].data['image'].length;
i++
)
{
_listOfImages.add(Image.network(snapshot
.data.documents[index].data['image'][i],fit:BoxFit.fill));
}
return ClipRRect(
borderRadius: BorderRadius.circular(23.0),
child: Container(
width: SizeConfig.safeBlockHorizontal * 5 ,
height:SizeConfig.safeBlockVertical * 39,
child: Carousel(
boxFit: BoxFit.fill,
dotBgColor: Colors.transparent,
dotIncreasedColor: Colors.lightBlue,
dotSize: 6.0,
images:
_listOfImages
答案 0 :(得分:0)
void initState() {
_animationController = AnimationController(
vsync: this,
duration: Duration(seconds:widget.duration));
_colorTween = _animationController.drive(
ColorTween(begin: Colors.yellow,end: Colors.blue));
_animationController.repeat();
super.initState();
}
builder: (context, snapshot) {
if (!snapshot.hasData) {
return Center(child: CircularProgressIndicator(valueColor: _colorTween,),);
}
}
答案 1 :(得分:0)
My application name - applicationmain.war
resides at - /opt/tomcat/webapps/applicationmain.war
there is also a folder created whenever I deploy the war file - /opt/tomcat/webapps/applicationmain
I tried assiging all permissions to both the war file itself and the folder that is created when deploying the war file with no luck