Professional Documents
Culture Documents
MA - 2 Introduction To Flutter
MA - 2 Introduction To Flutter
Introduction to Flutter
Def., “Flutter is Google’s UI toolkit for building beautiful, natively compiled applications
for mobile, web, and desktop from a single codebase.”
The following figure illustrates the native app that interacts with the OS.
1. The widgets are fundamental because they give our app the capabilities to paint
the UI, use the canvas and respond to events such as finger taps.
2. There would be the need to communicate with the native API exposed by the
platform. E.g., using OS-specific APIs, you could ask for the camera service, or
for Bluetooth to send a file.
2. void main() {
3. runApp(const Center(
4. child: Text('عرض نص بسيط..',
5. textDirection: TextDirection.rtl,
6. style: TextStyle(
7. color: Colors. lightGreenAccent,
8. decoration: TextDecoration.underline,
9. )),
10. ));
11. }
Output:
2. void main() {
3. runApp(MaterialApp(
4. home: Scaffold(
5. appBar: AppBar(
6. title: const Text('First Flutter App..'),
7. )
8. ),
9. ));
10. }
Output:
2. void main() {
3. runApp(const MainApp());
4. }
5. class MainApp extends StatelessWidget {
6. const MainApp({super.key});
7. @override
8. Widget build(BuildContext context) {
9. return const MaterialApp(
10. debugShowCheckedModeBanner: false,
11. home: Scaffold(
12. appBar: AppBar(
13. title: const Text('First Flutter App..'),
14. ),
15. body: Center(
16. child: Text(
17. 'Hello World! $_counter',
18. style:Theme.of(context).textTheme.headlineMedium,
19. ), //Text
20. ), //Center
21. ), //Scaffold
22. ); //MaterialApp
23. }
24. }
[1] Flutter Gems (https://fluttergems.dev/) – A Curated List of Top Dart and Flutter