Skip to content

Commit 3b2969b

Browse files
committed
update.
1 parent 56d6d5a commit 3b2969b

File tree

8 files changed

+26
-18
lines changed

8 files changed

+26
-18
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ pubspec.lock
1111
# Directory created by dartdoc
1212
# If you don't generate documentation locally you can remove this line.
1313
doc/api/
14-
.DS_Store
14+
.DS_Store
15+
example/lib/generated_plugin_registrant.dart

example/lib/src/callscreen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,14 @@ class _MyCallScreenWidget extends State<CallScreenWidget>
250250
textAlign: TextAlign.center,
251251
),
252252
actions: <Widget>[
253-
FlatButton(
253+
TextButton(
254254
child: Text('Ok'),
255255
onPressed: () {
256256
call.refer(_tansfer_target);
257257
Navigator.of(context).pop();
258258
},
259259
),
260-
FlatButton(
260+
TextButton(
261261
child: Text('Cancel'),
262262
onPressed: () {
263263
Navigator.of(context).pop();

example/lib/src/dialpad.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class _MyDialPadWidget extends State<DialPadWidget>
3333
_dest = _preferences.getString('dest') ?? 'sip:[email protected]';
3434
_textController = TextEditingController(text: _dest);
3535
_textController.text = _dest;
36-
36+
3737
this.setState(() {});
3838
}
3939

@@ -52,7 +52,7 @@ class _MyDialPadWidget extends State<DialPadWidget>
5252
title: Text('Target is empty.'),
5353
content: Text('Please enter a SIP URI or username!'),
5454
actions: <Widget>[
55-
FlatButton(
55+
TextButton(
5656
child: Text('Ok'),
5757
onPressed: () {
5858
Navigator.of(context).pop();
@@ -285,7 +285,7 @@ class _MyDialPadWidget extends State<DialPadWidget>
285285

286286
@override
287287
void onNewMessage(SIPMessageRequest msg) {
288-
//Save the incoming message to DB
288+
//Save the incoming message to DB
289289
String msgBody = msg.request.body as String;
290290
setState(() {
291291
receivedMsg = msgBody;

example/lib/src/register.dart

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ class _MyRegisterWidget extends State<RegisterWidget>
4747
_preferences.getString('ws_uri') ?? 'wss://tryit.jssip.net:10443';
4848
_sipUriController.text =
4949
_preferences.getString('sip_uri') ?? '[email protected]';
50-
_displayNameController.text = _preferences.getString('display_name') ?? 'Flutter SIP UA';
50+
_displayNameController.text =
51+
_preferences.getString('display_name') ?? 'Flutter SIP UA';
5152
_passwordController.text = _preferences.getString('password');
5253
_authorizationUserController.text = _preferences.getString('auth_user');
5354
});
@@ -77,7 +78,7 @@ class _MyRegisterWidget extends State<RegisterWidget>
7778
title: Text('$alertFieldName is empty'),
7879
content: Text('Please enter $alertFieldName!'),
7980
actions: <Widget>[
80-
FlatButton(
81+
TextButton(
8182
child: Text('Ok'),
8283
onPressed: () {
8384
Navigator.of(context).pop();
@@ -101,7 +102,7 @@ class _MyRegisterWidget extends State<RegisterWidget>
101102
settings.webSocketUrl = _wsUriController.text;
102103
settings.webSocketSettings.extraHeaders = _wsExtraHeaders;
103104
settings.webSocketSettings.allowBadCertificate = true;
104-
settings.webSocketSettings.userAgent = 'Dart/2.8 (dart:io) for OpenSIPS.';
105+
//settings.webSocketSettings.userAgent = 'Dart/2.8 (dart:io) for OpenSIPS.';
105106

106107
settings.uri = _sipUriController.text;
107108
settings.authorizationUser = _authorizationUserController.text;
@@ -201,7 +202,11 @@ class _MyRegisterWidget extends State<RegisterWidget>
201202
contentPadding: EdgeInsets.all(10.0),
202203
border: UnderlineInputBorder(
203204
borderSide: BorderSide(color: Colors.black12)),
204-
hintText: _authorizationUserController.text?.isEmpty ?? true ? '[Empty]' : null,
205+
hintText:
206+
_authorizationUserController.text?.isEmpty ??
207+
true
208+
? '[Empty]'
209+
: null,
205210
),
206211
),
207212
),
@@ -226,7 +231,9 @@ class _MyRegisterWidget extends State<RegisterWidget>
226231
contentPadding: EdgeInsets.all(10.0),
227232
border: UnderlineInputBorder(
228233
borderSide: BorderSide(color: Colors.black12)),
229-
hintText: _passwordController.text?.isEmpty ?? true ? '[Empty]' : null,
234+
hintText: _passwordController.text?.isEmpty ?? true
235+
? '[Empty]'
236+
: null,
230237
),
231238
),
232239
),

example/scripts/project_tools.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CMD=$1
88
function cleanup() {
99
echo "Cleanup project [$FLUTTER_APP_PROJECT_NAME] files ..."
1010
cd $FLUTTER_APP_FOLDER
11-
rm -rf android build *.iml ios pubspec.lock test .flutter-plugins .metadata .packages .idea macos web windows
11+
rm -rf android build *.iml ios pubspec.lock test .flutter-plugins .metadata .packages .idea macos web
1212
}
1313

1414
function create() {
@@ -17,8 +17,7 @@ function create() {
1717
echo "Create flutter project: name=$FLUTTER_APP_PROJECT_NAME, org=$FLUTTER_APP_ORG ..."
1818
flutter config --enable-macos-desktop
1919
flutter config --enable-web
20-
flutter config --enable-windows-desktop
21-
flutter create --android-language java --ios-language objc --project-name $FLUTTER_APP_PROJECT_NAME --org $FLUTTER_APP_ORG .
20+
flutter create --android-language java --androidx --ios-language objc --project-name $FLUTTER_APP_PROJECT_NAME --org $FLUTTER_APP_ORG .
2221
add_permission_label
2322
else
2423
echo "Project [$FLUTTER_APP_PROJECT_NAME] already exists!"

lib/src/sip_ua_helper.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ class SIPUAHelper extends EventManager {
6868
}
6969
}
7070

71-
Future<bool> call(String target, [bool voiceonly = false]) async {
71+
Future<bool> call(String target,
72+
[bool voiceonly = false, MediaStream mediaStream = null]) async {
7273
if (_ua != null && _ua.isConnected()) {
7374
_ua.call(target, buildCallOptions(voiceonly));
7475
return true;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ environment:
77
flutter: ">=1.10.0"
88

99
dependencies:
10-
crypto: ^2.1.2
10+
crypto: ^2.1.3
1111
flutter_webrtc: ^0.5.8
1212
intl: any
1313
logger: ^0.9.0

test/test_digest_authentication.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ List<void Function()> testFunctions = <void Function()>[
7474
'nonce': '5a071f75353f667787615249c62dcc7b15a4828f',
7575
'opaque': null,
7676
'stale': null,
77-
'qop': ['auth']
77+
'qop': <String>['auth']
7878
});
7979

8080
DigestAuthentication digest = DigestAuthentication(credentials);
@@ -101,7 +101,7 @@ List<void Function()> testFunctions = <void Function()>[
101101
'nonce': '5a071f75353f667787615249c62dcc7b15a4828f',
102102
'opaque': null,
103103
'stale': null,
104-
'qop': ['auth', 'auth-int']
104+
'qop': <String>['auth', 'auth-int']
105105
});
106106

107107
DigestAuthentication digest = DigestAuthentication(credentials);

0 commit comments

Comments
 (0)