1

Now making some changes at the calling part it worked

enter image description here

I have Edited the source as per the answer mentioned below, nothing changes the output remains the same

Here are the changes that I made

Here is the output: it is now in oval shape, I need to change it in to rectangular shape.

Here is the output: it is now in oval shape, I need to change it in to rectangular shape]3

I'm using list_tile_switch and here is the code-snippet

  ListTileSwitch(
      value: _value,
      leading: Icon(Ionicons.moon),

      onChanged: (value) {
      setState(() {
      _value = value;
      });
      },
      visualDensity: VisualDensity.comfortable,
      switchType: SwitchType.cupertino,
      switchActiveColor: Colors.indigo,
      title: Text('Dark theme'),
      )
Nabil Nazar
  • 63
  • 1
  • 8
  • can you include what are you trying to archive ? – Md. Yeasin Sheikh Oct 07 '21 at 18:49
  • I was using ListTileSwitch widget in flutter, and it worked perfectly and I need to change defaulf oval chape to a rectangle shape and also need to increse the size the above is the current code. refernce: https://pub.dev/packages/list_tile_switch – Nabil Nazar Oct 08 '21 at 02:56
  • Please clarify which shape and size, for more read [how to ask](https://stackoverflow.com/help/how-to-ask) – Md. Yeasin Sheikh Oct 08 '21 at 12:48
  • I have edited the above post with a new link, it contains the current output image. I need shape to be in rectangle and wants to know how to change the size – Nabil Nazar Oct 09 '21 at 05:06
  • That's an in build future can be edited on source code, but it would be easy to create using custom widget with `AnimatedContainer,Stack`, you want i can share alternative way – Md. Yeasin Sheikh Oct 09 '21 at 12:50
  • please share @YeasinSheikh – Nabil Nazar Oct 09 '21 at 15:33

1 Answers1

0

An easy solution is just editing source code but not recommended, but we can make it local and edit the code and import to use it.

You need to comment this part

enter image description here

You can copy the full code and create another dart file to save it. and just import it to use.

Md. Yeasin Sheikh
  • 54,221
  • 7
  • 29
  • 56