Skip to content

Commit fb2a36a

Browse files
committed
remove notification after clicked
1 parent 962d2ea commit fb2a36a

File tree

10 files changed

+100
-26
lines changed

10 files changed

+100
-26
lines changed

example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1717
android:hardwareAccelerated="true"
1818
android:launchMode="singleTop"
19+
android:exported="true"
1920
android:theme="@style/LaunchTheme"
2021
android:windowSoftInputMode="adjustResize">
2122
<!-- Specifies an Android theme to apply to this Activity as soon as

example/lib/screens/register_screen.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,18 @@ class _RegisterScreenState extends State<RegisterScreen> {
6060
await picker.pickImage(source: ImageSource.gallery);
6161
if (img != null) {
6262
_controller.imagePath = img.path;
63-
CustomAlert.showSuccess(context: context, err: "image has been set successfully");
63+
CustomAlert.showSuccess(
64+
context: context,
65+
err: "image has been set successfully");
6466
}
6567
},
6668
child: Row(
6769
mainAxisAlignment: MainAxisAlignment.center,
6870
children: [
69-
const Icon(Icons.image,size: 40,),
71+
const Icon(
72+
Icons.image,
73+
size: 40,
74+
),
7075
S.of(context).chooseImage.text,
7176
],
7277
)),

example/pubspec.lock

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ packages:
168168
name: file_picker
169169
url: "https://pub.dartlang.org"
170170
source: hosted
171-
version: "4.2.1"
171+
version: "4.2.3"
172172
firebase_core:
173173
dependency: transitive
174174
description:
@@ -250,7 +250,7 @@ packages:
250250
name: flutter_local_notifications
251251
url: "https://pub.dartlang.org"
252252
source: hosted
253-
version: "9.1.0"
253+
version: "9.1.1"
254254
flutter_local_notifications_linux:
255255
dependency: transitive
256256
description:
@@ -290,7 +290,42 @@ packages:
290290
name: flutter_secure_storage
291291
url: "https://pub.dartlang.org"
292292
source: hosted
293-
version: "4.2.1"
293+
version: "5.0.0"
294+
flutter_secure_storage_linux:
295+
dependency: transitive
296+
description:
297+
name: flutter_secure_storage_linux
298+
url: "https://pub.dartlang.org"
299+
source: hosted
300+
version: "1.1.0"
301+
flutter_secure_storage_macos:
302+
dependency: transitive
303+
description:
304+
name: flutter_secure_storage_macos
305+
url: "https://pub.dartlang.org"
306+
source: hosted
307+
version: "1.1.0"
308+
flutter_secure_storage_platform_interface:
309+
dependency: transitive
310+
description:
311+
name: flutter_secure_storage_platform_interface
312+
url: "https://pub.dartlang.org"
313+
source: hosted
314+
version: "1.0.0"
315+
flutter_secure_storage_web:
316+
dependency: transitive
317+
description:
318+
name: flutter_secure_storage_web
319+
url: "https://pub.dartlang.org"
320+
source: hosted
321+
version: "1.0.2"
322+
flutter_secure_storage_windows:
323+
dependency: transitive
324+
description:
325+
name: flutter_secure_storage_windows
326+
url: "https://pub.dartlang.org"
327+
source: hosted
328+
version: "1.1.2"
294329
flutter_test:
295330
dependency: "direct dev"
296331
description: flutter
@@ -718,7 +753,7 @@ packages:
718753
name: video_player
719754
url: "https://pub.dartlang.org"
720755
source: hosted
721-
version: "2.2.6"
756+
version: "2.2.7"
722757
video_player_platform_interface:
723758
dependency: transitive
724759
description:

lib/src/modules/message/controllers/send_message_controller.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class SendMessageController extends GetxController {
7575
if (isEmitTyping) {
7676
emitTypingChange(0);
7777
}
78-
textController.dispose();
7978
} catch (err) {
8079
log(err.toString());
8180
} finally {

lib/src/modules/message/views/message_appbar_view.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ class MessageAppBarView extends GetView<MessageController>
7878
return t.online().text.size(14);
7979
} else {
8080
return const SizedBox.shrink();
81-
return VChatAppService.to
82-
.getTrans(context)
83-
.offline()
84-
.s2
85-
.size(14);
8681
}
8782
} else {
8883
if (typingSt.status != RoomTypingType.stop) {

lib/src/modules/message/views/message_view.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class _MessageViewState extends State<MessageView> {
3636
Widget build(BuildContext context) {
3737
final t = VChatAppService.to.getTrans(context);
3838
return Scaffold(
39-
appBar: MessageAppBarView(),
39+
appBar: MessageAppBarView(),
4040
body: Padding(
4141
padding: const EdgeInsets.only(left: 8, right: 8, bottom: 1, top: 4),
4242
child: Column(
@@ -52,7 +52,7 @@ class _MessageViewState extends State<MessageView> {
5252
showTrackOnHover: true,
5353
child: ListView.separated(
5454
reverse: true,
55-
padding: EdgeInsets.symmetric(horizontal: 10),
55+
padding: const EdgeInsets.symmetric(horizontal: 10),
5656
controller: controller.scrollController,
5757
physics: const BouncingScrollPhysics(),
5858
itemBuilder: (context, index) =>

lib/src/services/notification_service.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ class NotificationService extends GetxService {
115115
MessageBinding.bind();
116116
Navigator.of(VChatAppService.to.navKey!.currentContext!)
117117
.push(MaterialPageRoute(builder: (_) => const MessageView()));
118+
BotToast.cleanAll();
118119
},
119120
duration: const Duration(seconds: 5),
120121
subTitle: msg.toString(),

lib/src/vchat_controller.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class VChatController {
152152
/// **throw** No internet connection
153153
Future<dynamic> createSingleChat({
154154
required String peerEmail,
155-
required BuildContext ctx,
155+
BuildContext? ctx,
156156
String? titleTxt,
157157
String? createBtnTxt,
158158
}) async {
@@ -162,7 +162,7 @@ class VChatController {
162162
if (data == false) {
163163
//no rooms founded
164164
return await showDialog(
165-
context: ctx,
165+
context: ctx ?? VChatAppService.to.navKey!.currentContext!,
166166
builder: (context) {
167167
return AlertDialog(
168168
title: titleTxt != null
@@ -181,7 +181,10 @@ class VChatController {
181181
.createNewSingleRoom(txt, peerEmail);
182182
// room has been created successfully
183183
await Future.delayed(const Duration(seconds: 1));
184-
_navigateToRoomMessage(data, ctx);
184+
_navigateToRoomMessage(
185+
data,
186+
ctx ?? VChatAppService.to.navKey!.currentContext!,
187+
);
185188
},
186189
child: createBtnTxt != null
187190
? createBtnTxt.text
@@ -192,7 +195,7 @@ class VChatController {
192195
);
193196
} else {
194197
// there are room
195-
return await _navigateToRoomMessage(data, ctx);
198+
return await _navigateToRoomMessage(data, ctx ?? VChatAppService.to.navKey!.currentContext!,);
196199
}
197200
}
198201

pubspec.lock

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ packages:
161161
name: file_picker
162162
url: "https://pub.dartlang.org"
163163
source: hosted
164-
version: "4.2.1"
164+
version: "4.2.3"
165165
firebase_core:
166166
dependency: "direct main"
167167
description:
@@ -236,7 +236,7 @@ packages:
236236
name: flutter_local_notifications
237237
url: "https://pub.dartlang.org"
238238
source: hosted
239-
version: "9.1.0"
239+
version: "9.1.1"
240240
flutter_local_notifications_linux:
241241
dependency: transitive
242242
description:
@@ -271,7 +271,42 @@ packages:
271271
name: flutter_secure_storage
272272
url: "https://pub.dartlang.org"
273273
source: hosted
274-
version: "4.2.1"
274+
version: "5.0.0"
275+
flutter_secure_storage_linux:
276+
dependency: transitive
277+
description:
278+
name: flutter_secure_storage_linux
279+
url: "https://pub.dartlang.org"
280+
source: hosted
281+
version: "1.1.0"
282+
flutter_secure_storage_macos:
283+
dependency: transitive
284+
description:
285+
name: flutter_secure_storage_macos
286+
url: "https://pub.dartlang.org"
287+
source: hosted
288+
version: "1.1.0"
289+
flutter_secure_storage_platform_interface:
290+
dependency: transitive
291+
description:
292+
name: flutter_secure_storage_platform_interface
293+
url: "https://pub.dartlang.org"
294+
source: hosted
295+
version: "1.0.0"
296+
flutter_secure_storage_web:
297+
dependency: transitive
298+
description:
299+
name: flutter_secure_storage_web
300+
url: "https://pub.dartlang.org"
301+
source: hosted
302+
version: "1.0.2"
303+
flutter_secure_storage_windows:
304+
dependency: transitive
305+
description:
306+
name: flutter_secure_storage_windows
307+
url: "https://pub.dartlang.org"
308+
source: hosted
309+
version: "1.1.2"
275310
flutter_test:
276311
dependency: "direct dev"
277312
description: flutter
@@ -685,7 +720,7 @@ packages:
685720
name: video_player
686721
url: "https://pub.dartlang.org"
687722
source: hosted
688-
version: "2.2.6"
723+
version: "2.2.7"
689724
video_player_platform_interface:
690725
dependency: transitive
691726
description:

pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ dependencies:
2121
path_provider: ^2.0.6
2222
socket_io_client: ^1.0.1
2323
intl: ^0.17.0
24-
file_picker: ^4.2.1
24+
file_picker: ^4.2.3
2525
flutter_native_image: ^0.0.6+1
2626
permission_handler: ^8.2.6
2727
flutter_video_info: ^1.2.0
2828
video_thumbnail: ^0.4.3
29-
video_player: ^2.2.6
29+
video_player: ^2.2.7
3030
record: ^3.0.0
3131
stop_watch_timer: ^1.3.1
3232
audioplayers: ^0.20.1
@@ -35,11 +35,11 @@ dependencies:
3535
chewie: ^1.2.2
3636
cached_network_image: ^3.1.0+1
3737
timeago: ^3.1.0
38-
flutter_local_notifications: ^9.0.3
38+
flutter_local_notifications: ^9.1.1
3939
bot_toast: ^4.0.1
4040
google_fonts: ^2.1.0
4141
path: ^1.8.0
42-
flutter_secure_storage: ^4.2.1
42+
flutter_secure_storage: ^5.0.0
4343
get_storage: ^2.0.3
4444
dev_dependencies:
4545
flutter_test:

0 commit comments

Comments
 (0)