benjamin-kraatz / material_segmented_control

A Material styled segmented control with full control over behavior and design.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make Material Widget the base component to work with Cupertino based apps

vinsalmont opened this issue · comments

It will be interesting if the parent widget of the component to be the Material widget, so it can work with Cupertino based apps.

....... code
 return Material(
      child: InkWell(  
           splashColor: Colors.red,
           highlightColor: Colors.greenAccent,
           child: Padding(
           padding: widget.horizontalPadding.resolve(Directionality.of(context)),
           child: UnconstrainedBox(
             constrainedAxis: Axis.horizontal,
             child: box,
            ),
          ),
        ),
      );
    }
}

Thanks for your report!
A PR is also very welcome.
You can now get the new version 2.0.5 from pub.dev.

If you find more things to change or improve, tell it!

Thanks ❤️