Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

292
Views
Slider switch in Flutter

I want to make a sliding switch like this

enter image description here

and I also made it through CupertinoSlidingSegmentedControl() but it is not meeting my requirements. I would like a similar slider switch.

I've made like this.

enter image description here

Neumorphic(
              style: NeumorphicStyle(
                  depth: NeumorphicTheme.embossDepth(context),
                  boxShape: const NeumorphicBoxShape.stadium(),
                  intensity: 1),
              child: ToggleSwitch(
                minWidth: 120.0,
                minHeight: 70,
                cornerRadius: 50.0,
                activeBgColors: const [
                  [Colors.cyan],
                  [Colors.cyan]
                ],
                inactiveBgColor: Colors.grey[200],
                inactiveFgColor: Colors.grey,
                totalSwitches: 2,
                labels: ['Agency', 'Freelancer'],
                radiusStyle: true,
                onToggle: (index) {},
              ),
            
            ),
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

you can use this package toggle_switch: ^1.4.0 and create it like this

SizedBox(
      height: 40,
      child: ToggleSwitch(
        minWidth: 90.0,
        cornerRadius: 20.0,
        activeBgColors: [const [Colors.cyan],const [Colors.cyan]],
        activeFgColor: Colors.white,
        inactiveBgColor: Colors.grey,
        inactiveFgColor: Colors.white,
        initialLabelIndex: 1,
        totalSwitches: 2,
        labels: ['Agency', 'Freelancer'],
        radiusStyle: true,
        onToggle: (index) {
          print('switched to: $index');
        },
      ),
    ),
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!