xxxxxxxxxx
# pubspec.yaml
flutter:
# ...
assets:
- images/app_icon.png
# ...
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "images/app_icon.png"
xxxxxxxxxx
dev_dependencies:
flutter_launcher_icons: ^0.9.0
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/icon.png"
/* command
flutter pub get
flutter pub run flutter_launcher_icons:main
*/
xxxxxxxxxx
// To use icons in Flutter, you can use the 'flutter_vector_icons' package.
// This package provides a huge collection of icons, including popular icon sets
// like Material Icons, FontAwesome, etc.
// Add the following dependency to your pubspec.yaml file:
// dependencies:
// flutter_vector_icons: ^1.0.0
// Import the necessary classes in your Dart file:
import 'package:flutter/material.dart';
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
// Now you can use any icon from the library, for example:
Icon(
FlutterIcons.home_ant, // Example icon: home (from AntDesign)
size: 30,
color: Colors.blue,
);