Skip to content

Commit 6a8b83a

Browse files
committed
fix ios dialog
1 parent 61180d2 commit 6a8b83a

File tree

6 files changed

+62
-61
lines changed

6 files changed

+62
-61
lines changed

example/lib/controllers/register_controller.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ class RegisterController {
3636
///then Register on v_chat_sdk system
3737
final u = await VChatController.instance.register(
3838
dto: VChatRegisterDto(
39-
name: name,
40-
userImage: imagePath == null ? null : File(imagePath!),
41-
email: email),
39+
name: name,
40+
userImage: imagePath == null ? null : File(imagePath!),
41+
email: email,
42+
),
4243
context: context,
4344
);
4445
await GetStorage().write("myModel", u.toMap());

example/lib/main.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ void main() async {
2525
await GetStorage.init();
2626
// http://170.178.195.150:81/
2727
await VChatController.instance.init(
28-
baseUrl: Uri.parse("http://170.178.195.150:81"),
29-
appName: "test_v_chat",
30-
isUseFirebase: true,
31-
widgetsBuilder: VChatCustomWidgets(),
32-
enableLogger: true,
33-
maxMediaUploadSize: 50 * 1000 * 1000,
34-
passwordHashKey: "passwordHashKey");
28+
baseUrl: Uri.parse("http://170.178.195.150:81"),
29+
appName: "test_v_chat",
30+
isUseFirebase: true,
31+
widgetsBuilder: VChatCustomWidgets(),
32+
enableLogger: true,
33+
maxMediaUploadSize: 50 * 1000 * 1000,
34+
passwordHashKey: "passwordHashKey",
35+
36+
);
3537

3638
// add support new language
3739
// v_chat will change the language one you change it

example/pubspec.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,42 +168,42 @@ packages:
168168
name: firebase_core
169169
url: "https://pub.dartlang.org"
170170
source: hosted
171-
version: "1.10.0"
171+
version: "1.10.2"
172172
firebase_core_platform_interface:
173173
dependency: transitive
174174
description:
175175
name: firebase_core_platform_interface
176176
url: "https://pub.dartlang.org"
177177
source: hosted
178-
version: "4.1.0"
178+
version: "4.2.0"
179179
firebase_core_web:
180180
dependency: transitive
181181
description:
182182
name: firebase_core_web
183183
url: "https://pub.dartlang.org"
184184
source: hosted
185-
version: "1.2.0"
185+
version: "1.4.0"
186186
firebase_messaging:
187187
dependency: transitive
188188
description:
189189
name: firebase_messaging
190190
url: "https://pub.dartlang.org"
191191
source: hosted
192-
version: "11.1.0"
192+
version: "11.2.0"
193193
firebase_messaging_platform_interface:
194194
dependency: transitive
195195
description:
196196
name: firebase_messaging_platform_interface
197197
url: "https://pub.dartlang.org"
198198
source: hosted
199-
version: "3.0.9"
199+
version: "3.1.0"
200200
firebase_messaging_web:
201201
dependency: transitive
202202
description:
203203
name: firebase_messaging_web
204204
url: "https://pub.dartlang.org"
205205
source: hosted
206-
version: "2.1.0"
206+
version: "2.2.1"
207207
flutter:
208208
dependency: "direct main"
209209
description: flutter
@@ -690,7 +690,7 @@ packages:
690690
name: sqflite
691691
url: "https://pub.dartlang.org"
692692
source: hosted
693-
version: "2.0.0+4"
693+
version: "2.0.1"
694694
sqflite_common:
695695
dependency: transitive
696696
description:

lib/src/utils/custom_widgets/custom_alert_dialog.dart

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -164,39 +164,37 @@ class CustomAlert {
164164
onWillPop: () async {
165165
return dismissible;
166166
},
167-
child: Transform.scale(
168-
scale: a1.value,
169-
child: Opacity(
170-
opacity: a1.value,
171-
child: Platform.isIOS
172-
? CupertinoAlertDialog(
173-
title: title.text,
174-
content: Column(
175-
mainAxisSize: MainAxisSize.min,
176-
children: [
177-
const SizedBox(
178-
height: 10,
179-
),
180-
],
167+
child: Platform.isIOS
168+
? CupertinoAlertDialog(
169+
title: title.text,
170+
content: Column(
171+
mainAxisSize: MainAxisSize.min,
172+
children: [
173+
const SizedBox(
174+
height: 10,
181175
),
182-
actions: [
183-
TextButton(
184-
onPressed: () => Navigator.pop(context, -1),
185-
child: VChatAppService.instance
186-
.getTrans(context)
187-
.cancel()
188-
.text,
189-
),
190-
TextButton(
191-
onPressed: () => Navigator.pop(context, 1),
192-
child: VChatAppService.instance
193-
.getTrans(context)
194-
.oK()
195-
.text,
196-
),
197-
],
198-
)
199-
: AlertDialog(
176+
],
177+
),
178+
actions: [
179+
TextButton(
180+
onPressed: () => Navigator.pop(context, -1),
181+
child: VChatAppService.instance
182+
.getTrans(context)
183+
.cancel()
184+
.text,
185+
),
186+
TextButton(
187+
onPressed: () => Navigator.pop(context, 1),
188+
child:
189+
VChatAppService.instance.getTrans(context).oK().text,
190+
),
191+
],
192+
)
193+
: Transform.scale(
194+
scale: a1.value,
195+
child: Opacity(
196+
opacity: a1.value,
197+
child: AlertDialog(
200198
clipBehavior: Clip.antiAliasWithSaveLayer,
201199
title: title.text,
202200
contentPadding: EdgeInsets.zero
@@ -226,8 +224,8 @@ class CustomAlert {
226224
),
227225
],
228226
),
229-
),
230-
),
227+
),
228+
),
231229
);
232230
},
233231
transitionDuration: const Duration(milliseconds: 250),

pubspec.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,42 +154,42 @@ packages:
154154
name: firebase_core
155155
url: "https://pub.dartlang.org"
156156
source: hosted
157-
version: "1.10.0"
157+
version: "1.10.2"
158158
firebase_core_platform_interface:
159159
dependency: transitive
160160
description:
161161
name: firebase_core_platform_interface
162162
url: "https://pub.dartlang.org"
163163
source: hosted
164-
version: "4.1.0"
164+
version: "4.2.0"
165165
firebase_core_web:
166166
dependency: transitive
167167
description:
168168
name: firebase_core_web
169169
url: "https://pub.dartlang.org"
170170
source: hosted
171-
version: "1.2.0"
171+
version: "1.4.0"
172172
firebase_messaging:
173173
dependency: "direct main"
174174
description:
175175
name: firebase_messaging
176176
url: "https://pub.dartlang.org"
177177
source: hosted
178-
version: "11.1.0"
178+
version: "11.2.0"
179179
firebase_messaging_platform_interface:
180180
dependency: transitive
181181
description:
182182
name: firebase_messaging_platform_interface
183183
url: "https://pub.dartlang.org"
184184
source: hosted
185-
version: "3.0.9"
185+
version: "3.1.0"
186186
firebase_messaging_web:
187187
dependency: transitive
188188
description:
189189
name: firebase_messaging_web
190190
url: "https://pub.dartlang.org"
191191
source: hosted
192-
version: "2.1.0"
192+
version: "2.2.1"
193193
flutter:
194194
dependency: "direct main"
195195
description: flutter
@@ -643,7 +643,7 @@ packages:
643643
name: sqflite
644644
url: "https://pub.dartlang.org"
645645
source: hosted
646-
version: "2.0.0+4"
646+
version: "2.0.1"
647647
sqflite_common:
648648
dependency: transitive
649649
description:

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ dependencies:
1515
bloc: ^8.0.1
1616
textless: ^6.6.6
1717
dio: ^4.0.4
18-
firebase_core: ^1.10.0
19-
firebase_messaging: ^11.1.0
18+
firebase_core: ^1.10.2
19+
firebase_messaging: ^11.2.0
2020
image_picker: ^0.8.4+4
21-
sqflite: ^2.0.0+4
21+
sqflite: ^2.0.1
2222
path_provider: ^2.0.7
2323
socket_io_client: ^1.0.2
2424
intl: ^0.17.0

0 commit comments

Comments
 (0)