This file contains 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
# Clang as the compiler. | |
CXX=clang++ | |
# The project name as the target. | |
TARGET=my_cool_project | |
# Paths to app and include directories from the root path. | |
# The folder structure is as follows. |
This file contains 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
// This is the variable that stores the image URL. | |
String imageUrl = ''; | |
// This is the variable that stores the image extension. | |
String ext = ''; | |
// This is the function to fetch the image from the storage. |
This file contains 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
// Here we get an instance to Firebase Storage. | |
FirebaseStorage _storage = FirebaseStorage.instance; | |
// This async function gets the image from the gallery | |
// and upload it to Firebase Storage. | |
Future uploadImage() async { | |
var image = await ImagePicker.pickImage( | |
source: ImageSource.gallery, |
This file contains 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
// Logged status. | |
bool isLogged = false; | |
// Firebase authentication instance. | |
FirebaseAuth _auth = FirebaseAuth.instance; | |
// The init state will check the logged status of the user. |
This file contains 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
body: StreamBuilder( | |
stream: Firestore.instance | |
.collection('feed') | |
.where('email', isEqualTo: '[email protected]') | |
.snapshots(), | |
builder: (context, snapshot) { | |
if (!snapshot.hasData) { | |
return Text('Loading...'); | |
} | |
return ListView.builder( |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Web 101</title> | |
<link rel="stylesheet" href="style.css"> | |
<script src="index.js" defer></script> | |
</head> |
This file contains 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
function handleClick() { | |
// 1. Selecciona el botón. | |
const button = document.querySelector('input[type=button]'); | |
// 2. Cambia el color de verde a rojo. | |
button.style.backgroundColor = 'red'; | |
// 3. Cambia el texto de "Click Me!" a "See You!". | |
button.value = 'See You!'; |
This file contains 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
input[type=button] { | |
background-color: green; | |
border: none; | |
color: white; | |
padding: 15px 32px; | |
text-align: center; | |
text-decoration: none; | |
font-size: 16px; | |
} |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Web 101</title> | |
</head> | |
<body> |
This file contains 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
import 'package:flutter/material.dart'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', |
NewerOlder