我想知道是否有办法更改线性和圆形进度条的宽度/长度/高度。我正在尝试使用它制作XP栏,但不确定是否可行。另外,我知道这些值只能通过0.0和1.0来表示,但我也认为有可能(不确定)我可以制定一个仍可以使用的公式。
我试图在工具栏操作 [] 中设置固定大小的 CircularProgressIndicator,但它给了我不合适的大小,我正在使用的代码,
Scaffold(
appBar: AppBar(
centerTitle: true,
title: Text(Lang.postDetails),
actions: <Widget>[
Container(
width: 16,
height: 16,
child: CircularProgressIndicator(),
)
Run Code Online (Sandbox Code Playgroud)
和我得到的输出,
我看到了这个问题和这个问题,但它不能解决我的问题。我尝试了SizedBox和SizedBox.fromSize,BoxConstraints但它们都不起作用。
我该如何处理?
\n\nimport \'package:flutter/material.dart\';\nimport \'package:mymovie/bloc_helpers/bloc_event_state_builder.dart\';\nimport \'package:mymovie/logics/intro/intro.dart\';\nimport \'package:mymovie/resources/strings.dart\';\nimport \'package:mymovie/utils/bloc_navigator.dart\';\nimport \'package:mymovie/utils/bloc_snackbar.dart\';\nimport \'package:mymovie/utils/service_locator.dart\';\n\nclass IntroScreen extends StatefulWidget{\n\n @override\n _IntroScreenState createState() => _IntroScreenState();\n}\n\nclass _IntroScreenState extends State<IntroScreen> with SingleTickerProviderStateMixin{\n\n final IntroBloc introBloc = sl.get<IntroBloc>();\n AnimationController animationController;\n Animation buttonSqueeze;\n\n @override\n void initState() {\n super.initState();\n animationController = AnimationController(\n duration: const Duration(milliseconds: 1500),\n vsync: this\n );\n buttonSqueeze = Tween(\n begin: 320.0,\n end: 70.0\n ).animate(CurvedAnimation(\n parent: animationController,\n curve: Interval(0.0,0.250)\n ));\n animationController.addListener(() {\n if(animationController.isCompleted) {\n introBloc.emitEvent(IntroEventKakaoLogin());\n }\n });\n }\n\n …Run Code Online (Sandbox Code Playgroud)