banner Codacy BadgeLicense

An icon widget with a circular background.

Installing

  1. Add dependencies to pubspec.yaml

    dependencies:
        round_icon:
            git:
                url: https://github.com/teixeirazeus/round_icon
  2. Run pub get.

    flutter pub get
  3. 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.

GitHub

View Github