Skip to content

Instantly share code, notes, and snippets.

@imrhk
Created May 30, 2022 12:06
Embed
What would you like to do?
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