0
 Future<NotificationDetails> _notificationDetails({String url}) async {
    http.Response response = await http.get(Uri.parse(url));
    AndroidNotificationDetails androidNotificationDetails =
    const  AndroidNotificationDetails(
      'channel_id',
      'channel_name',
      icon: '@drawable/ic_launcher',
      channelDescription: 'description',
      importance: Importance.max,
      priority: Priority.max,
      playSound: true,
      color: Color(0x00000010),
      enableVibration: false,
      //vibrationPattern: 10
    );
    if(response.statusCode == 200){
      final image = response.bodyBytes;
      BigPictureStyleInformation androidImage =
      BigPictureStyleInformation(
        ByteArrayAndroidBitmap.fromBase64String(base64Encode(image)),
        largeIcon: ByteArrayAndroidBitmap.fromBase64String(base64Encode(image)),
      );
      androidNotificationDetails = AndroidNotificationDetails(
          'channel_id',
          'channel_name',
          icon: '@drawable/ic_launcher',
          channelDescription: 'description',
          importance: Importance.max,
          priority: Priority.max,
          styleInformation: androidImage,
          playSound: true,
          sound: null
      );
    }

    const IOSNotificationDetails iosNotificationDetails =
    IOSNotificationDetails(
      badgeNumber: 10,
      presentBadge: true,
      presentAlert: true,
      attachments: [IOSNotificationAttachment('images/account/location.png')]
      //presentSound: true
    );

    return  NotificationDetails(
      android: androidNotificationDetails,
      iOS: iosNotificationDetails,
    );
  }

I want to display big image notification like android using flutter_local_notificaion package like youtube or facebook I dont know to use attachment in flutter_local_notificaion IOS I want to display big image notification like android using flutter_local_notificaion package like youtube or facebook I dont know to use attachment in flutter_local_notificaion IOS

1 Answers1

0

FCM via APNs Integration

Please Follow the same Steps of FCM via APNs Integration (Advanced, Optional) Allowing Notification Images

Jatin Sharma
  • 146
  • 1
  • 11