Created with <3 with dartpad.dev.
Last active
July 26, 2022 07:35
-
-
Save Chralu/f94c9cc850f2fe2ecf8906dbbd99a5d5 to your computer and use it in GitHub Desktop.
Flutter101 - Minimal app
This file contains 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) 2022, TheTribe.io | |
import 'package:flutter/material.dart'; | |
/// | |
/// Point d'entrée de l'application. | |
/// Toutes les applications doivent avoir une fonction `main()` | |
/// | |
/// On fait appel à [runApp] pour exécuter le [Widget] | |
/// principal de notre application | |
void main() { | |
runApp(MyApp()); | |
} | |
/// | |
/// Widget affiché au lancement de l'application | |
/// | |
/// On peut voir dans la méthode [build] que ce widget est composé de deux Widgets : | |
/// - Un [Widget] de type [Text] : son rôle est d'afficher du texte à l'écran | |
/// - Un [Widget] de type [Center] : son rôle est de positionner son enfant au centre de l'écran | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return const Center( | |
child: Text( | |
"Bonjour à tous", | |
textDirection: TextDirection.ltr, | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment