Skip to content

Instantly share code, notes, and snippets.

@imrhk
Created May 30, 2022 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imrhk/84a7c7c4ea00b68e33e02d413d156699 to your computer and use it in GitHub Desktop.
Save imrhk/84a7c7c4ea00b68e33e02d413d156699 to your computer and use it in GitHub Desktop.
Simple Icon Widget example in flutter
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