No requires Android Studio 🥳
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
{ | |
"to": "token o topic", | |
"priority": "high", | |
"notification": { | |
"title": "Title of the notification", | |
"body": "Description of the notification", | |
"android_channel_id": "Android channel" | |
}, | |
"data": { |
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
import 'package:flutter/material.dart'; | |
enum DialogButtonStyle { | |
PRIMARY, | |
SECONDARY, | |
} | |
void main() { | |
runApp(App()); | |
} |
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
import 'dart:math'; | |
void main() async { | |
var pwd = await getRandomPwd(8); | |
print(pwd); | |
} | |
Future<String> getRandomPwd(int length) async { | |
if (length > 62) { | |
throw Error('The max length of the password could be 62'); |
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
/// Courtesy of https://stackoverflow.com/a/61929967/10670707 | |
Future<String> genRandomAlphanumeric(int length) async { | |
const _chars = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890'; | |
Random _rnd = Random(); | |
return String.fromCharCodes( | |
Iterable.generate( | |
length, | |
(_) => _chars.codeUnitAt(_rnd.nextInt(_chars.length)) | |
) | |
); |
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
const withPWA = require('next-pwa') | |
module.exports = withPWA({ | |
pwa: { | |
dest: 'public' | |
} | |
}) |
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
export class Environment { | |
static string(varName: string, defaultValue = ""): string { | |
const value = process.env[`REACT_APP_${varName}`]; | |
return value ?? defaultValue; | |
} | |
static int(varName: string, defaultValue = 0): number { | |
const value = process.env[`REACT_APP_${varName}`]; | |
if (value) { | |
return Number.parseInt(value, 10); |
Instalar Sonarlint
Lo primero es instalar la extensión Sonarlint en nuestro Code.
Crear un token
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
interface User { | |
name: string; | |
age: number; | |
birthDate: Date; | |
admin: boolean; | |
foo?: { | |
bar: string; | |
} | |
} |
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
import React, { useState } from "react"; | |
const JitsiMeet = () => { | |
const [jitsi, setJitsi] = useState<JitsiInstance | null>(null); | |
return null; | |
} |