• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

152
Vistas
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) {},
              ),
            
            ),
about 3 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

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');
        },
      ),
    ),
about 3 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda