🎨 Improve code structure
This commit is contained in:
parent
27e5b4ca6f
commit
09e9a30eef
@ -164,7 +164,7 @@ class AccountProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) return;
|
if (!await auth.isAuthorized) return;
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
final resp = await client.get('/api/notifications?skip=0&take=100');
|
final resp = await client.get('/api/notifications?skip=0&take=100');
|
||||||
if (resp.statusCode == 200) {
|
if (resp.statusCode == 200) {
|
||||||
@ -197,7 +197,7 @@ class AccountProvider extends GetxController {
|
|||||||
token = await FirebaseMessaging.instance.getToken();
|
token = await FirebaseMessaging.instance.getToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
final resp = await client.post('/api/notifications/subscribe', {
|
final resp = await client.post('/api/notifications/subscribe', {
|
||||||
'provider': provider,
|
'provider': provider,
|
||||||
|
@ -58,8 +58,8 @@ class AuthProvider extends GetConnect {
|
|||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetConnect configureClient({
|
GetConnect configureClient(
|
||||||
String? service,
|
String service, {
|
||||||
timeout = const Duration(seconds: 5),
|
timeout = const Duration(seconds: 5),
|
||||||
}) {
|
}) {
|
||||||
final client = GetConnect(
|
final client = GetConnect(
|
||||||
@ -68,10 +68,7 @@ class AuthProvider extends GetConnect {
|
|||||||
allowAutoSignedCert: true,
|
allowAutoSignedCert: true,
|
||||||
);
|
);
|
||||||
client.httpClient.addAuthenticator(requestAuthenticator);
|
client.httpClient.addAuthenticator(requestAuthenticator);
|
||||||
|
client.httpClient.baseUrl = ServiceFinder.services[service];
|
||||||
if (service != null) {
|
|
||||||
client.httpClient.baseUrl = ServiceFinder.services[service];
|
|
||||||
}
|
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
@ -152,7 +149,7 @@ class AuthProvider extends GetConnect {
|
|||||||
return _cachedUserProfileResponse!;
|
return _cachedUserProfileResponse!;
|
||||||
}
|
}
|
||||||
|
|
||||||
final client = configureClient(service: 'passport');
|
final client = configureClient('passport');
|
||||||
|
|
||||||
final resp = await client.get('/api/users/me');
|
final resp = await client.get('/api/users/me');
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
|
@ -97,7 +97,7 @@ class AttachmentProvider extends GetConnect {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'paperclip');
|
final client = auth.configureClient('paperclip');
|
||||||
|
|
||||||
var resp = await client.put('/api/attachments/$id', {
|
var resp = await client.put('/api/attachments/$id', {
|
||||||
'metadata': {
|
'metadata': {
|
||||||
@ -119,7 +119,7 @@ class AttachmentProvider extends GetConnect {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'paperclip');
|
final client = auth.configureClient('paperclip');
|
||||||
|
|
||||||
var resp = await client.delete('/api/attachments/$id');
|
var resp = await client.delete('/api/attachments/$id');
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
|
@ -57,7 +57,7 @@ class ChatCallProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.post(
|
final resp = await client.post(
|
||||||
'/api/channels/global/${channel.value!.alias}/calls/ongoing/token',
|
'/api/channels/global/${channel.value!.alias}/calls/ongoing/token',
|
||||||
|
@ -9,7 +9,7 @@ class ChannelProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.get('/api/channels/$realm/$alias');
|
final resp = await client.get('/api/channels/$realm/$alias');
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
@ -23,7 +23,7 @@ class ChannelProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.get('/api/channels/$realm/$alias/me');
|
final resp = await client.get('/api/channels/$realm/$alias/me');
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
@ -38,7 +38,7 @@ class ChannelProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.get('/api/channels/$realm/$alias/calls/ongoing');
|
final resp = await client.get('/api/channels/$realm/$alias/calls/ongoing');
|
||||||
if (resp.statusCode == 404) {
|
if (resp.statusCode == 404) {
|
||||||
@ -54,7 +54,7 @@ class ChannelProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.get('/api/channels/$scope');
|
final resp = await client.get('/api/channels/$scope');
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
@ -68,7 +68,7 @@ class ChannelProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.get('/api/channels/$realm/me/available');
|
final resp = await client.get('/api/channels/$realm/me/available');
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
@ -82,7 +82,7 @@ class ChannelProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.post('/api/channels/$scope', payload);
|
final resp = await client.post('/api/channels/$scope', payload);
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
@ -107,7 +107,7 @@ class ChannelProvider extends GetxController {
|
|||||||
if (related == null) return null;
|
if (related == null) return null;
|
||||||
|
|
||||||
final prof = await auth.getProfile();
|
final prof = await auth.getProfile();
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.post('/api/channels/$scope/dm', {
|
final resp = await client.post('/api/channels/$scope/dm', {
|
||||||
'alias': const Uuid().v4().replaceAll('-', '').substring(0, 12),
|
'alias': const Uuid().v4().replaceAll('-', '').substring(0, 12),
|
||||||
@ -128,7 +128,7 @@ class ChannelProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.put('/api/channels/$scope/$id', payload);
|
final resp = await client.put('/api/channels/$scope/$id', payload);
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
|
@ -6,7 +6,7 @@ class RealmProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
final resp = await client.get('/api/realms/$alias');
|
final resp = await client.get('/api/realms/$alias');
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
@ -20,7 +20,7 @@ class RealmProvider extends GetxController {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
if (!await auth.isAuthorized) throw Exception('unauthorized');
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
final resp = await client.get('/api/realms/me/available');
|
final resp = await client.get('/api/realms/me/available');
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
|
@ -32,7 +32,7 @@ class _NotificationScreenState extends State<NotificationScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (markList.isNotEmpty) {
|
if (markList.isNotEmpty) {
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
await client.put('/api/notifications/batch/read', {'messages': markList});
|
await client.put('/api/notifications/batch/read', {'messages': markList});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ class _NotificationScreenState extends State<NotificationScreen> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
await client.put('/api/notifications/${element.id}/read', {});
|
await client.put('/api/notifications/${element.id}/read', {});
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ class _PersonalizeScreenState extends State<PersonalizeScreen> {
|
|||||||
context.showErrorDialog(e);
|
context.showErrorDialog(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
final resp = await client.put(
|
final resp = await client.put(
|
||||||
'/api/users/me/$position',
|
'/api/users/me/$position',
|
||||||
@ -120,7 +120,7 @@ class _PersonalizeScreenState extends State<PersonalizeScreen> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
_birthday?.toIso8601String();
|
_birthday?.toIso8601String();
|
||||||
final resp = await client.put(
|
final resp = await client.put(
|
||||||
|
@ -110,7 +110,7 @@ class _ChannelChatScreenState extends State<ChannelChatScreen> {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) return;
|
if (!await auth.isAuthorized) return;
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.get(
|
final resp = await client.get(
|
||||||
'/api/channels/${widget.realm}/${widget.alias}/messages?take=10&offset=$pageKey');
|
'/api/channels/${widget.realm}/${widget.alias}/messages?take=10&offset=$pageKey');
|
||||||
|
@ -79,7 +79,7 @@ class _ChannelDetailScreenState extends State<ChannelDetailScreen> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.put(
|
final resp = await client.put(
|
||||||
'/api/channels/${widget.realm}/${widget.channel.alias}/members/me', {
|
'/api/channels/${widget.realm}/${widget.channel.alias}/members/me', {
|
||||||
|
@ -64,7 +64,7 @@ class _PostPublishingScreenState extends State<PostPublishingScreen> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'interactive');
|
final client = auth.configureClient('interactive');
|
||||||
|
|
||||||
final payload = {
|
final payload = {
|
||||||
'content': _contentController.value.text,
|
'content': _contentController.value.text,
|
||||||
|
@ -41,7 +41,7 @@ class _RealmOrganizeScreenState extends State<RealmOrganizeScreen> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
final payload = {
|
final payload = {
|
||||||
'alias': _aliasController.value.text.toLowerCase(),
|
'alias': _aliasController.value.text.toLowerCase(),
|
||||||
|
@ -29,7 +29,7 @@ class _ChannelDeletionDialogState extends State<ChannelDeletionDialog> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client
|
final resp = await client
|
||||||
.delete('/api/channels/${widget.realm}/${widget.channel.id}');
|
.delete('/api/channels/${widget.realm}/${widget.channel.id}');
|
||||||
@ -48,7 +48,7 @@ class _ChannelDeletionDialogState extends State<ChannelDeletionDialog> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.delete(
|
final resp = await client.delete(
|
||||||
'/api/channels/${widget.realm}/${widget.channel.alias}/members/me',
|
'/api/channels/${widget.realm}/${widget.channel.alias}/members/me',
|
||||||
|
@ -75,7 +75,7 @@ class _ChannelMemberListPopupState extends State<ChannelMemberListPopup> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.post(
|
final resp = await client.post(
|
||||||
'/api/channels/${widget.realm}/${widget.channel.alias}/members',
|
'/api/channels/${widget.realm}/${widget.channel.alias}/members',
|
||||||
@ -96,7 +96,7 @@ class _ChannelMemberListPopupState extends State<ChannelMemberListPopup> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final resp = await client.request(
|
final resp = await client.request(
|
||||||
'/api/channels/${widget.realm}/${widget.channel.alias}/members',
|
'/api/channels/${widget.realm}/${widget.channel.alias}/members',
|
||||||
|
@ -33,7 +33,7 @@ class _ChatCallButtonState extends State<ChatCallButton> {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) return;
|
if (!await auth.isAuthorized) return;
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ class _ChatCallButtonState extends State<ChatCallButton> {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) return;
|
if (!await auth.isAuthorized) return;
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class _ChatMessageDeletionDialogState extends State<ChatMessageDeletionDialog> {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) return;
|
if (!await auth.isAuthorized) return;
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ class _ChatMessageInputState extends State<ChatMessageInput> {
|
|||||||
final prof = await auth.getProfile();
|
final prof = await auth.getProfile();
|
||||||
if (!await auth.isAuthorized) return;
|
if (!await auth.isAuthorized) return;
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'messaging');
|
final client = auth.configureClient('messaging');
|
||||||
|
|
||||||
final payload = {
|
final payload = {
|
||||||
'uuid': const Uuid().v4(),
|
'uuid': const Uuid().v4(),
|
||||||
|
@ -153,7 +153,7 @@ class _PostDeletionDialogState extends State<PostDeletionDialog> {
|
|||||||
final AuthProvider auth = Get.find();
|
final AuthProvider auth = Get.find();
|
||||||
if (!await auth.isAuthorized) return;
|
if (!await auth.isAuthorized) return;
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'interactive');
|
final client = auth.configureClient('interactive');
|
||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
final resp = await client.delete('/api/posts/${widget.item.id}');
|
final resp = await client.delete('/api/posts/${widget.item.id}');
|
||||||
|
@ -50,7 +50,7 @@ class _PostQuickActionState extends State<PostQuickAction> {
|
|||||||
if (_isSubmitting) return;
|
if (_isSubmitting) return;
|
||||||
if (!await auth.isAuthorized) return;
|
if (!await auth.isAuthorized) return;
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'interactive');
|
final client = auth.configureClient('interactive');
|
||||||
|
|
||||||
setState(() => _isSubmitting = true);
|
setState(() => _isSubmitting = true);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ class _RealmDeletionDialogState extends State<RealmDeletionDialog> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
final resp = await client.delete('/api/realms/${widget.realm.id}');
|
final resp = await client.delete('/api/realms/${widget.realm.id}');
|
||||||
if (resp.statusCode != 200) {
|
if (resp.statusCode != 200) {
|
||||||
@ -45,7 +45,7 @@ class _RealmDeletionDialogState extends State<RealmDeletionDialog> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
final resp =
|
final resp =
|
||||||
await client.delete('/api/realms/${widget.realm.id}/members/me');
|
await client.delete('/api/realms/${widget.realm.id}/members/me');
|
||||||
|
@ -72,7 +72,7 @@ class _RealmMemberListPopupState extends State<RealmMemberListPopup> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
final resp = await client.post(
|
final resp = await client.post(
|
||||||
'/api/realms/${widget.realm.alias}/members',
|
'/api/realms/${widget.realm.alias}/members',
|
||||||
@ -93,7 +93,7 @@ class _RealmMemberListPopupState extends State<RealmMemberListPopup> {
|
|||||||
|
|
||||||
setState(() => _isBusy = true);
|
setState(() => _isBusy = true);
|
||||||
|
|
||||||
final client = auth.configureClient(service: 'passport');
|
final client = auth.configureClient('passport');
|
||||||
|
|
||||||
final resp = await client.request(
|
final resp = await client.request(
|
||||||
'/api/realms/${widget.realm.alias}/members',
|
'/api/realms/${widget.realm.alias}/members',
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <file_selector_linux/file_selector_plugin.h>
|
#include <file_selector_linux/file_selector_plugin.h>
|
||||||
|
#include <flutter_acrylic/flutter_acrylic_plugin.h>
|
||||||
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
||||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||||
#include <sentry_flutter/sentry_flutter_plugin.h>
|
#include <sentry_flutter/sentry_flutter_plugin.h>
|
||||||
@ -16,6 +17,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
|||||||
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
|
||||||
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
|
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
|
||||||
|
g_autoptr(FlPluginRegistrar) flutter_acrylic_registrar =
|
||||||
|
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterAcrylicPlugin");
|
||||||
|
flutter_acrylic_plugin_register_with_registrar(flutter_acrylic_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
|
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
|
||||||
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
|
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
file_selector_linux
|
file_selector_linux
|
||||||
|
flutter_acrylic
|
||||||
flutter_secure_storage_linux
|
flutter_secure_storage_linux
|
||||||
flutter_webrtc
|
flutter_webrtc
|
||||||
sentry_flutter
|
sentry_flutter
|
||||||
|
@ -14,6 +14,7 @@ import flutter_local_notifications
|
|||||||
import flutter_secure_storage_macos
|
import flutter_secure_storage_macos
|
||||||
import flutter_webrtc
|
import flutter_webrtc
|
||||||
import livekit_client
|
import livekit_client
|
||||||
|
import macos_window_utils
|
||||||
import package_info_plus
|
import package_info_plus
|
||||||
import path_provider_foundation
|
import path_provider_foundation
|
||||||
import sentry_flutter
|
import sentry_flutter
|
||||||
@ -33,6 +34,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
|||||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||||
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
|
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
|
||||||
LiveKitPlugin.register(with: registry.registrar(forPlugin: "LiveKitPlugin"))
|
LiveKitPlugin.register(with: registry.registrar(forPlugin: "LiveKitPlugin"))
|
||||||
|
MacOSWindowUtilsPlugin.register(with: registry.registrar(forPlugin: "MacOSWindowUtilsPlugin"))
|
||||||
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
|
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin"))
|
SentryFlutterPlugin.register(with: registry.registrar(forPlugin: "SentryFlutterPlugin"))
|
||||||
|
16
pubspec.lock
16
pubspec.lock
@ -334,6 +334,14 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
|
flutter_acrylic:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: flutter_acrylic
|
||||||
|
sha256: b3996dbde5abf5823cc9ead4cf2e5267c3181f15585fe47ce4dc4472e7ec827a
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.4"
|
||||||
flutter_animate:
|
flutter_animate:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -688,6 +696,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
|
macos_window_utils:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: macos_window_utils
|
||||||
|
sha256: "230be594d26f6dee92c5a1544f4242d25138a5bfb9f185b27f14de3949ef0be8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.5.0"
|
||||||
markdown:
|
markdown:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -69,6 +69,7 @@ dependencies:
|
|||||||
package_info_plus: ^8.0.0
|
package_info_plus: ^8.0.0
|
||||||
device_info_plus: ^10.1.0
|
device_info_plus: ^10.1.0
|
||||||
shared_preferences: ^2.2.3
|
shared_preferences: ^2.2.3
|
||||||
|
flutter_acrylic: ^1.1.4
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
|
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
|
||||||
#include <file_selector_windows/file_selector_windows.h>
|
#include <file_selector_windows/file_selector_windows.h>
|
||||||
#include <firebase_core/firebase_core_plugin_c_api.h>
|
#include <firebase_core/firebase_core_plugin_c_api.h>
|
||||||
|
#include <flutter_acrylic/flutter_acrylic_plugin.h>
|
||||||
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
||||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||||
#include <livekit_client/live_kit_plugin.h>
|
#include <livekit_client/live_kit_plugin.h>
|
||||||
@ -24,6 +25,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
|||||||
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
||||||
FirebaseCorePluginCApiRegisterWithRegistrar(
|
FirebaseCorePluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
|
||||||
|
FlutterAcrylicPluginRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("FlutterAcrylicPlugin"));
|
||||||
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
|
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
||||||
FlutterWebRTCPluginRegisterWithRegistrar(
|
FlutterWebRTCPluginRegisterWithRegistrar(
|
||||||
|
@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
|||||||
connectivity_plus
|
connectivity_plus
|
||||||
file_selector_windows
|
file_selector_windows
|
||||||
firebase_core
|
firebase_core
|
||||||
|
flutter_acrylic
|
||||||
flutter_secure_storage_windows
|
flutter_secure_storage_windows
|
||||||
flutter_webrtc
|
flutter_webrtc
|
||||||
livekit_client
|
livekit_client
|
||||||
|
Loading…
Reference in New Issue
Block a user