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
enum DocumentStatus { | |
pending, | |
approved, | |
rejected | |
} | |
class Document { | |
String title; | |
String content; | |
DocumentStatus status; |
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
enum DocumentStatus{ | |
pending, | |
approved, | |
rejected | |
} | |
class Document { | |
String title; | |
String content; | |
DocumentStatus status; |
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:convert'; | |
void main() { | |
print('toJson() deve ser chamado ao usar jsonEncode()'); | |
final produto = ProdutoSpy('Camiseta', 29.99); | |
print(jsonEncode(produto)); |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
import 'dart:math'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { |
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 do LayoutManager | |
abstract class LayoutManager { | |
void paintDarkMode(); | |
void paintLightMode(); | |
} | |
// Implementação Dummy do LayoutManager | |
class LayoutManagerDummy implements LayoutManager { | |
@override |
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
enum PizzaAPIError { offline, unauthorized } | |
class Pizza { | |
final String name; | |
Pizza(this.name); | |
} | |
class Result<T, E> { | |
final T? success; |
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 sharp = require('sharp'); | |
const imagePath = './imagens/to_split.png'; | |
sharp(imagePath) | |
.metadata() | |
.then(async metadata => { | |
// Divide a largura e altura da imagem em duas partes | |
const halfWidth = Math.floor(metadata.width / 2); | |
const halfHeight = Math.floor(metadata.height / 2); |
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
Add no Path da variavel de ambiente a pasta | |
C:\flutter\bin | |
Download Android Platform Tools 5MB. | |
https://developer.android.com/tools/releases/platform-tools | |
Extrair para C:\android\platform-tools | |
Download Android Command Line Tools 115MB Ou Android Studio. | |
https://developer.android.com/studio | |
Extrair para C:\android\cmdline-tools. |
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
//A POO Programação Orientada a Objetos | |
//foi criada na década de 1970 por Alan Kay, com o objetivo de se | |
//opor a outros paradigmas (como a programação funcional) e aproximar | |
//os softwares dos seres humanos. | |
void main() { | |
print("olá mundo"); | |
// Map aluno = {"nome": "Natã", "idade": 19}; | |
//Tipo variavel = Contrutor(parametros); |
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() { | |
// Desenvolva um sistema de gerenciamento de | |
// tarefas utilizando maps e funções. | |
// cria uma função com parametros para criar cada | |
// tarefa ; | |
// cada tarefa contém a chave | |
// titulo: "tal tarefa" | |
// concluido:false | |
// responsavel: null |