An icon widget with a circular background
An icon widget with a circular background.
Installing
-
Add dependencies to
pubspec.yaml
dependencies: round_icon: git: url: https://github.com/teixeirazeus/round_icon
-
Run pub get.
flutter pub get
-
Import package.
import 'package:round_icon/round_icon.dart';
Using
Set the icon, its color and the background color.
import 'package:flutter/material.dart';
import 'package:round_icon/round_icon.dart';
void main() {
runApp(const App());
}
class App extends StatelessWidget {
const App({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: RoundIcon(
icon: Icons.person,
backgroundColor: Colors.grey,
iconColor: Colors.black),
),
),
);
}
}
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.