Skip to content

Commit

Permalink
replaced placeholder.com with dummyimage.com in example app due to Cl…
Browse files Browse the repository at this point in the history
…oudflare blocking requests (#1821)
  • Loading branch information
MaikuB committed Dec 3, 2022
1 parent d8d07a7 commit ff4abbd
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions flutter_local_notifications/example/lib/main.dart
Expand Up @@ -1455,10 +1455,10 @@ class _HomePageState extends State<HomePage> {
}

Future<void> _showBigPictureNotification() async {
final String largeIconPath = await _downloadAndSaveFile(
'https://via.placeholder.com/48x48', 'largeIcon');
final String largeIconPath =
await _downloadAndSaveFile('https://dummyimage.com/48x48', 'largeIcon');
final String bigPicturePath = await _downloadAndSaveFile(
'https://via.placeholder.com/400x800', 'bigPicture');
'https://dummyimage.com/400x800', 'bigPicture');
final BigPictureStyleInformation bigPictureStyleInformation =
BigPictureStyleInformation(FilePathAndroidBitmap(bigPicturePath),
largeIcon: FilePathAndroidBitmap(largeIconPath),
Expand All @@ -1485,9 +1485,9 @@ class _HomePageState extends State<HomePage> {

Future<void> _showBigPictureNotificationBase64() async {
final String largeIcon =
await _base64encodedImage('https://via.placeholder.com/48x48');
await _base64encodedImage('https://dummyimage.com/48x48');
final String bigPicture =
await _base64encodedImage('https://via.placeholder.com/400x800');
await _base64encodedImage('https://dummyimage.com/400x800');

final BigPictureStyleInformation bigPictureStyleInformation =
BigPictureStyleInformation(
Expand Down Expand Up @@ -1516,9 +1516,9 @@ class _HomePageState extends State<HomePage> {

Future<void> _showBigPictureNotificationURL() async {
final ByteArrayAndroidBitmap largeIcon = ByteArrayAndroidBitmap(
await _getByteArrayFromUrl('https://via.placeholder.com/48x48'));
await _getByteArrayFromUrl('https://dummyimage.com/48x48'));
final ByteArrayAndroidBitmap bigPicture = ByteArrayAndroidBitmap(
await _getByteArrayFromUrl('https://via.placeholder.com/400x800'));
await _getByteArrayFromUrl('https://dummyimage.com/400x800'));

final BigPictureStyleInformation bigPictureStyleInformation =
BigPictureStyleInformation(bigPicture,
Expand All @@ -1539,10 +1539,10 @@ class _HomePageState extends State<HomePage> {
}

Future<void> _showBigPictureNotificationHiddenLargeIcon() async {
final String largeIconPath = await _downloadAndSaveFile(
'https://via.placeholder.com/48x48', 'largeIcon');
final String largeIconPath =
await _downloadAndSaveFile('https://dummyimage.com/48x48', 'largeIcon');
final String bigPicturePath = await _downloadAndSaveFile(
'https://via.placeholder.com/400x800', 'bigPicture');
'https://dummyimage.com/400x800', 'bigPicture');
final BigPictureStyleInformation bigPictureStyleInformation =
BigPictureStyleInformation(FilePathAndroidBitmap(bigPicturePath),
hideExpandedLargeIcon: true,
Expand All @@ -1564,7 +1564,7 @@ class _HomePageState extends State<HomePage> {

Future<void> _showNotificationMediaStyle() async {
final String largeIconPath = await _downloadAndSaveFile(
'https://via.placeholder.com/128x128/00FF00/000000', 'largeIcon');
'https://dummyimage.com/128x128/00FF00/000000', 'largeIcon');
final AndroidNotificationDetails androidNotificationDetails =
AndroidNotificationDetails(
'media channel id',
Expand Down Expand Up @@ -1641,8 +1641,8 @@ class _HomePageState extends State<HomePage> {
icon: FlutterBitmapAssetAndroidIcon('icons/coworker.png'),
);
// download the icon that would be use for the lunch bot person
final String largeIconPath = await _downloadAndSaveFile(
'https://via.placeholder.com/48x48', 'largeIcon');
final String largeIconPath =
await _downloadAndSaveFile('https://dummyimage.com/48x48', 'largeIcon');
// this person object will use an icon that was downloaded
final Person lunchBot = Person(
name: 'Lunch bot',
Expand Down Expand Up @@ -2185,7 +2185,7 @@ class _HomePageState extends State<HomePage> {
required bool hideThumbnail,
}) async {
final String bigPicturePath = await _downloadAndSaveFile(
'https://via.placeholder.com/600x200', 'bigPicture.jpg');
'https://dummyimage.com/600x200', 'bigPicture.jpg');
final DarwinNotificationDetails darwinNotificationDetails =
DarwinNotificationDetails(attachments: <DarwinNotificationAttachment>[
DarwinNotificationAttachment(
Expand All @@ -2204,7 +2204,7 @@ class _HomePageState extends State<HomePage> {

Future<void> _showNotificationWithClippedThumbnailAttachment() async {
final String bigPicturePath = await _downloadAndSaveFile(
'https://via.placeholder.com/600x200', 'bigPicture.jpg');
'https://dummyimage.com/600x200', 'bigPicture.jpg');
final DarwinNotificationDetails darwinNotificationDetails =
DarwinNotificationDetails(attachments: <DarwinNotificationAttachment>[
DarwinNotificationAttachment(
Expand Down

0 comments on commit ff4abbd

Please sign in to comment.