refactor: Null safe dependencies

This commit is contained in:
Christian Pauly 2021-04-11 09:49:24 +02:00
parent 76199418b2
commit f58de43223
27 changed files with 283 additions and 308 deletions

View File

@ -15,7 +15,7 @@ import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:receive_sharing_intent/receive_sharing_intent.dart'; import 'package:receive_sharing_intent/receive_sharing_intent.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../utils/localized_exception_extension.dart'; import '../utils/localized_exception_extension.dart';
import 'package:universal_html/prefer_universal/html.dart' as html; import 'package:universal_html/html.dart' as html;
class HomeserverPicker extends StatefulWidget { class HomeserverPicker extends StatefulWidget {
@override @override

View File

@ -14,7 +14,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_app_lock/flutter_app_lock.dart'; import 'package:flutter_app_lock/flutter_app_lock.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:universal_html/prefer_universal/html.dart' as html; import 'package:universal_html/html.dart' as html;
import 'views/widgets/matrix.dart'; import 'views/widgets/matrix.dart';
import 'config/themes.dart'; import 'config/themes.dart';

View File

@ -130,12 +130,11 @@ class BackgroundPush {
bool useDeviceSpecificAppId = false, bool useDeviceSpecificAppId = false,
}) async { }) async {
if (PlatformInfos.isIOS) { if (PlatformInfos.isIOS) {
FirebaseMessaging() await FirebaseMessaging.instance.requestPermission(
.requestNotificationPermissions(IosNotificationSettings(
sound: true, sound: true,
alert: true, alert: true,
badge: true, badge: true,
)); );
} }
final clientName = PlatformInfos.clientName; final clientName = PlatformInfos.clientName;
oldTokens ??= <String>{}; oldTokens ??= <String>{};
@ -355,7 +354,8 @@ class BackgroundPush {
.toString() .toString()
.split('?') .split('?')
.first; .first;
final res = json.decode(utf8.decode((await http.get(url)).bodyBytes)); final res =
json.decode(utf8.decode((await http.get(Uri.parse(url))).bodyBytes));
if (res['gateway'] == 'matrix') { if (res['gateway'] == 'matrix') {
endpoint = url; endpoint = url;
} }
@ -699,7 +699,7 @@ class BackgroundPush {
final url = thumbnail final url = thumbnail
? content.getThumbnail(client, width: width, height: height) ? content.getThumbnail(client, width: width, height: height)
: content.getDownloadLink(client); : content.getDownloadLink(client);
var request = await HttpClient().getUrl(Uri.parse(url)); var request = await HttpClient().getUrl(url);
var response = await request.close(); var response = await request.close();
if (response.statusCode >= 300) { if (response.statusCode >= 300) {
// we are not in the 2xx range // we are not in the 2xx range

View File

@ -8,7 +8,7 @@ Future<Database> constructDb(
String password = ''}) async { String password = ''}) async {
Logs().v('[Moor] Using moor web'); Logs().v('[Moor] Using moor web');
return Database(WebDatabase.withStorage( return Database(WebDatabase.withStorage(
MoorWebStorage.indexedDbIfSupported(filename), await MoorWebStorage.indexedDbIfSupported(filename),
logStatements: logStatements)); logStatements: logStatements));
} }

View File

@ -87,7 +87,7 @@ extension LocalizedBody on Event {
} }
// check if the url is cached // check if the url is cached
final url = Uri.parse(mxcUrl).getDownloadLink(room.client); final url = Uri.parse(mxcUrl).getDownloadLink(room.client);
final file = await DefaultCacheManager().getFileFromCache(url); final file = await DefaultCacheManager().getFileFromCache(url.toString());
return file != null; return file != null;
} }
@ -96,8 +96,8 @@ extension LocalizedBody on Event {
final mxcUrl = attachmentOrThumbnailMxcUrl(getThumbnail: getThumbnail); final mxcUrl = attachmentOrThumbnailMxcUrl(getThumbnail: getThumbnail);
_downloadAndDecryptFutures[mxcUrl] ??= downloadAndDecryptAttachment( _downloadAndDecryptFutures[mxcUrl] ??= downloadAndDecryptAttachment(
getThumbnail: getThumbnail, getThumbnail: getThumbnail,
downloadCallback: (String url) async { downloadCallback: (Uri url) async {
final file = await DefaultCacheManager().getSingleFile(url); final file = await DefaultCacheManager().getSingleFile(url.toString());
return await file.readAsBytes(); return await file.readAsBytes();
}, },
); );

View File

@ -7,7 +7,7 @@ extension FilteredTimelineExtension on Timeline {
final filteredEvents = events final filteredEvents = events
.where((e) => .where((e) =>
// always filter out edit and reaction relationships // always filter out edit and reaction relationships
!{RelationshipTypes.Edit, RelationshipTypes.Reaction} !{RelationshipTypes.edit, RelationshipTypes.reaction}
.contains(e.relationshipType) && .contains(e.relationshipType) &&
// always filter out m.key.* events // always filter out m.key.* events
!e.type.startsWith('m.key.verification.') && !e.type.startsWith('m.key.verification.') &&

View File

@ -6,7 +6,7 @@ import 'package:fluffychat/utils/platform_infos.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:open_file/open_file.dart'; import 'package:open_file/open_file.dart';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:universal_html/prefer_universal/html.dart' as html; import 'package:universal_html/html.dart' as html;
import 'package:mime_type/mime_type.dart'; import 'package:mime_type/mime_type.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';

View File

@ -5,7 +5,7 @@ import 'dart:ui';
import 'package:adaptive_dialog/adaptive_dialog.dart'; import 'package:adaptive_dialog/adaptive_dialog.dart';
import 'package:adaptive_page_layout/adaptive_page_layout.dart'; import 'package:adaptive_page_layout/adaptive_page_layout.dart';
import 'package:emoji_picker/emoji_picker.dart'; import 'package:emoji_picker_flutter/emoji_picker_flutter.dart';
import 'package:famedlysdk/famedlysdk.dart'; import 'package:famedlysdk/famedlysdk.dart';
import 'package:file_picker_cross/file_picker_cross.dart'; import 'package:file_picker_cross/file_picker_cross.dart';
import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/config/app_config.dart';
@ -399,7 +399,7 @@ class _ChatState extends State<Chat> {
event.sendAgain(); event.sendAgain();
} }
final allEditEvents = event final allEditEvents = event
.aggregatedEvents(timeline, RelationshipTypes.Edit) .aggregatedEvents(timeline, RelationshipTypes.edit)
.where((e) => e.status == -1); .where((e) => e.status == -1);
for (final e in allEditEvents) { for (final e in allEditEvents) {
e.sendAgain(); e.sendAgain();
@ -476,7 +476,7 @@ class _ChatState extends State<Chat> {
children: [ children: [
Spacer(), Spacer(),
EmojiPicker( EmojiPicker(
onEmojiSelected: (emoji, category) { onEmojiSelected: (category, emoji) {
// recent emojis don't work, so we sadly have to re-implement them // recent emojis don't work, so we sadly have to re-implement them
// https://github.com/JeffG05/emoji_picker/issues/31 // https://github.com/JeffG05/emoji_picker/issues/31
SharedPreferences.getInstance().then((prefs) { SharedPreferences.getInstance().then((prefs) {
@ -485,7 +485,7 @@ class _ChatState extends State<Chat> {
// make sure we remove duplicates // make sure we remove duplicates
prefs.setStringList('recents', recents.toSet().toList()); prefs.setStringList('recents', recents.toSet().toList());
}); });
Navigator.of(context, rootNavigator: false).pop<Emoji>(emoji); Navigator.of(context, rootNavigator: false).pop(emoji);
}, },
), ),
], ],
@ -986,7 +986,7 @@ class _ChatState extends State<Chat> {
var emojis = List<String>.from(AppEmojis.emojis); var emojis = List<String>.from(AppEmojis.emojis);
final allReactionEvents = selectedEvents.first final allReactionEvents = selectedEvents.first
.aggregatedEvents( .aggregatedEvents(
timeline, RelationshipTypes.Reaction) timeline, RelationshipTypes.reaction)
?.where((event) => ?.where((event) =>
event.senderId == event.room.client.userID && event.senderId == event.room.client.userID &&
event.type == 'm.reaction'); event.type == 'm.reaction');

View File

@ -413,8 +413,8 @@ class _ChatDetailsState extends State<ChatDetails> {
), ),
if (room.canChangeHistoryVisibility) if (room.canChangeHistoryVisibility)
PopupMenuItem<HistoryVisibility>( PopupMenuItem<HistoryVisibility>(
value: HistoryVisibility.world_readable, value: HistoryVisibility.worldReadable,
child: Text(HistoryVisibility.world_readable child: Text(HistoryVisibility.worldReadable
.getLocalizedString( .getLocalizedString(
MatrixLocals(L10n.of(context)))), MatrixLocals(L10n.of(context)))),
), ),
@ -446,9 +446,9 @@ class _ChatDetailsState extends State<ChatDetails> {
<PopupMenuEntry<GuestAccess>>[ <PopupMenuEntry<GuestAccess>>[
if (room.canChangeGuestAccess) if (room.canChangeGuestAccess)
PopupMenuItem<GuestAccess>( PopupMenuItem<GuestAccess>(
value: GuestAccess.can_join, value: GuestAccess.canJoin,
child: Text( child: Text(
GuestAccess.can_join.getLocalizedString( GuestAccess.canJoin.getLocalizedString(
MatrixLocals(L10n.of(context))), MatrixLocals(L10n.of(context))),
), ),
), ),

View File

@ -127,7 +127,7 @@ class _ChatListState extends State<ChatList> {
context: context, context: context,
future: () => room.setPushRuleState( future: () => room.setPushRuleState(
room.pushRuleState == PushRuleState.notify room.pushRuleState == PushRuleState.notify
? PushRuleState.mentions_only ? PushRuleState.mentionsOnly
: PushRuleState.notify), : PushRuleState.notify),
); );
} }

View File

@ -1,7 +1,7 @@
import 'package:fluffychat/config/setting_keys.dart'; import 'package:fluffychat/config/setting_keys.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_app_lock/flutter_app_lock.dart'; import 'package:flutter_app_lock/flutter_app_lock.dart';
import 'package:flutter_screen_lock/lock_screen.dart'; import 'package:flutter_screen_lock/functions.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
class LockScreen extends StatelessWidget { class LockScreen extends StatelessWidget {
@ -17,11 +17,10 @@ class LockScreen extends StatelessWidget {
if (snapshot.connectionState == ConnectionState.done) { if (snapshot.connectionState == ConnectionState.done) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (snapshot.data?.isNotEmpty ?? false) { if (snapshot.data?.isNotEmpty ?? false) {
showLockScreen( screenLock(
context: context, context: context,
correctString: snapshot.data, correctString: snapshot.data,
onUnlocked: () => AppLock.of(context).didUnlock(), didConfirmed: (_) => AppLock.of(context).didUnlock(),
canBiometric: true,
canCancel: false, canCancel: false,
); );
} else { } else {

View File

@ -16,7 +16,7 @@ import 'package:fluffychat/utils/sentry_controller.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_app_lock/flutter_app_lock.dart'; import 'package:flutter_app_lock/flutter_app_lock.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_screen_lock/lock_screen.dart'; import 'package:flutter_screen_lock/functions.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -296,11 +296,10 @@ class _SettingsState extends State<Settings> {
await FlutterSecureStorage().read(key: SettingKeys.appLockKey); await FlutterSecureStorage().read(key: SettingKeys.appLockKey);
if (currentLock?.isNotEmpty ?? false) { if (currentLock?.isNotEmpty ?? false) {
var unlocked = false; var unlocked = false;
await showLockScreen( await screenLock(
context: context, context: context,
correctString: currentLock, correctString: currentLock,
onUnlocked: () => unlocked = true, didConfirmed: (_) => unlocked = true,
canBiometric: true,
); );
if (unlocked != true) return; if (unlocked != true) return;
} }

View File

@ -425,7 +425,7 @@ class _EmoteImage extends StatelessWidget {
method: ThumbnailMethod.scale, method: ThumbnailMethod.scale,
); );
return CachedNetworkImage( return CachedNetworkImage(
imageUrl: url, imageUrl: url.toString(),
fit: BoxFit.contain, fit: BoxFit.contain,
width: size, width: size,
height: size, height: size,

View File

@ -8,7 +8,7 @@ import 'package:fluffychat/views/widgets/message_download_content.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_sound_lite/flutter_sound.dart'; import 'package:flutter_sound_lite/flutter_sound.dart';
import 'package:universal_html/prefer_universal/html.dart' as html; import 'package:universal_html/html.dart' as html;
import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart';
import '../../utils/ui_fake.dart' if (dart.library.html) 'dart:ui' as ui; import '../../utils/ui_fake.dart' if (dart.library.html) 'dart:ui' as ui;
import 'matrix.dart'; import 'matrix.dart';
@ -144,7 +144,8 @@ class _AudioPlayerState extends State<AudioPlayer> {
if (kIsWeb) { if (kIsWeb) {
if (widget.event.content['url'] is String) { if (widget.event.content['url'] is String) {
webSrcUrl = Uri.parse(widget.event.content['url']) webSrcUrl = Uri.parse(widget.event.content['url'])
.getDownloadLink(Matrix.of(context).client); .getDownloadLink(Matrix.of(context).client)
.toString();
return Container( return Container(
height: 50, height: 50,
width: 300, width: 300,

View File

@ -66,7 +66,7 @@ class Avatar extends StatelessWidget {
child: noPic child: noPic
? textWidget ? textWidget
: CachedNetworkImage( : CachedNetworkImage(
imageUrl: src, imageUrl: src.toString(),
fit: BoxFit.cover, fit: BoxFit.cover,
width: size, width: size,
height: size, height: size,

View File

@ -86,7 +86,7 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
await showFutureLoadingDialog( await showFutureLoadingDialog(
context: context, context: context,
future: () => future: () =>
widget.room.setPushRuleState(PushRuleState.mentions_only)); widget.room.setPushRuleState(PushRuleState.mentionsOnly));
break; break;
case 'unmute': case 'unmute':
await showFutureLoadingDialog( await showFutureLoadingDialog(

View File

@ -53,7 +53,7 @@ class ContentBanner extends StatelessWidget {
opacity: opacity, opacity: opacity,
child: (!loading && mxContent != null) child: (!loading && mxContent != null)
? CachedNetworkImage( ? CachedNetworkImage(
imageUrl: src, imageUrl: src.toString(),
height: 300, height: 300,
fit: BoxFit.cover, fit: BoxFit.cover,
) )

View File

@ -56,13 +56,15 @@ class HtmlMessage extends StatelessWidget {
getMxcUrl: (String mxc, double width, double height, getMxcUrl: (String mxc, double width, double height,
{bool animated = false}) { {bool animated = false}) {
final ratio = MediaQuery.of(context).devicePixelRatio; final ratio = MediaQuery.of(context).devicePixelRatio;
return Uri.parse(mxc)?.getThumbnail( return Uri.parse(mxc)
matrix.client, ?.getThumbnail(
width: (width ?? 800) * ratio, matrix.client,
height: (height ?? 800) * ratio, width: (width ?? 800) * ratio,
method: ThumbnailMethod.scale, height: (height ?? 800) * ratio,
animated: animated, method: ThumbnailMethod.scale,
); animated: animated,
)
.toString();
}, },
setCodeLanguage: (String key, String value) async { setCodeLanguage: (String key, String value) async {
await matrix.store.setItem('${SettingKeys.codeLanguage}.$key', value); await matrix.store.setItem('${SettingKeys.codeLanguage}.$key', value);

View File

@ -80,9 +80,10 @@ class _ImageBubbleState extends State<ImageBubble> {
@override @override
void initState() { void initState() {
thumbnailUrl = thumbnailUrl = widget.event
widget.event.getAttachmentUrl(getThumbnail: true, animated: true); .getAttachmentUrl(getThumbnail: true, animated: true)
attachmentUrl = widget.event.getAttachmentUrl(animated: true); .toString();
attachmentUrl = widget.event.getAttachmentUrl(animated: true).toString();
if (thumbnailUrl == null) { if (thumbnailUrl == null) {
_requestFile(getThumbnail: true); _requestFile(getThumbnail: true);
} }
@ -195,12 +196,15 @@ class _ImageBubbleState extends State<ImageBubble> {
_requestedThumbnailOnFailure = true; _requestedThumbnailOnFailure = true;
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() { setState(() {
thumbnailUrl = widget.event.getAttachmentUrl( thumbnailUrl = widget.event
getThumbnail: true, .getAttachmentUrl(
useThumbnailMxcUrl: true, getThumbnail: true,
animated: true); useThumbnailMxcUrl: true,
animated: true)
.toString();
attachmentUrl = widget.event attachmentUrl = widget.event
.getAttachmentUrl(useThumbnailMxcUrl: true, animated: true); .getAttachmentUrl(useThumbnailMxcUrl: true, animated: true)
.toString();
}); });
}); });
} }

View File

@ -160,7 +160,7 @@ class InputBar extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
CachedNetworkImage( CachedNetworkImage(
imageUrl: url, imageUrl: url.toString(),
width: size, width: size,
height: size, height: size,
), ),

View File

@ -92,7 +92,7 @@ class Message extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if (event.relationshipType == RelationshipTypes.Reply) if (event.relationshipType == RelationshipTypes.reply)
FutureBuilder<Event>( FutureBuilder<Event>(
future: event.getReplyEvent(timeline), future: event.getReplyEvent(timeline),
builder: (BuildContext context, snapshot) { builder: (BuildContext context, snapshot) {
@ -177,7 +177,7 @@ class Message extends StatelessWidget {
children: rowChildren, children: rowChildren,
); );
Widget container; Widget container;
if (event.hasAggregatedEvents(timeline, RelationshipTypes.Reaction)) { if (event.hasAggregatedEvents(timeline, RelationshipTypes.reaction)) {
container = Column( container = Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: crossAxisAlignment:
@ -253,7 +253,7 @@ class _MetaRow extends StatelessWidget {
fontSize: 11 * AppConfig.fontSizeFactor, fontSize: 11 * AppConfig.fontSizeFactor,
), ),
), ),
if (event.hasAggregatedEvents(timeline, RelationshipTypes.Edit)) if (event.hasAggregatedEvents(timeline, RelationshipTypes.edit))
Padding( Padding(
padding: const EdgeInsets.only(left: 2.0), padding: const EdgeInsets.only(left: 2.0),
child: Icon( child: Icon(

View File

@ -16,7 +16,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart'; import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:future_loading_dialog/future_loading_dialog.dart'; import 'package:future_loading_dialog/future_loading_dialog.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:universal_html/prefer_universal/html.dart' as html; import 'package:universal_html/html.dart' as html;
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
/*import 'package:fluffychat/views/chat.dart'; /*import 'package:fluffychat/views/chat.dart';
@ -196,7 +196,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
html.Notification( html.Notification(
room.getLocalizedDisplayname(MatrixLocals(L10n.of(context))), room.getLocalizedDisplayname(MatrixLocals(L10n.of(context))),
body: body, body: body,
icon: icon, icon: icon.toString(),
); );
} else if (Platform.isLinux) { } else if (Platform.isLinux) {
/*var sessionBus = DBusClient.session(); /*var sessionBus = DBusClient.session();
@ -234,7 +234,7 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
Future<void> initConfig() async { Future<void> initConfig() async {
try { try {
var configJsonString = var configJsonString =
utf8.decode((await http.get('config.json')).bodyBytes); utf8.decode((await http.get(Uri.parse('config.json'))).bodyBytes);
final configJson = json.decode(configJsonString); final configJson = json.decode(configJsonString);
AppConfig.loadFromJson(configJson); AppConfig.loadFromJson(configJson);
} catch (e, s) { } catch (e, s) {

View File

@ -14,7 +14,7 @@ class MessageReactions extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final allReactionEvents = final allReactionEvents =
event.aggregatedEvents(timeline, RelationshipTypes.Reaction); event.aggregatedEvents(timeline, RelationshipTypes.reaction);
final reactionMap = <String, _ReactionEntry>{}; final reactionMap = <String, _ReactionEntry>{};
for (final e in allReactionEvents) { for (final e in allReactionEvents) {
if (e.content['m.relates_to'].containsKey('key')) { if (e.content['m.relates_to'].containsKey('key')) {
@ -97,7 +97,7 @@ class _Reaction extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
CachedNetworkImage( CachedNetworkImage(
imageUrl: src, imageUrl: src.toString(),
height: fontSize, height: fontSize,
), ),
Container(width: 4), Container(width: 4),

View File

@ -5,12 +5,16 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <file_chooser/file_chooser_plugin.h> #include <file_chooser/file_chooser_plugin.h>
#include <flutter_secure_storage/flutter_secure_storage_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h> #include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_chooser_registrar = g_autoptr(FlPluginRegistrar) file_chooser_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileChooserPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "FileChooserPlugin");
file_chooser_plugin_register_with_registrar(file_chooser_registrar); file_chooser_plugin_register_with_registrar(file_chooser_registrar);
g_autoptr(FlPluginRegistrar) flutter_secure_storage_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStoragePlugin");
flutter_secure_storage_plugin_register_with_registrar(flutter_secure_storage_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);

View File

@ -4,6 +4,7 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
file_chooser file_chooser
flutter_secure_storage
url_launcher_linux url_launcher_linux
) )

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@ dependencies:
famedlysdk: famedlysdk:
git: git:
url: https://gitlab.com/famedly/famedlysdk.git url: https://gitlab.com/famedly/famedlysdk.git
ref: main ref: 0bad62971bee06c7c4a90e1564246c6325ae7d8f
unifiedpush: unifiedpush:
git: git:
@ -24,40 +24,39 @@ dependencies:
fcm_shared_isolate: fcm_shared_isolate:
git: git:
url: https://gitlab.com/famedly/libraries/fcm_shared_isolate.git url: https://gitlab.com/famedly/libraries/fcm_shared_isolate.git
ref: ios ref: 13ace9a4b4553c3c528448391f44d786f5243c57
firebase_messaging: any firebase_messaging: any
cupertino_icons: any cupertino_icons: any
localstorage: ^3.0.6+9 localstorage: ^4.0.0+1
file_picker_cross: ^4.2.8 file_picker_cross: ^4.3.2
image_picker: ^0.6.7+21 image_picker: ^0.7.4
url_launcher: ^5.7.10 url_launcher: ^6.0.3
cached_network_image: ^2.5.0 cached_network_image: ^3.0.0
flutter_local_notifications: ^3.0.3 flutter_local_notifications: ^5.0.0+1
adaptive_page_layout: ^0.2.1 adaptive_page_layout: ^0.2.2
provider: ^4.3.3 provider: ^5.0.0
adaptive_theme: ^1.1.0 adaptive_theme: ^2.1.1
# desktop_notifications: ^0.0.0-dev.4 // Currently blocked by: https://github.com/canonical/desktop_notifications.dart/issues/5 # desktop_notifications: ^0.0.0-dev.4 // Currently blocked by: https://github.com/canonical/desktop_notifications.dart/issues/5
matrix_link_text: ^0.3.2 matrix_link_text: ^0.3.2
path_provider: ^1.6.27 path_provider: ^2.0.1
android_path_provider: ^0.1.1 android_path_provider: ^0.2.1
permission_handler: ^5.0.1+1 permission_handler: ^6.1.1
share: ^0.6.5+4 share: ^2.0.1
flutter_secure_storage: ^3.3.5 flutter_secure_storage: ^4.1.0
universal_html: ^1.2.4 universal_html: ^2.0.8
receive_sharing_intent: ^1.4.3 receive_sharing_intent: ^1.4.5
flutter_slidable: ^0.5.7 flutter_slidable: ^0.5.7
flutter_sound_lite: ^7.5.3+1 flutter_sound_lite: ^8.0.0+6
open_file: ^3.0.3 open_file: ^3.1.0
mime_type: ^0.3.2 mime_type: ^1.0.0
adaptive_dialog: ^0.9.3 adaptive_dialog: ^0.10.0+5
flutter_matrix_html: flutter_matrix_html:
git: git:
url: https://github.com/Sorunome/flutter_matrix_html.git url: https://github.com/ChristianPauly/flutter_matrix_html.git
ref: 6b6a850fcfc3b0a3e88a3dd6beb79eda3acac853 moor: ^4.2.1
moor: ^3.4.0 sqlite3: ^1.0.0
sqlite3: ^0.1.8 sqflite: ^2.0.0+3 # Still used to obtain the database location
sqflite: ^1.3.2+2 # Still used to obtain the database location flutter_typeahead: ^3.1.1
flutter_typeahead: ^2.0.0
flutter_olm: ^1.1.1 flutter_olm: ^1.1.1
intl: any intl: any
circular_check_box: ^1.0.4 circular_check_box: ^1.0.4
@ -67,34 +66,35 @@ dependencies:
git: git:
url: https://gitlab.com/famedly/libraries/native_imaging.git url: https://gitlab.com/famedly/libraries/native_imaging.git
ref: master ref: master
flutter_blurhash: ^0.5.0 flutter_blurhash: ^0.6.0
sentry: ">=3.0.0 <4.0.0" sentry: ">=3.0.0 <4.0.0"
scroll_to_index: ^1.0.6 scroll_to_index: ^2.0.0
swipe_to_action: ^0.1.0 swipe_to_action: ^0.1.0
flutter_svg: ^0.19.3 flutter_svg: ^0.21.0+1
flutter_cache_manager: ^2.1.1 flutter_cache_manager: ^3.0.1
open_noti_settings: ^0.0.4 open_noti_settings: ^0.1.0
emoji_picker: ^0.1.0 emoji_picker_flutter: ^1.0.3
future_loading_dialog: ^0.1.2 future_loading_dialog: ^0.1.2
package_info: ^0.4.3+2 package_info: ^2.0.0
flutter_app_lock: ^1.4.0+1 flutter_app_lock: ^1.5.0
flutter_screen_lock: ^1.2.6 flutter_screen_lock: ^4.0.3
email_validator: ^1.0.6 email_validator: ^2.0.1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
pedantic: ^1.9.2 pedantic: ^1.11.0
dapackages: ^1.4.0 dapackages: ^1.6.0
# The flutter_maths version of flutter_matrix_html is weird and conflicts with a few of our packages. # The flutter_maths version of flutter_matrix_html is weird and conflicts with a few of our packages.
# So, we have to force-override the dependencies to work out. # So, we have to force-override the dependencies to work out.
dependency_overrides: dependency_overrides:
provider: ^4.3.3 flutter_svg: ^0.21.0+1
flutter_svg: ^0.19.3 shared_preferences: ^2.0.1
# Was actually brought in via fcm packages and flutter_matrix_html matrix_link_text:
quiver: ^2.0.0 git:
url: https://github.com/ChristianPauly/matrix_link_text.git
flutter: flutter:
generate: true generate: true