chore: Update SDK

This commit is contained in:
Christian Pauly 2022-06-20 15:35:22 +02:00
parent ed2d208339
commit 9f5a553c1b
12 changed files with 94 additions and 46 deletions

View File

@ -1,5 +1,5 @@
variables:
FLUTTER_VERSION: 3.0.1
FLUTTER_VERSION: 3.0.2
image: cirrusci/flutter:${FLUTTER_VERSION}
@ -195,7 +195,7 @@ build_linux_x86:
stage: coverage
before_script:
[
sudo apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install keyboard-configuration -y && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libjsoncpp1 libsecret-1-dev libsecret-1-0 librhash0 -y,
sudo apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install keyboard-configuration -y && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 -y,
]
script: [./scripts/build-linux.sh]
artifacts:

View File

@ -25,7 +25,7 @@
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-sdk
tools:overrideLibrary="io.wazo.callkeep, net.touchcapture.qr.flutterqr, com.cloudwebrtc.webrtc, org.webrtc, com.it_nomads.fluttersecurestorage, com.pichillilorenzo.flutter_inappwebview, com.example.video_compress, com.otaliastudios.transcoder, com.otaliastudios.opengl, com.kineapps.flutter_file_dialog"/>
tools:overrideLibrary="io.wazo.callkeep, net.touchcapture.qr.flutterqr, com.cloudwebrtc.webrtc, org.webrtc, com.it_nomads.fluttersecurestorage, com.pichillilorenzo.flutter_inappwebview, com.example.video_compress, com.otaliastudios.transcoder, com.otaliastudios.opengl, com.kineapps.flutter_file_dialog, com.llfbandit.record"/>
<application
android:label="FluffyChat"

View File

@ -399,6 +399,19 @@ class ChatController extends State<Chat> {
}
void voiceMessageAction() async {
if (PlatformInfos.isAndroid) {
final info = await DeviceInfoPlugin().androidInfo;
if ((info.version.sdkInt ?? 16) < 19) {
showOkAlertDialog(
context: context,
title: L10n.of(context)!.unsupportedAndroidVersion,
message: L10n.of(context)!.unsupportedAndroidVersionLong,
okLabel: L10n.of(context)!.close,
);
return;
}
}
if (await Record().hasPermission() == false) return;
final result = await showDialog<RecordingResult>(
context: context,

View File

@ -246,7 +246,8 @@ class ChatInputRow extends StatelessWidget {
),
),
),
if (PlatformInfos.isMobile && controller.inputText.isEmpty)
if (PlatformInfos.platformCanRecord &&
controller.inputText.isEmpty)
Container(
height: 56,
alignment: Alignment.center,

View File

@ -33,7 +33,7 @@ class _RecordingDialogState extends State<RecordingDialog> {
final List<double> amplitudeTimeline = [];
static const int bitRate = 64000;
static const double samplingRate = 22050.0;
static const int samplingRate = 22050;
Future<void> startRecording() async {
try {
@ -49,7 +49,6 @@ class _RecordingDialogState extends State<RecordingDialog> {
await Wakelock.enable();
await _audioRecorder.start(
path: _recordedPath,
encoder: AudioEncoder.AAC,
bitRate: bitRate,
samplingRate: samplingRate,
);

View File

@ -193,8 +193,8 @@ class _MyCallingPage extends State<Calling> {
final call = this.call;
if (call == null) return;
call.onCallStateChanged.listen(_handleCallState);
call.onCallEventChanged.listen((event) {
call.onCallStateChanged.stream.listen(_handleCallState);
call.onCallEventChanged.stream.listen((event) {
if (event == CallEvent.kFeedsChanged) {
setState(() {
call.tryRemoveStopedStreams();

View File

@ -30,6 +30,8 @@ abstract class PlatformInfos {
static bool get usesTouchscreen => !isMobile;
static bool get platformCanRecord => (isMobile || isMacOS);
static String get clientName =>
'${AppConfig.applicationName} ${isWeb ? 'web' : Platform.operatingSystem}${kReleaseMode ? '' : 'Debug'}';

View File

@ -11,7 +11,7 @@ import 'package:fluffychat/utils/voip_plugin.dart';
class CallKeeper {
CallKeeper(this.callKeepManager, this.uuid, this.number, this.call) {
call?.onCallStateChanged.listen(_handleCallState);
call?.onCallStateChanged.stream.listen(_handleCallState);
}
CallKeepManager callKeepManager;
@ -119,12 +119,12 @@ class CallKeepManager {
await displayIncomingCall(call);
call.onCallStateChanged.listen((state) {
call.onCallStateChanged.stream.listen((state) {
if (state == CallState.kEnded) {
_callKeep.endAllCalls();
}
});
call.onCallEventChanged.listen((event) {
call.onCallEventChanged.stream.listen((event) {
if (event == CallEvent.kLocalHoldUnhold) {
Logs().i(
'Call hold event: local ${call.localHold}, remote ${call.remoteOnHold}');

View File

@ -154,4 +154,14 @@ class VoipPlugin extends WidgetsBindingObserver implements WebRTCDelegate {
overlayEntry = null;
}
}
@override
void handleGroupCallEnded(GroupCall groupCall) {
// TODO: implement handleGroupCallEnded
}
@override
void handleNewGroupCall(GroupCall groupCall) {
// TODO: implement handleNewGroupCall
}
}

View File

@ -19,6 +19,7 @@ import geolocator_apple
import just_audio
import package_info_plus_macos
import path_provider_macos
import record_macos
import share_plus_macos
import shared_preferences_macos
import sqflite
@ -41,6 +42,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
RecordMacosPlugin.register(with: registry.registrar(forPlugin: "RecordMacosPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))

View File

@ -21,7 +21,7 @@ packages:
name: adaptive_theme
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.1"
version: "3.0.0"
analyzer:
dependency: transitive
description:
@ -324,7 +324,7 @@ packages:
name: device_info_plus
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.2"
version: "4.0.0"
device_info_plus_linux:
dependency: transitive
description:
@ -338,7 +338,7 @@ packages:
name: device_info_plus_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.2"
version: "2.2.3"
device_info_plus_platform_interface:
dependency: transitive
description:
@ -497,7 +497,7 @@ packages:
name: flutter_blurhash
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4"
version: "0.7.0"
flutter_cache_manager:
dependency: "direct main"
description:
@ -584,7 +584,7 @@ packages:
name: flutter_map
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.0"
version: "1.1.0"
flutter_math_fork:
dependency: transitive
description:
@ -701,7 +701,7 @@ packages:
name: flutter_typeahead
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.5"
version: "4.0.0"
flutter_web_auth:
dependency: "direct main"
description:
@ -1019,7 +1019,7 @@ packages:
name: matrix
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.12"
version: "0.10.1"
matrix_api_lite:
dependency: transitive
description:
@ -1105,7 +1105,7 @@ packages:
name: octo_image
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.0.2"
olm:
dependency: transitive
description:
@ -1245,14 +1245,14 @@ packages:
name: permission_handler
url: "https://pub.dartlang.org"
source: hosted
version: "9.2.0"
version: "10.0.0"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
url: "https://pub.dartlang.org"
source: hosted
version: "9.0.2+1"
version: "10.0.0"
permission_handler_apple:
dependency: transitive
description:
@ -1309,6 +1309,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.2"
polylabel:
dependency: transitive
description:
name: polylabel
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
pool:
dependency: transitive
description:
@ -1408,21 +1415,42 @@ packages:
name: record
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.3"
version: "4.1.1"
record_linux:
dependency: transitive
description:
name: record_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
record_macos:
dependency: transitive
description:
name: record_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0"
record_platform_interface:
dependency: transitive
description:
name: record_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
version: "0.3.0"
record_web:
dependency: transitive
description:
name: record_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.1"
version: "0.3.1"
record_windows:
dependency: transitive
description:
name: record_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3"
rxdart:
dependency: transitive
description:
@ -1443,7 +1471,7 @@ packages:
name: scroll_to_index
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
version: "3.0.1"
sdp_transform:
dependency: transitive
description:
@ -1464,7 +1492,7 @@ packages:
name: share_plus
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.8"
version: "4.0.9"
share_plus_linux:
dependency: transitive
description:
@ -1724,13 +1752,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
transparent_image:
dependency: transitive
description:
name: transparent_image
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
tuple:
dependency: transitive
description:
@ -2068,5 +2089,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.17.0-0 <3.0.0"
flutter: ">=2.13.0-0.2.pre"
dart: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"

View File

@ -8,7 +8,7 @@ environment:
dependencies:
adaptive_dialog: ^1.5.1
adaptive_theme: ^2.3.1
adaptive_theme: ^3.0.0
animations: ^2.0.2
blurhash_dart: ^1.1.0
cached_network_image: ^3.2.0
@ -20,7 +20,7 @@ dependencies:
desktop_drop: ^0.3.2
desktop_lifecycle: ^0.1.0
desktop_notifications: ^0.6.3
device_info_plus: ^3.2.1
device_info_plus: ^4.0.0
dynamic_color: ^1.2.2
email_validator: ^2.0.1
emoji_picker_flutter: ^1.1.2
@ -31,12 +31,12 @@ dependencies:
sdk: flutter
flutter_app_badger: ^1.3.0
flutter_app_lock: ^2.0.0
flutter_blurhash: ^0.6.4
flutter_blurhash: ^0.7.0
flutter_cache_manager: ^3.3.0
flutter_local_notifications: ^9.4.0
flutter_localizations:
sdk: flutter
flutter_map: ^0.14.0
flutter_map: ^1.1.0
flutter_matrix_html: ^1.1.0
flutter_olm: ^1.2.0
flutter_openssl_crypto: ^0.1.0
@ -44,7 +44,7 @@ dependencies:
flutter_secure_storage: ^5.0.2
flutter_slidable: ^1.2.0
flutter_svg: ^0.22.0
flutter_typeahead: ^3.2.5
flutter_typeahead: ^4.0.0
flutter_web_auth: ^0.4.0
flutter_webrtc: ^0.8.7
future_loading_dialog: ^0.2.3
@ -57,25 +57,25 @@ dependencies:
keyboard_shortcuts: ^0.1.4
localstorage: ^4.0.0+1
lottie: ^1.2.2
matrix: ^0.9.12
matrix: ^0.10.1
matrix_homeserver_recommendations: ^0.2.0
matrix_link_text: ^1.0.2
native_imaging:
git: https://gitlab.com/famedly/company/frontend/libraries/native_imaging.git
package_info_plus: ^1.3.0
path_provider: ^2.0.9
permission_handler: ^9.2.0
permission_handler: ^10.0.0
pin_code_text_field: ^1.8.0
provider: ^6.0.2
punycode: ^1.0.0
qr_code_scanner: ^0.7.0
qr_flutter: ^4.0.0
receive_sharing_intent: ^1.4.5
record: ^3.0.2
record: ^4.1.1
salomon_bottom_bar: ^3.2.0
scroll_to_index: ^2.1.1
scroll_to_index: ^3.0.1
sentry: ^6.3.0
share_plus: ^4.0.8
share_plus: ^4.0.9
shared_preferences: ^2.0.13
slugify: ^2.0.0
snapping_sheet: ^3.1.0