Created
May 30, 2022 12:06
-
-
Save imrhk/84a7c7c4ea00b68e33e02d413d156699 to your computer and use it in GitHub Desktop.
Simple Icon Widget example in flutter
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
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(const IconExampleApp()); | |
} | |
class IconExampleApp extends StatelessWidget { | |
const IconExampleApp({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return const MaterialApp( | |
home: IconExamplePage(), | |
); | |
} | |
} | |
class IconExamplePage extends StatelessWidget { | |
const IconExamplePage({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return const Scaffold( | |
body: Center( | |
child: Icon(Icons.favorite), // Icon Widget | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment