0

Is there any way to increase the time of splashcolor filling activity of InkWell? Default time is too slow for my work.

Here is my code

Padding(
  padding: EdgeInsets.all(25),
              child: Container(
                child: Stack(
                  children: [
                    Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: <Widget>[
                        Container(
                          padding: EdgeInsets.all(5),
                          height: 120,
                          width: 800,
                          decoration: BoxDecoration(
                            color: Colors.yellow,
                            borderRadius: BorderRadius.all(
                              Radius.circular(5),
                            ),
                          ),
                          child: Container(
                            height: 120,
                            width: 800,
                            color: Colors.teal,
                          ),
                        )
                      ],
                    ),
                    Positioned.fill(
                      child: Material(
                        color: Colors.transparent,
                        child: InkWell(
                          splashColor: Colors.red,
                          onTap: () {},
                        ),
                      ),
                    ),
                  ],
                ),
              ),            
            )

And here is the illustration enter image description here

xahid_rocks
  • 632
  • 8
  • 24

1 Answers1

1

You can Use splashFactory property in InkWell InkRipple.splashFactory, which defines a splash that spreads out more aggressively than the default.

InkWell( splashFactory: InkRipple.splashFactory, onTap: (){}, child:XWidget, ),