Compare commits
2 Commits
4041d6dc4e
...
1fc84099fe
Author | SHA1 | Date | |
---|---|---|---|
1fc84099fe | |||
f8755f5220 |
@ -3,10 +3,9 @@ import 'dart:convert';
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:crypto/crypto.dart';
|
||||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:flutter_udid/flutter_udid.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:solian/exceptions/request.dart';
|
||||
@ -172,7 +171,6 @@ class WebSocketProvider extends GetxController {
|
||||
log("Unable to active push notifications, couldn't get device uuid");
|
||||
return;
|
||||
} else {
|
||||
deviceUuid = md5.convert(utf8.encode(deviceUuid)).toString();
|
||||
log('Device UUID is $deviceUuid');
|
||||
}
|
||||
|
||||
@ -198,33 +196,7 @@ class WebSocketProvider extends GetxController {
|
||||
}
|
||||
|
||||
Future<String?> _getDeviceUuid() async {
|
||||
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
||||
if (PlatformInfo.isWeb) {
|
||||
final webInfo = await deviceInfo.webBrowserInfo;
|
||||
return webInfo.vendor! +
|
||||
webInfo.userAgent! +
|
||||
webInfo.hardwareConcurrency.toString();
|
||||
}
|
||||
if (PlatformInfo.isAndroid) {
|
||||
final androidInfo = await deviceInfo.androidInfo;
|
||||
return androidInfo.id;
|
||||
}
|
||||
if (PlatformInfo.isIOS) {
|
||||
final iosInfo = await deviceInfo.iosInfo;
|
||||
return iosInfo.identifierForVendor!;
|
||||
}
|
||||
if (PlatformInfo.isLinux) {
|
||||
final linuxInfo = await deviceInfo.linuxInfo;
|
||||
return linuxInfo.machineId!;
|
||||
}
|
||||
if (PlatformInfo.isWindows) {
|
||||
final windowsInfo = await deviceInfo.windowsInfo;
|
||||
return windowsInfo.deviceId;
|
||||
}
|
||||
if (PlatformInfo.isMacOS) {
|
||||
final macosInfo = await deviceInfo.macOsInfo;
|
||||
return macosInfo.systemGUID;
|
||||
}
|
||||
return null;
|
||||
if (PlatformInfo.isWeb) return null;
|
||||
return await FlutterUdid.consistentUdid;
|
||||
}
|
||||
}
|
||||
|
@ -108,10 +108,10 @@ class _ExploreScreenState extends State<ExploreScreen>
|
||||
RealmSwitcher(),
|
||||
],
|
||||
).paddingSymmetric(horizontal: 8),
|
||||
),
|
||||
).paddingSymmetric(vertical: 4),
|
||||
TabBar(
|
||||
controller: _tabController,
|
||||
dividerHeight: 0.3,
|
||||
dividerHeight: scrollProgress > 0 ? 0 : 0.3,
|
||||
tabAlignment: TabAlignment.fill,
|
||||
tabs: [
|
||||
Tab(
|
||||
@ -138,8 +138,10 @@ class _ExploreScreenState extends State<ExploreScreen>
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Icons.shuffle_on_outlined,
|
||||
size: 20),
|
||||
const Icon(
|
||||
Icons.shuffle_on_outlined,
|
||||
size: 20,
|
||||
),
|
||||
const Gap(8),
|
||||
Text('postListShuffle'.tr),
|
||||
],
|
||||
@ -151,7 +153,7 @@ class _ExploreScreenState extends State<ExploreScreen>
|
||||
).paddingOnly(top: MediaQuery.of(context).padding.top),
|
||||
),
|
||||
),
|
||||
expandedHeight: 96,
|
||||
expandedHeight: 104,
|
||||
snap: true,
|
||||
floating: true,
|
||||
toolbarHeight: AppTheme.toolbarHeight(context),
|
||||
|
@ -182,7 +182,10 @@ class _PostPublishScreenState extends State<PostPublishScreen> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ListTile(
|
||||
tileColor: Theme.of(context).colorScheme.surfaceContainerLow,
|
||||
tileColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.surfaceContainerLow
|
||||
.withOpacity(0.5),
|
||||
title: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
@ -186,10 +186,7 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
|
||||
if (widget.isFullWidth && _attachments.length == 1) {
|
||||
final element = _attachments.first;
|
||||
double ratio = math.max(
|
||||
element!.metadata?['ratio']?.toDouble() ?? 16 / 9,
|
||||
0.5,
|
||||
);
|
||||
double ratio = element!.metadata?['ratio']?.toDouble() ?? 16 / 9;
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
constraints: BoxConstraints(
|
||||
@ -199,6 +196,10 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
aspectRatio: ratio,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.surfaceContainer
|
||||
.withOpacity(0.5),
|
||||
border: Border.symmetric(
|
||||
horizontal: BorderSide(
|
||||
color: Theme.of(context).dividerColor,
|
||||
@ -231,7 +232,10 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
final element = _attachments[idx];
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.surfaceContainer
|
||||
.withOpacity(0.5),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 1,
|
||||
@ -256,10 +260,7 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
final element = _attachments[idx];
|
||||
idx++;
|
||||
if (element == null) return const SizedBox.shrink();
|
||||
double ratio = math.max(
|
||||
element.metadata?['ratio']?.toDouble() ?? 16 / 9,
|
||||
0.5,
|
||||
);
|
||||
double ratio = element.metadata?['ratio']?.toDouble() ?? 16 / 9;
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: widget.columnMaxWidth,
|
||||
@ -269,6 +270,10 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
aspectRatio: ratio,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.surfaceContainer
|
||||
.withOpacity(0.5),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 1,
|
||||
@ -298,10 +303,7 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
itemBuilder: (context, idx) {
|
||||
final element = _attachments[idx];
|
||||
if (element == null) const SizedBox.shrink();
|
||||
double ratio = math.max(
|
||||
element!.metadata?['ratio']?.toDouble() ?? 16 / 9,
|
||||
0.5,
|
||||
);
|
||||
final ratio = element!.metadata?['ratio']?.toDouble() ?? 16 / 9;
|
||||
return Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: math.min(
|
||||
@ -314,6 +316,10 @@ class _AttachmentListState extends State<AttachmentList> {
|
||||
aspectRatio: ratio,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.surfaceContainer
|
||||
.withOpacity(0.5),
|
||||
border: Border.all(
|
||||
color: Theme.of(context).dividerColor,
|
||||
width: 1,
|
||||
|
@ -10,6 +10,7 @@
|
||||
#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_udid/flutter_udid_plugin.h>
|
||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||
#include <media_kit_libs_linux/media_kit_libs_linux_plugin.h>
|
||||
#include <media_kit_video/media_kit_video_plugin.h>
|
||||
@ -30,6 +31,9 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
|
||||
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
|
||||
g_autoptr(FlPluginRegistrar) flutter_udid_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterUdidPlugin");
|
||||
flutter_udid_plugin_register_with_registrar(flutter_udid_registrar);
|
||||
g_autoptr(FlPluginRegistrar) flutter_webrtc_registrar =
|
||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterWebRTCPlugin");
|
||||
flutter_web_r_t_c_plugin_register_with_registrar(flutter_webrtc_registrar);
|
||||
|
@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
file_selector_linux
|
||||
flutter_acrylic
|
||||
flutter_secure_storage_linux
|
||||
flutter_udid
|
||||
flutter_webrtc
|
||||
media_kit_libs_linux
|
||||
media_kit_video
|
||||
|
@ -15,6 +15,7 @@ import firebase_crashlytics
|
||||
import firebase_messaging
|
||||
import flutter_local_notifications
|
||||
import flutter_secure_storage_macos
|
||||
import flutter_udid
|
||||
import flutter_webrtc
|
||||
import gal
|
||||
import in_app_review
|
||||
@ -45,6 +46,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
|
||||
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
|
||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
||||
FlutterUdidPlugin.register(with: registry.registrar(forPlugin: "FlutterUdidPlugin"))
|
||||
FlutterWebRTCPlugin.register(with: registry.registrar(forPlugin: "FlutterWebRTCPlugin"))
|
||||
GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))
|
||||
InAppReviewPlugin.register(with: registry.registrar(forPlugin: "InAppReviewPlugin"))
|
||||
|
12
pubspec.lock
12
pubspec.lock
@ -783,10 +783,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_markdown
|
||||
sha256: e17575ca576a34b46c58c91f9948891117a1bd97815d2e661813c7f90c647a78
|
||||
sha256: bd9c475d9aae256369edacafc29d1e74c81f78a10cdcdacbbbc9e3c43d009e4a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.3+2"
|
||||
version: "0.7.4"
|
||||
flutter_native_splash:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
@ -888,6 +888,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.2.0"
|
||||
flutter_udid:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_udid
|
||||
sha256: "63384bd96203aaefccfd7137fab642edda18afede12b0e9e1a2c96fe2589fd07"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
flutter_web_plugins:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
|
@ -83,6 +83,7 @@ dependencies:
|
||||
action_slider: ^0.7.0
|
||||
in_app_review: ^2.0.9
|
||||
syntax_highlight: ^0.4.0
|
||||
flutter_udid: ^3.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
@ -12,6 +12,7 @@
|
||||
#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_udid/flutter_udid_plugin_c_api.h>
|
||||
#include <flutter_webrtc/flutter_web_r_t_c_plugin.h>
|
||||
#include <gal/gal_plugin_c_api.h>
|
||||
#include <livekit_client/live_kit_plugin.h>
|
||||
@ -38,6 +39,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
registry->GetRegistrarForPlugin("FlutterAcrylicPlugin"));
|
||||
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
||||
FlutterUdidPluginCApiRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterUdidPluginCApi"));
|
||||
FlutterWebRTCPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("FlutterWebRTCPlugin"));
|
||||
GalPluginCApiRegisterWithRegistrar(
|
||||
|
@ -9,6 +9,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
|
||||
firebase_core
|
||||
flutter_acrylic
|
||||
flutter_secure_storage_windows
|
||||
flutter_udid
|
||||
flutter_webrtc
|
||||
gal
|
||||
livekit_client
|
||||
|
Loading…
x
Reference in New Issue
Block a user