Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

519
Vistas
¿Cómo colocar dos switchListTIles uno al lado del otro, como en una fila en flutter?

Quería hacer 2 cosas en flutter:

  1. cambie el espacio entre el título y el interruptor de un switchlisttile().
  2. coloque dos switchlistTiles uno al lado del otro en una fila. Por alguna razón, esto da un error en flutter.

Gracias.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

al dar altura, no tengo ningún error, solo un intento de demostración, podría ayudar a importar 'paquete: aleteo/material.dart';

 void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: const MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({Key? key, required this.title}) : super(key: key); final String title; @override State<MyHomePage> createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; double ?height ; double ?width ; void _incrementCounter() { setState(() { _counter++; }); } @override Widget build(BuildContext context) { height = MediaQuery.of(context).size.height; width = MediaQuery.of(context).size.width; bool ans = false; bool anss = false; return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Row( children: [ Container( height: height!/10, width: width!/2, child: SwitchListTile( title: const Text('Lights'), value: ans, onChanged: (bool value) { setState(() { ans = value; }); }, secondary: const Icon(Icons.lightbulb_outline), ), ), Container( height: height!/10, width: width!/2, child: SwitchListTile( title: const Text('hhh'), value: anss, onChanged: (bool value) { setState(() { anss = value; }); }, secondary: const Icon(Icons.lightbulb_outline), ), ) ], ), ], ), ), // This trailing comma makes auto-formatting nicer for build methods. ); } }
over 4 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 Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda