|
|
@ -7,7 +7,7 @@ import 'package:flutter/foundation.dart'; |
|
|
|
import 'package:flutter/widgets.dart'; |
|
|
|
import 'package:flutter/widgets.dart'; |
|
|
|
import 'package:flutter_cache_manager/flutter_cache_manager.dart'; |
|
|
|
import 'package:flutter_cache_manager/flutter_cache_manager.dart'; |
|
|
|
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; |
|
|
|
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; |
|
|
|
import 'package:flutter_svg/flutter_svg.dart' show SvgFileLoader, vg; |
|
|
|
import 'package:flutter_svg/flutter_svg.dart' show SvgStringLoader, vg; |
|
|
|
import 'package:image/image.dart' as img; |
|
|
|
import 'package:image/image.dart' as img; |
|
|
|
import 'package:meta/meta.dart'; |
|
|
|
import 'package:meta/meta.dart'; |
|
|
|
import 'package:neon/src/blocs/accounts.dart'; |
|
|
|
import 'package:neon/src/blocs/accounts.dart'; |
|
|
@ -106,7 +106,7 @@ class PushUtils { |
|
|
|
final cacheManager = DefaultCacheManager(); |
|
|
|
final cacheManager = DefaultCacheManager(); |
|
|
|
final file = await cacheManager.getSingleFile(notification.icon!); |
|
|
|
final file = await cacheManager.getSingleFile(notification.icon!); |
|
|
|
|
|
|
|
|
|
|
|
final pictureInfo = await vg.loadPicture(SvgFileLoader(file), null); |
|
|
|
final pictureInfo = await vg.loadPicture(SvgStringLoader(file.readAsStringSync()), null); |
|
|
|
|
|
|
|
|
|
|
|
const largeIconSize = 256; |
|
|
|
const largeIconSize = 256; |
|
|
|
final scale = largeIconSize / pictureInfo.size.longestSide; |
|
|
|
final scale = largeIconSize / pictureInfo.size.longestSide; |
|
|
|