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
Dart 10 hrs 59 mins █████████████████▌░░░ 83.4% | |
HTML 1 hr 33 mins ██▍░░░░░░░░░░░░░░░░░░ 11.8% | |
YAML 32 mins ▊░░░░░░░░░░░░░░░░░░░░ 4.2% | |
XML 2 mins ░░░░░░░░░░░░░░░░░░░░░ 0.3% | |
JSON 1 min ░░░░░░░░░░░░░░░░░░░░░ 0.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
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
void main() => runApp(ExampleApp()); | |
class ExampleApp extends StatefulWidget { | |
@override | |
_ExampleAppState createState() => _ExampleAppState(); | |
} |
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/widgets.dart'; | |
main()=>runApp(App()); | |
class App extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Directionality( | |
textDirection: TextDirection.ltr, | |
child: Container( |
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
//... | |
class _ContadorEstado extends State<Contador> { | |
//finalmente, podemos declarar variaveis dinamicas dentro das nossas classes, | |
//para armazenar o estados dos nossos widgets | |
//nesse caso, armazenaremos o número | |
int contador = 0; |
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
// ... | |
class Contador extends StatefulWidget { | |
//o estado não está armazenado no widget, mas dentro de uma classe especifica | |
//que é criado pelo createState() | |
@override | |
State<Contador> createState() => _ContadorEstado(); | |
//o resultado da função é um objecto, que deve ser | |
//do tipo State<Contador> (onde Contador é o nome do nosso Widget) |
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/widgets.dart'; | |
main() => runApp( | |
Directionality( | |
textDirection: TextDirection.ltr, | |
child: Container(color: Color(0xFFFFFFFF), child: WidgetSemEstado()), | |
), | |
); | |
class WidgetSemEstado 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
import 'package:flutter/widgets.dart'; | |
main() => runApp( | |
Directionality( | |
textDirection: TextDirection.ltr, | |
child: Center( | |
child: WidgetSemEstado("Mundo!!!"), | |
), | |
), | |
); |
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/widgets.dart'; | |
main() => runApp( | |
Directionality( | |
textDirection: TextDirection.ltr, | |
child: Center( | |
child: WidgetSemEstado(), | |
), | |
), | |
); |
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/widgets.dart'; | |
main() => runApp( | |
Directionality( | |
textDirection: TextDirection.ltr, | |
child: Container( // o novo widget! é o <div> no mundo do Flutter | |
//para o [Container], a propriedade[color] significa a cor do fundo(background-color) | |
color: Color(0xFF444444), | |
child: Center( | |
child: Text( |
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/widgets.dart'; | |
main() => runApp( | |
Directionality( | |
textDirection: TextDirection.ltr, | |
child: Center( | |
child: Text( | |
'Olá, Mundo!!!', | |
), | |
), |
NewerOlder