美文网首页Flutter教学
Flutter(36):Cupertino组件之Cupertin

Flutter(36):Cupertino组件之Cupertin

作者: starryxp | 来源:发表于2020-10-06 13:23 被阅读0次

    Flutter教学目录持续更新中

    Github源代码持续更新中

    1.CupertinoActivityIndicator介绍

    • CupertinoActivityIndicator:ios风格的loading
    • CupertinoActivityIndicator.partiallyRevealed:ios loading 风格的进度指示器

    2.CupertinoActivityIndicator属性

    • animating = true:是否执行动画
    • radius = _kDefaultIndicatorRadius:loading的大小

    3.CupertinoActivityIndicator.partiallyRevealed

    • radius = _kDefaultIndicatorRadius:loading的大小
    • progress = 1.0:进度 0~1
    1601870645(1).png
    class _CupertinoActivityIndicatorPageState
        extends State<CupertinoActivityIndicatorPage> {
      _myCupertinoActivityIndicator() {
        return CupertinoActivityIndicator(
          animating: true,
          radius: 20,
        );
      }
    
      _myCupertinoActivityIndicatorPartiallyRevealed() {
        return CupertinoActivityIndicator.partiallyRevealed(
          radius: 20,
          progress: 0.5,
        );
      }
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            title: Text('CupertinoActivityIndicator'),
          ),
          body: SingleChildScrollView(
            child: ListBody(
              children: [
                _myCupertinoActivityIndicator(),
                _myCupertinoActivityIndicatorPartiallyRevealed(),
              ],
            ),
          ),
        );
      }
    }
    

    下一节:Cupertino组件之CupertinoAlertDialog

    Flutter(37):Cupertino组件之CupertinoAlertDialog

    Flutter教学目录持续更新中

    Github源代码持续更新中

    相关文章

      网友评论

        本文标题:Flutter(36):Cupertino组件之Cupertin

        本文链接:https://www.haomeiwen.com/subject/pbhauktx.html