Flutter 步骤进度组件

移动开发 作者: 2024-08-24 23:40:01
​老孟导读:最近文章更新拖后腿了,一直忙着网站改版的事情,今天总算落地了,全新的Flutter网站即将上线,敬请期待。网站目前收集197个组件的详细用法,还有150多个组件待整理。 Stepper S
Stepper(
  steps: <Step>[
    Step(
      title: Text('2020-4-23'),content: Text('今天是2020-4-23')
    ),Step(
        title: Text('2020-4-24'),content: Text('今天是2020-4-24')
    ),Step(
        title: Text('2020-4-25'),content: Text('今天是2020-4-25')
    ),],)
Step(
  title: Text('2020-4-23'),subtitle: Text('老孟'),content: Text('今天是2020-4-23')
)
Step(
  title: Text('2020-4-23'),content: Text('今天是2020-4-23'),state: StepState.complete
)
Stepper(
  onStepCancel: (){
    print('onStepCancel');
  },onStepContinue: (){
    print('onStepContinue');
  },onStepTapped: (index){
    print('onStepTapped:$index');
  },...
)
int _currentStep = 0;
Stepper(
      onStepTapped: (index) {
        setState(() {
          _currentStep = index;
        });
      },currentStep: _currentStep,...
)
Stepper(
  controlsBuilder: (BuildContext context,{VoidCallback onStepContinue,VoidCallback onStepCancel}){
    return Row(
      children: <Widget>[],);
  },...
)
Stepper(
  controlsBuilder: (BuildContext context,VoidCallback onStepCancel}){
    return Row(
      children: <Widget>[
        RaisedButton(
          child: Text('确定'),onPressed: onStepContinue,),RaisedButton(
          child: Text('取消'),onPressed: onStepCancel,...
)
Stepper(
  controlsBuilder: (BuildContext context,VoidCallback onStepCancel}){
    return Row(
      children: <Widget>[
        FlatButton(
          child: Text('确定'),FlatButton(
          child: Text('取消'),onStepTapped: (index) {
    setState(() {
      _currentStep = index;
    });
  },onStepContinue: (){},onStepCancel: (){},...
)
原创声明
本站部分文章基于互联网的整理,我们会把真正“有用/优质”的文章整理提供给各位开发者。本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
本文链接:http://www.jiecseo.com/news/show_68085.html
Flutter 步骤进度组件