Skip to content

Commit

Permalink
fix(conflict): resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
lambiengcode committed Feb 10, 2025
2 parents 084d518 + ee804e6 commit 0556e78
Show file tree
Hide file tree
Showing 26 changed files with 989 additions and 844 deletions.
5 changes: 3 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if (localPropertiesFile.exists()) {

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
Expand All @@ -32,6 +32,7 @@ if (keystorePropertiesFile.exists()) {
}

android {

compileSdkVersion 34

buildFeatures {
Expand Down Expand Up @@ -78,7 +79,7 @@ android {

buildTypes {
debug {
// TODO: Add your own signing config for the release build.
// TODO: Add your own signing config for the debug build.
// Signing with the debug keys for now, so `flutter run --release` works.
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.common
Expand Down
4 changes: 2 additions & 2 deletions lib/core/app/colors/app_color.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Color mCU = Colors.grey.shade300;
Color mCH = Colors.grey.shade400;
Color mGB = Colors.grey.shade500;
Color mGD = Colors.grey.shade900;
Color mCD = Colors.black.withOpacity(0.075);
Color mCC = Colors.green.withOpacity(0.65);
Color mCD = Colors.black.withValues(alpha: 0.075);
Color mCC = Colors.green.withValues(alpha: 0.65);
Color fCD = Colors.grey.shade700;
Color fCL = Colors.grey;

Expand Down
4 changes: 2 additions & 2 deletions lib/core/app/themes/app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AppTheme {
final appColors = AppColor.light();
final themeData = ThemeData(
colorSchemeSeed: colorSeed.color,
cardColor: Colors.black.withOpacity(0.04),
cardColor: Colors.black.withValues(alpha: .04),
textTheme: TextTheme(
labelMedium: TextStyle(color: fCD),
),
Expand All @@ -37,7 +37,7 @@ class AppTheme {
bottomSheetTheme: ThemeData.dark().bottomSheetTheme.copyWith(
elevation: 0,
modalElevation: 0,
modalBarrierColor: Colors.blueGrey.withOpacity(.2),
modalBarrierColor: Colors.blueGrey.withValues(alpha: .2),
),
appBarTheme: AppBarTheme(
scrolledUnderElevation: 0,
Expand Down
4 changes: 3 additions & 1 deletion lib/core/method_channels/pip_channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class PipChannel {
required bool isRemoteCameraEnable,
}) async {
if (!Platform.isIOS ||
DateTime.now().difference(_latestUpdate).inSeconds <= 2) return;
DateTime.now().difference(_latestUpdate).inSeconds <= 2) {
return;
}

if (_isCreatedPip) {
if (_currentRemote == remoteStreamId) {
Expand Down
2 changes: 1 addition & 1 deletion lib/core/utils/modal/show_snackbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ showSnackBarWaterbus({
color: Theme.of(AppNavigator.context!)
.colorScheme
.surfaceContainer
.withOpacity(0.7),
.withValues(alpha: 0.7),
),
child: child ??
Text(
Expand Down
4 changes: 3 additions & 1 deletion lib/features/chats/presentation/bloc/chat_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ class ChatBloc extends Bloc<ChatEvent, ChatState> {

if (index != -1) {
if (event.isUpdateMessage &&
_conversations[index].latestMessage?.id != event.message.id) return;
_conversations[index].latestMessage?.id != event.message.id) {
return;
}

_conversations[index].latestMessage = event.message;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class BottomSheetDelete extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.surfaceContainer
.withOpacity(0.7),
.withValues(alpha: 0.7),
child: Text(
description ?? Strings.sureDeleteConversation.i18n,
textAlign: TextAlign.center,
Expand Down
3 changes: 2 additions & 1 deletion lib/features/chats/presentation/widgets/chat_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class _ChatCardState extends State<ChatCard> {
return MouseRegion(
onEnter: (_) {
setState(() {
_background = Theme.of(context).colorScheme.primary.withOpacity(.1);
_background =
Theme.of(context).colorScheme.primary.withValues(alpha: .1);
});
},
onExit: (_) {
Expand Down
5 changes: 4 additions & 1 deletion lib/features/chats/presentation/widgets/option_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ class ButtonOptionWidget extends StatelessWidget {
child: Container(
height: 42.sp,
alignment: Alignment.center,
color: Theme.of(context).colorScheme.surfaceContainer.withOpacity(0.7),
color: Theme.of(context)
.colorScheme
.surfaceContainer
.withValues(alpha: 0.7),
child: Text(
text,
style: TextStyle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class WaterbusImagePicker {
foregroundColor: WidgetStateProperty.resolveWith<Color>(
(states) {
if (states.contains(WidgetState.pressed)) {
return Colors.black.withOpacity(0.5);
return Colors.black.withValues(alpha: 0.5);
}
return Colors.black;
},
Expand Down
185 changes: 98 additions & 87 deletions lib/features/conversation/widgets/input_send_message.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:phosphor_flutter/phosphor_flutter.dart';
Expand Down Expand Up @@ -75,99 +76,109 @@ class _InputSendMessageState extends State<InputSendMessage> {
(messageBeingEdited.data == _messageController.text.trim() ||
_messageController.text.isEmpty);

return Container(
padding: EdgeInsets.only(left: 6.sp, right: 2.75.sp),
alignment: Alignment.center,
decoration: BoxDecoration(
color: WebRTC.platformIsMobile
? Theme.of(context).colorScheme.surfaceContainerHighest
: Colors.transparent,
borderRadius: WebRTC.platformIsMobile
? BorderRadius.circular(30.sp)
: BorderRadius.zero,
),
child: Row(
children: [
Expanded(
child: TextFormField(
onFieldSubmitted: (val) => _handleSendMessage(
messageBeingEdited: messageBeingEdited,
),
focusNode: _focusNode,
controller: _messageController,
style: TextStyle(fontSize: 12.sp),
keyboardType: TextInputType.multiline,
minLines: 1,
maxLines: 2,
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(
horizontal: 10.sp,
return CallbackShortcuts(
bindings: {
const SingleActivator(LogicalKeyboardKey.enter): () {
_handleSendMessage(
messageBeingEdited: messageBeingEdited,
);
},
},
child: Container(
padding: EdgeInsets.only(left: 6.sp, right: 2.75.sp),
alignment: Alignment.center,
decoration: BoxDecoration(
color: WebRTC.platformIsMobile
? Theme.of(context).colorScheme.surfaceContainerHighest
: Colors.transparent,
borderRadius: WebRTC.platformIsMobile
? BorderRadius.circular(30.sp)
: BorderRadius.zero,
),
child: Row(
children: [
Expanded(
child: TextFormField(
onFieldSubmitted: (val) => _handleSendMessage(
messageBeingEdited: messageBeingEdited,
),
hintText: Strings.leaveAMessage.i18n,
hintStyle: TextStyle(fontSize: 12.sp),
filled: true,
fillColor: WebRTC.platformIsMobile
? Theme.of(context)
.colorScheme
.surfaceContainerHighest
: Colors.transparent,
border: OutlineInputBorder(
borderRadius: WebRTC.platformIsMobile
? BorderRadius.circular(40.sp)
: BorderRadius.zero,
borderSide: BorderSide.none,
focusNode: _focusNode,
controller: _messageController,
style: TextStyle(fontSize: 12.sp),
keyboardType: TextInputType.multiline,
minLines: 1,
maxLines: 2,
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(
horizontal: 10.sp,
),
hintText: Strings.leaveAMessage.i18n,
hintStyle: TextStyle(fontSize: 12.sp),
filled: true,
fillColor: WebRTC.platformIsMobile
? Theme.of(context)
.colorScheme
.surfaceContainerHighest
: Colors.transparent,
border: OutlineInputBorder(
borderRadius: WebRTC.platformIsMobile
? BorderRadius.circular(40.sp)
: BorderRadius.zero,
borderSide: BorderSide.none,
),
hoverColor: Colors.transparent,
),
hoverColor: Colors.transparent,
onChanged: (val) {
setState(() {});
},
),
onChanged: (val) {
setState(() {});
},
),
),
GestureWrapper(
isCloseKeyboard: false,
onTap: () {
if (dataEditing) {
_messageController.text = '';
_requestFocus(isFocus: false);
AppBloc.messageBloc.add(MessageEditingCancelled());
} else {
_handleSendMessage(
messageBeingEdited: messageBeingEdited,
);
}
},
child: dataEditing
? Padding(
padding: EdgeInsets.all(7.sp),
child: Icon(
PhosphorIcons.x(),
color: WebRTC.platformIsMobile
? mCL
: Theme.of(context).colorScheme.primary,
size: SizerUtil.isDesktop ? 22.sp : 18.sp,
),
)
: Container(
decoration: WebRTC.platformIsMobile
? BoxDecoration(
color: Theme.of(context).colorScheme.primary,
shape: BoxShape.circle,
)
: null,
padding: EdgeInsets.all(7.sp),
child: Icon(
PhosphorIcons.paperPlaneRight(
PhosphorIconsStyle.fill,
GestureWrapper(
isCloseKeyboard: false,
onTap: () {
if (dataEditing) {
_messageController.text = '';
_requestFocus(isFocus: false);
AppBloc.messageBloc.add(MessageEditingCancelled());
} else {
_handleSendMessage(
messageBeingEdited: messageBeingEdited,
);
}
},
child: dataEditing
? Padding(
padding: EdgeInsets.all(7.sp),
child: Icon(
PhosphorIcons.x(),
color: WebRTC.platformIsMobile
? mCL
: Theme.of(context).colorScheme.primary,
size: SizerUtil.isDesktop ? 22.sp : 18.sp,
),
)
: Container(
decoration: WebRTC.platformIsMobile
? BoxDecoration(
color:
Theme.of(context).colorScheme.primary,
shape: BoxShape.circle,
)
: null,
padding: EdgeInsets.all(7.sp),
child: Icon(
PhosphorIcons.paperPlaneRight(
PhosphorIconsStyle.fill,
),
color: WebRTC.platformIsMobile
? mCL
: Theme.of(context).colorScheme.primary,
size: SizerUtil.isDesktop ? 22.sp : 18.sp,
),
color: WebRTC.platformIsMobile
? mCL
: Theme.of(context).colorScheme.primary,
size: SizerUtil.isDesktop ? 22.sp : 18.sp,
),
),
),
],
),
],
),
),
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MessageSuggestWidget extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.surfaceContainer
.withOpacity(0.7),
.withValues(alpha: 0.7),
),
margin: EdgeInsets.only(
bottom: SizerUtil.isDesktop
Expand Down
2 changes: 1 addition & 1 deletion lib/features/home/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class _HomeState extends State<Home> {
),
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(.8),
.withValues(alpha: .8),
alignment: Alignment.bottomCenter,
child: Container(
width: SizerUtil.isDesktop ? 50.w : double.infinity,
Expand Down
Loading

0 comments on commit 0556e78

Please sign in to comment.