This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// SINTAXIS DE UN PROGRAMA EN DART | |
/// 1. Inicio del programa | |
/// 2. Intrucci贸n 1; | |
/// 3. Intrucci贸n 2; | |
/// 4. Intrucci贸n 3; | |
/// ... | |
/// N. Fin del programa | |
/// Funci贸n "main" Marca el inicio y fin | |
/// de nuestro programa |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
/// VARIABLES EN DART | |
/// Sintaxis1: tipo nombre = valor; | |
/// Sintaxis2: tipo nombre; | |
/// | |
/// FASE DE UNA VARIABLE | |
/// | |
/// 1. Declaraci贸n: | |
/// var peso; | |
/// 2. Inicializaci贸n: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
/// OPERADORES | |
/// Operador Aritmeticos | |
/// + : suma | |
/// - : resta | |
/// * : multiplicaci贸n | |
/// / : divisi贸n | |
/// Ejemplos |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
/// TIPOS DE VARIABLES | |
// +++++++++++++++++++++++++++ | |
/// variable (var): Se pueden reasignar. | |
/// var a = 50; | |
/// a = 80; | |
/// a = 0; | |
/// int b = 10; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
/// LISTAS: | |
/// Una lista es una colecci贸n ordenada de elementos que | |
/// pueden ser del mismo tipo o de tipos diferentes. | |
/// Sintaxis: List nombre = []; | |
// final List<String> heroes = ['Superman', 'Spiderman', 'Flash']; | |
/// Imprimir: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
/// MAPs | |
/// un mapa (map) es una colecci贸n de pares | |
/// clave-valor, donde cada clave es 煤nica y | |
/// est谩 asociada a un valor. | |
/// Sintaxis: Map nombre = {key: value}; | |
/// final Map<int, String> dias = { | |
/// 1: 'Lunes', | |
/// 2: 'Martes', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
/// EXPRESIONES CONDICIONALES | |
/// Las expresiones condicionales if y else | |
/// se utilizan para tomar decisiones en funci贸n | |
/// de si una condici贸n dada es verdadera o falsa. | |
/// final bool estaSoleado = true; | |
///if (estaSoleado) { | |
/// print('Ponte gafas de sol'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
/// Bucle while: | |
/// El bucle while se utiliza para repetir | |
/// una serie de intrucciones mientras una | |
/// condici贸n sea verdadera. | |
/// Sintaxis: | |
/// while(condic铆on) { | |
/// -- C贸digo que queremos ejecutar repetidamente. | |
/// } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
/// Bucle FOR | |
/// El bucle for es 煤til cuando se | |
/// conoce de antemano el n煤mero de iteraciones | |
/// que se deben realizar. | |
/// Sintaxis: | |
/// for (inicializaci贸n; condici贸n; actualizaci贸n) { | |
/// -- C贸digo a ejecutar en cada iteraci贸n -- | |
/// } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// FUNCIONES !!! | |
/// 1. Las funciones permiten encapsular | |
/// un conjunto de instrucciones | |
/// en un bloque reutilizable. | |
/// 2. Pueden aceptar par谩metros de entrada. | |
/// 3. Pueden devolver un valor como resultado | |
/// (o simplemente ejecutar un conjunto de |
OlderNewer