Aprende a usar el diseñador visual drag & drop de Pocket Code para crear interfaces móviles y exportar código React o Flutter.
El módulo de diseñador visual de Pocket Code te permite crear interfaces de usuario arrastrando componentes, sin escribir una línea de código. Cuando terminas, exporta a React o Flutter.
Al abrir el diseñador, selecciona el tipo de proyecto:
La barra lateral izquierda tiene todos los componentes disponibles:
Básicos:
Formularios:
Layout:
Navegación:
Cada componente tiene un panel de propiedades donde puedes configurar:
Propiedades — Button
────────────────────
Text: "Sign In"
Background: #3b82f6
Text Color: #ffffff
Radius: 8px
Padding: 12px 24px
Font: Inter, 14px, Bold
Shadow: 0 2px 4px rgba(0,0,0,0.1)
────────────────────
Events:
onClick → navigate("/home")
onLongPress → showMenu()
Mientras diseñas, la vista previa se actualiza instantáneamente. Puedes:
Vamos a crear una pantalla de login paso a paso:
Arrastra un Container vertical al lienzo y configúralo:
Añade un Image en la parte superior:
Añade dos Input y un Button:
| Componente | Propiedades |
|---|---|
| Input 1 | placeholder: "Email", type: email, icon: 👤 |
| Input 2 | placeholder: "Password", type: password, icon: 🔒 |
| Button | text: "Sign In", bg: #3b82f6, fullWidth: true |
Cuando tu diseño está listo, toca Export y elige el formato:
export default function LoginScreen() {
return (
<div className="flex flex-col items-center justify-center min-h-screen p-6 bg-white">
<img src="/logo.png" alt="Logo" className="w-20 mb-8" />
<div className="w-full max-w-sm space-y-4">
<input
type="email"
placeholder="Email"
className="w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500"
/>
<input
type="password"
placeholder="Password"
className="w-full px-4 py-3 border rounded-lg focus:ring-2 focus:ring-blue-500"
/>
<button className="w-full py-3 text-white bg-blue-500 rounded-lg font-semibold hover:bg-blue-600">
Sign In
</button>
</div>
<p className="mt-4 text-sm text-gray-500">¿Olvidaste tu contraseña?</p>
</div>
);
}
class LoginScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Padding(
padding: const EdgeInsets.all(24.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset('assets/logo.png', width: 80),
const SizedBox(height: 32),
TextField(
decoration: InputDecoration(
hintText: 'Email',
prefixIcon: Icon(Icons.person),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
),
),
),
const SizedBox(height: 16),
TextField(
obscureText: true,
decoration: InputDecoration(
hintText: 'Password',
prefixIcon: Icon(Icons.lock),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
),
),
),
const SizedBox(height: 16),
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: () {},
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(vertical: 16),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
child: const Text('Sign In'),
),
),
],
),
),
),
);
}
}
El diseñador incluye plantillas para empezar rápido:
El diseñador visual elimina la barrera entre idea y código. Diseña, previsualiza y exporta — todo desde tu teléfono Android.