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(MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| home: TestScreen(), | |
| ); |
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
| /// ----------------------------------------------------------------------------- | |
| /// AppSpacing | |
| /// | |
| /// Classe utilitária para padronização de espaçamentos na aplicação, promovendo | |
| /// consistência visual e facilitando a manutenção do layout. | |
| /// | |
| /// Autor: Ulisses Hen - Mago do Flutter 🧙♂️ | |
| /// ----------------------------------------------------------------------------- | |
| class AppSpacing { |
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/foundation.dart'; | |
| import 'package:flutter/material.dart'; | |
| import 'dart:async'; | |
| void main() { | |
| // Initialize our error logger before running the app. | |
| ErrorLogger.initialize(); | |
| runApp(MyApp()); | |
| } |
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'; | |
| import 'dart:async'; | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class CallbackManager { |
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() async { | |
| print('A'); | |
| printsync(); | |
| print('G'); | |
| } | |
| void printsync() async { | |
| print('B'); |
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() async { | |
| print('A'); | |
| await Future(() { | |
| print('B'); | |
| Future(() => print('C')); | |
| Future.microtask(() => print('D')); | |
| Future(() => print('E')); | |
| print('F'); | |
| }); |
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() { | |
| Object obj = "Hello"; | |
| print((obj as String).length); | |
| obj = 10; | |
| print((obj as int).isEven); |
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(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @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
| import 'dart:collection'; | |
| void main() { | |
| final baldes = [Balde(3), Balde(5)]; | |
| const int litrosDesejado = 4; | |
| final resultado = medirAgua(baldes, litrosDesejado); | |
| if (resultado != null) { | |
| for (var passo in resultado.caminho) { |
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:collection'; | |
| void main() { | |
| final baldes = [Balde(3), Balde(5)]; | |
| const int litrosDesejado = 4; | |
| final resultado = medirAgua(baldes, litrosDesejado); | |
| if (resultado != null) { | |
| for (var passo in resultado) { |
NewerOlder