how to change icon of initialize flutter_background_service?

86 views Asked by At

how to change icon of initialize flutter_background_service?

`Future initializeService() async { final service = FlutterBackgroundService();

const AndroidNotificationChannel channel = AndroidNotificationChannel( 'my_app_id', // id 'Check out', // title description: 'in Progress', importance: Importance.high, // showBadge: true, enableVibration: true, // importance must be at low or higher level );

final flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();

if (Platform.isIOS || Platform.isAndroid) { await flutterLocalNotificationsPlugin.initialize( const InitializationSettings( iOS: DarwinInitializationSettings(), android: AndroidInitializationSettings('@mipmap/ic_launcher'), ), );

}

await flutterLocalNotificationsPlugin .resolvePlatformSpecificImplementation() ?.createNotificationChannel(channel);

await service.configure( androidConfiguration: AndroidConfiguration( onStart: onStart, autoStart: true, isForegroundMode: true, notificationChannelId: 'my_app_id', initialNotificationTitle: 'Check out', initialNotificationContent: 'In Progress . . .', foregroundServiceNotificationId: 888, ), iosConfiguration: IosConfiguration( autoStart: true, onForeground: onStart, onBackground: onIosBackground, ), );

service.startService(); }`

0

There are 0 answers