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'; | |
| void main() { | |
| runApp( | |
| MaterialApp( | |
| home: Text('Hello!'), | |
| ) | |
| ); | |
| } |
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'; | |
| void main() { | |
| runApp( | |
| MaterialApp( | |
| home: Text('Hello!'), | |
| ) | |
| ); | |
| } |
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'; | |
| void main() { | |
| runApp( | |
| MaterialApp( | |
| home: Text('Hello!'), | |
| ) | |
| ); | |
| } |
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
| function classNames(...possibleCSSClasses) { | |
| return possibleCSSClasses.map((possibleCSSClass) => { | |
| let className; | |
| if(typeof possibleCSSClass === 'string') { | |
| className = possibleCSSClass | |
| } | |
| if(typeof possibleCSSClass === 'object' && !Array.isArray(possibleCSSClass)) { | |
| className = Object.keys(possibleCSSClass).filter((possibleCSSClassName) => { | |
| return possibleCSSClass[possibleCSSClassName] |
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
| <span className={classNames( | |
| 'novoTweet__status', | |
| 'outra classe', | |
| { | |
| 'novoTweet__status--invalido': !this.isNovoTweetLowerOrEqual140() | |
| } | |
| )}> | |
| {this.state.novoTweet.length}/140 | |
| </span> |
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
| <span className={` | |
| novoTweet__status | |
| ${ | |
| !this.isNovoTweetLowerThan140() | |
| ? 'novoTweet__status--invalido' | |
| : '' | |
| }`}> | |
| {this.state.novoTweet.length}/140 | |
| </span> |
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
| fetch(`https://twitelum-api.herokuapp.com/tweets`, { | |
| method: 'POST', | |
| body: JSON.stringify({ conteudo: 'aaa', login: 'omariosouto' }), | |
| headers: { | |
| 'content-type': 'application/json' | |
| } | |
| }) | |
| .then(function (data) { | |
| return data.json() | |
| }) |
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
| fetch('http://twitelum-api.herokuapp.com/tweets') | |
| .then(function(respostaDoServidor) { | |
| return respostaDoServidor.json() | |
| }) | |
| .then(function(dadosConvertidosEmObjeto) { | |
| console.log(dadosConvertidosEmObjeto) | |
| }) |
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
| fetch('http://twitelum-api.herokuapp.com/tweets') | |
| .then(function(respostaDoServidor) { | |
| respostaDoServidor.json().then(function(dadosConvertidosEmObjeto) { | |
| console.log(dadosConvertidosEmObjeto) | |
| }) | |
| }) |
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
| fetch('http://twitelum-api.herokuapp.com/tweets') | |
| .then(function(respostaDoServidor) { | |
| console.log(respostaDoServidor) | |
| }) |