Skip to content

Commit e6542e7

Browse files
authored
Upgrade Flutter to 3.32 version (#201)
- upgrade `flutter_rust_bridge` to 2.10.0 version - upgrade Cargo and pub dependencies
1 parent 9613c01 commit e6542e7

33 files changed

+1033
-1133
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ jobs:
9595
- uses: actions/checkout@v4
9696
- uses: subosito/flutter-action@v2
9797

98-
- run: flutter pub get
99-
10098
- run: make flutter.fmt check=yes
10199

102100
ktfmt:

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@ All user visible changes to this project will be documented in this file. This p
1212

1313
### Changed
1414

15-
- Upgraded [libwebrtc] to [136.0.7103.113] version. ([todo])
15+
- Upgraded [libwebrtc] to [136.0.7103.113] version. ([9613c018])
16+
- Upgraded [`flutter_rust_bridge`] crate to [2.10.0][frb-2.10.0] version. ([#201])
1617

17-
[todo]: https://github.com/instrumentisto/medea-flutter-webrtc/commit/todo
18+
[#201]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/201
19+
[9613c018]: https://github.com/instrumentisto/medea-flutter-webrtc/commit/9613c018f9c08739f1121366f6049f23d7d1b51c
1820
[136.0.7103.113]: https://github.com/instrumentisto/libwebrtc-bin/releases/tag/136.0.7103.113
21+
[frb-2.10.0]: https://github.com/fzyzcjy/flutter_rust_bridge/releases/tag/v2.10.0
1922

2023

2124

Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ flutter.build:
103103
# make flutter.fmt [check=(no|yes)]
104104

105105
flutter.fmt:
106-
dart format $(if $(call eq,$(check),yes), --set-exit-if-changed,) .
107-
ifeq ($(wildcard .packages),)
106+
ifeq ($(wildcard .dart_tool),)
108107
flutter pub get
109108
endif
109+
dart format $(if $(call eq,$(check),yes), --set-exit-if-changed,) .
110110
flutter pub run import_sorter:main --no-comments \
111111
$(if $(call eq,$(check),yes),--exit-if-changed,)
112112

crates/native/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ anyhow = "1.0"
1212
cxx = "1.0"
1313
dashmap = "6.1"
1414
derive_more = { version = "2.0", features = ["as_ref", "display", "from", "into"] }
15-
flutter_rust_bridge = { version = "=2.9.0", features = ["anyhow", "dart-opaque", "rust-async", "thread-pool"], default-features = false }
15+
flutter_rust_bridge = { version = "=2.10.0", features = ["anyhow", "dart-opaque", "rust-async", "thread-pool"], default-features = false }
1616
libwebrtc-sys = { path = "../libwebrtc-sys" }
1717
log = "0.4"
1818
threadpool = "1.8"

crates/native/src/frb_generated.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This file is automatically generated, so please do not edit it.
2-
// @generated by `flutter_rust_bridge`@ 2.9.0.
2+
// @generated by `flutter_rust_bridge`@ 2.10.0.
33

44
#![allow(
55
non_camel_case_types,
@@ -41,7 +41,7 @@ flutter_rust_bridge::frb_generated_boilerplate!(
4141
default_rust_opaque = RustOpaqueMoi,
4242
default_rust_auto_opaque = RustAutoOpaqueMoi,
4343
);
44-
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.9.0";
44+
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.10.0";
4545
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -40294053;
4646

4747
// Section: executor
@@ -6574,7 +6574,7 @@ impl SseEncode for crate::api::VideoConstraints {
65746574
#[cfg(not(target_family = "wasm"))]
65756575
mod io {
65766576
// This file is automatically generated, so please do not edit it.
6577-
// @generated by `flutter_rust_bridge`@ 2.9.0.
6577+
// @generated by `flutter_rust_bridge`@ 2.10.0.
65786578

65796579
// Section: imports
65806580

example/integration_test/webrtc_test.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,9 @@ void main() {
404404
expect(names.contains("H265"), isFalse);
405405
}
406406

407-
var vp8Preferences =
408-
capabilities.codecs.where((element) {
409-
return element.name == 'VP8';
410-
}).toList();
407+
var vp8Preferences = capabilities.codecs.where((element) {
408+
return element.name == 'VP8';
409+
}).toList();
411410

412411
await vtrans.setCodecPreferences(vp8Preferences);
413412

example/lib/main.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ class _MyAppState extends State<MyApp> {
128128
Navigator.push(
129129
context,
130130
MaterialPageRoute(
131-
builder:
132-
(BuildContext context) =>
133-
const OnDeviceChangeNotifierSample(),
131+
builder: (BuildContext context) =>
132+
const OnDeviceChangeNotifierSample(),
134133
),
135134
);
136135
},

example/lib/src/get_user_media.dart

Lines changed: 73 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ class _GetUserMediaSampleState extends State<GetUserMediaSample> {
4444
await _localRenderer.initialize();
4545

4646
_localRenderer.onCanPlay = () => {print('onCanPlay fired')};
47-
_localRenderer.onResize =
48-
() => {
49-
print(
50-
'resize: width = ${_localRenderer.videoWidth}, '
51-
'height = ${_localRenderer.videoHeight}',
52-
),
53-
};
47+
_localRenderer.onResize = () => {
48+
print(
49+
'resize: width = ${_localRenderer.videoWidth}, '
50+
'height = ${_localRenderer.videoHeight}',
51+
),
52+
};
5453
}
5554

5655
// Platform messages are asynchronous, so we initialize in an async method.
@@ -111,74 +110,73 @@ class _GetUserMediaSampleState extends State<GetUserMediaSample> {
111110
return Scaffold(
112111
appBar: AppBar(
113112
title: const Text('GetUserMedia API Test'),
114-
actions:
115-
_inCalling
116-
? <Widget>[
117-
PopupMenuButton<String>(
118-
onSelected: _selectAudioOutput,
119-
itemBuilder: (BuildContext context) {
120-
if (_mediaDevicesList != null) {
121-
return _mediaDevicesList!
122-
.where(
123-
(device) =>
124-
device.kind == MediaDeviceKind.audiooutput,
125-
)
126-
.map((device) {
127-
return PopupMenuItem<String>(
128-
value: device.deviceId,
129-
child: Text(device.label),
130-
);
131-
})
132-
.toList();
133-
}
134-
return [];
135-
},
136-
icon: const Icon(Icons.volume_down),
137-
),
138-
PopupMenuButton<String>(
139-
onSelected: _selectAudioInput,
140-
itemBuilder: (BuildContext context) {
141-
if (_mediaDevicesList != null) {
142-
return _mediaDevicesList!
143-
.where(
144-
(device) =>
145-
device.kind == MediaDeviceKind.audioinput,
146-
)
147-
.map((device) {
148-
return PopupMenuItem<String>(
149-
value: device.deviceId,
150-
child: Text(device.label),
151-
);
152-
})
153-
.toList();
154-
}
155-
return [];
156-
},
157-
icon: const Icon(Icons.mic),
158-
),
159-
PopupMenuButton<String>(
160-
onSelected: _selectVideoInput,
161-
itemBuilder: (BuildContext context) {
162-
if (_mediaDevicesList != null) {
163-
return _mediaDevicesList!
164-
.where(
165-
(device) =>
166-
device.kind == MediaDeviceKind.videoinput,
167-
)
168-
.map((device) {
169-
return PopupMenuItem<String>(
170-
value: device.deviceId,
171-
child: Text(device.label),
172-
);
173-
})
174-
.toList();
175-
}
176-
return [];
177-
},
178-
icon: const Icon(Icons.camera_alt),
179-
),
180-
]
181-
: null,
113+
actions: _inCalling
114+
? <Widget>[
115+
PopupMenuButton<String>(
116+
onSelected: _selectAudioOutput,
117+
itemBuilder: (BuildContext context) {
118+
if (_mediaDevicesList != null) {
119+
return _mediaDevicesList!
120+
.where(
121+
(device) =>
122+
device.kind == MediaDeviceKind.audiooutput,
123+
)
124+
.map((device) {
125+
return PopupMenuItem<String>(
126+
value: device.deviceId,
127+
child: Text(device.label),
128+
);
129+
})
130+
.toList();
131+
}
132+
return [];
133+
},
134+
icon: const Icon(Icons.volume_down),
135+
),
136+
PopupMenuButton<String>(
137+
onSelected: _selectAudioInput,
138+
itemBuilder: (BuildContext context) {
139+
if (_mediaDevicesList != null) {
140+
return _mediaDevicesList!
141+
.where(
142+
(device) =>
143+
device.kind == MediaDeviceKind.audioinput,
144+
)
145+
.map((device) {
146+
return PopupMenuItem<String>(
147+
value: device.deviceId,
148+
child: Text(device.label),
149+
);
150+
})
151+
.toList();
152+
}
153+
return [];
154+
},
155+
icon: const Icon(Icons.mic),
156+
),
157+
PopupMenuButton<String>(
158+
onSelected: _selectVideoInput,
159+
itemBuilder: (BuildContext context) {
160+
if (_mediaDevicesList != null) {
161+
return _mediaDevicesList!
162+
.where(
163+
(device) =>
164+
device.kind == MediaDeviceKind.videoinput,
165+
)
166+
.map((device) {
167+
return PopupMenuItem<String>(
168+
value: device.deviceId,
169+
child: Text(device.label),
170+
);
171+
})
172+
.toList();
173+
}
174+
return [];
175+
},
176+
icon: const Icon(Icons.camera_alt),
177+
),
178+
]
179+
: null,
182180
),
183181
body: OrientationBuilder(
184182
builder: (context, orientation) {

0 commit comments

Comments
 (0)