'How to use a package and remove AutomaticKeepAliveClientMixin?

I am using this package: https://pub.dev/packages/toggle_switch which has AutomaticKeepAliveClientMixin. Is it possible for me to remove this AutomaticKeepAliveClientMixin without modifying the base package?

class _ToggleSwitchState extends State<ToggleSwitch>
    with AutomaticKeepAliveClientMixin<ToggleSwitch> {
...
}

Edit: I tried to add this on my own class to try to remove it but it wont work.

  @override
  bool get wantKeepAlive => false;


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source