Flutter Widget之ProgressIndicator

Widget:https://flutter.io/docs/development/ui/widgets
LinearProgressIndicator:https://docs.flutter.io/flutter/material/LinearProgressIndicator-class.html
CircularProgressIndicator:https://docs.flutter.io/flutter/material/CircularProgressIndicator-class.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import 'package:flutter/material.dart';

class ProgressIndicatorDemoPage extends StatefulWidget {
@override
State<StatefulWidget> createState() => new _ProgressIndicatorDemoPagePageState();
}

class _ProgressIndicatorDemoPagePageState extends State<ProgressIndicatorDemoPage> {
@override
void initState() {
super.initState();
}

Widget build(BuildContext context) {
return Scaffold(
appBar: new AppBar(
title: new Text('ProgressIndicator Demo'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
CircularProgressIndicator(
value: 0.6,
strokeWidth: 4.0,
backgroundColor: Colors.teal,
valueColor: AlwaysStoppedAnimation(Colors.yellow)
),
SizedBox(height: 10),
LinearProgressIndicator(
value: 0.6,
backgroundColor: Colors.teal.shade600,
valueColor: AlwaysStoppedAnimation(Colors.yellow),
)
],
)
)
);
}
}

Flutter Widget ProgressIndicator

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :