Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaowei-guan committed Sep 4, 2024
2 parents 2c736b3 + 4902ba4 commit a7d0abd
Show file tree
Hide file tree
Showing 77 changed files with 393 additions and 165 deletions.
1 change: 1 addition & 0 deletions packages/battery_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT

* Update minimum Flutter and Dart version to 3.13 and 3.1.
* Fix analyze issue.

## 1.1.2

Expand Down
2 changes: 2 additions & 0 deletions packages/battery_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class _MyHomePageState extends State<MyHomePage> {
onPressed: () {
_battery.batteryLevel.then(
(batteryLevel) {
if (!context.mounted) return;
showDialog<void>(
context: context,
builder: (_) => AlertDialog(
Expand All @@ -98,6 +99,7 @@ class _MyHomePageState extends State<MyHomePage> {
onPressed: () {
_battery.isInBatterySaveMode.then(
(isInPowerSaveMode) {
if (!context.mounted) return;
showDialog<void>(
context: context,
builder: (_) => AlertDialog(
Expand Down
1 change: 1 addition & 0 deletions packages/flutter_secure_storage/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT

* Fixed an issue causing crashes when encrypting or decrypting empty strings by adding appropriate checks and handling in `Encrypt` and `Decrypt` methods.
* Fix new lint warnings.
* Update minimum Flutter and Dart version to 3.13 and 3.1.

Expand Down
8 changes: 8 additions & 0 deletions packages/flutter_secure_storage/tizen/src/secure_storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ void SecureStorage::CreateAesKeyOnce() {
}

std::vector<uint8_t> SecureStorage::Encrypt(const std::string &value) {
if (value.empty()) {
return std::vector<uint8_t>{0x00};
}

ckmc_raw_buffer_s plain_buffer;
plain_buffer.data =
const_cast<uint8_t *>(reinterpret_cast<const uint8_t *>(value.c_str()));
Expand Down Expand Up @@ -121,6 +125,10 @@ std::vector<uint8_t> SecureStorage::Encrypt(const std::string &value) {
}

std::string SecureStorage::Decrypt(const std::vector<uint8_t> &value) {
if (value.size() <= kInitializationVectorSize) {
return "";
}

std::vector<uint8_t> iv(value.begin(),
value.begin() + kInitializationVectorSize);
ckmc_raw_buffer_s iv_buffer;
Expand Down
1 change: 1 addition & 0 deletions packages/flutter_webrtc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT

* Update minimum Flutter and Dart version to 3.13 and 3.1.
* Fix analyze issue.

## 0.1.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class ScreenSelectDialog extends Dialog {
),
Container(
width: double.infinity,
child: ButtonBar(
child: OverflowBar(
children: <Widget>[
MaterialButton(
child: Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class ScreenSelectDialog extends Dialog {
),
Container(
width: double.infinity,
child: ButtonBar(
child: OverflowBar(
children: <Widget>[
MaterialButton(
child: Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Future<bool> startForegroundService() async {
final androidConfig = FlutterBackgroundAndroidConfig(
notificationTitle: 'Title of the notification',
notificationText: 'Text of the notification',
notificationImportance: AndroidNotificationImportance.Default,
notificationImportance: AndroidNotificationImportance.normal,
notificationIcon: AndroidResource(
name: 'background_icon',
defType: 'drawable'), // Default is ic_launcher from folder mipmap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class _GetDisplayMediaSampleState extends State<GetDisplayMediaSample> {
const androidConfig = FlutterBackgroundAndroidConfig(
notificationTitle: 'Screen Sharing',
notificationText: 'LiveKit Example is sharing the screen.',
notificationImportance: AndroidNotificationImportance.Default,
notificationImportance: AndroidNotificationImportance.normal,
notificationIcon: AndroidResource(
name: 'livekit_ic_launcher', defType: 'mipmap'),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ class _MyAppState extends State<LoopBackSampleUnifiedTracks> {
),
Align(
alignment: Alignment.bottomCenter,
child: ButtonBar(
child: OverflowBar(
children: [
FloatingActionButton(
heroTag: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class ScreenSelectDialog extends Dialog {
),
Container(
width: double.infinity,
child: ButtonBar(
child: OverflowBar(
children: <Widget>[
MaterialButton(
child: Text(
Expand Down
4 changes: 4 additions & 0 deletions packages/google_maps_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.8

* Support longpress event.

## 0.1.7

* Update webview_flutter_lwe to 0.3.2.
Expand Down
2 changes: 1 addition & 1 deletion packages/google_maps_flutter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This package is not an _endorsed_ implementation of `google_maps_flutter`. There
```yaml
dependencies:
google_maps_flutter: ^2.7.0
google_maps_flutter_tizen: ^0.1.7
google_maps_flutter_tizen: ^0.1.8
```
For detailed usage, see https://pub.dev/packages/google_maps_flutter#sample-usage.
Expand Down
19 changes: 15 additions & 4 deletions packages/google_maps_flutter/lib/src/google_maps_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

part of '../google_maps_flutter_tizen.dart';

/// The duration of MapLongPressEvent.
const int kGoogleMapsControllerLongPressDuration = 1000;

/// This class implements a Map Controller and its events
class GoogleMapsController {
/// Initializes the GoogleMapsController.
Expand Down Expand Up @@ -138,8 +141,8 @@ class GoogleMapsController {
onMessageReceived: _onClick,
)
..addJavaScriptChannel(
'RightClick',
onMessageReceived: _onRightClick,
'LongPress',
onMessageReceived: _onLongPress,
)
..addJavaScriptChannel(
'MarkerClick',
Expand Down Expand Up @@ -173,8 +176,16 @@ class GoogleMapsController {
map.addListener('bounds_changed', BoundChanged.postMessage);
map.addListener('idle', Idle.postMessage);
map.addListener('click', (event) => Click.postMessage(JSON.stringify(event)));
map.addListener('rightclick', (event) => RightClick.postMessage(JSON.stringify(event)));
map.addListener('tilesloaded', Tilesloaded.postMessage);
let longPressTimeout;
map.addListener('mousedown', (e) => {
longPressTimeout = setTimeout(() => {
LongPress.postMessage(JSON.stringify(e));
}, $kGoogleMapsControllerLongPressDuration);
});
map.addListener('mouseup', () => { clearTimeout(longPressTimeout); });
map.addListener('mouseout', () => { clearTimeout(longPressTimeout); });
''';
await controller.runJavaScript(command);
}
Expand Down Expand Up @@ -250,7 +261,7 @@ class GoogleMapsController {
}
}

void _onRightClick(JavaScriptMessage message) {
void _onLongPress(JavaScriptMessage message) {
try {
final dynamic event = json.decode(message.message);
if (event is Map<String, dynamic>) {
Expand Down
2 changes: 1 addition & 1 deletion packages/google_maps_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_tizen
description: Tizen implementation of the google_maps_flutter plugin.
homepage: https://github.com/flutter-tizen/plugins
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/google_maps_flutter
version: 0.1.7
version: 0.1.8

environment:
sdk: ">=3.1.0 <4.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/permission_handler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT

* Update minimum Flutter and Dart version to 3.13 and 3.1.
* Fix analyze issue.

## 1.3.0

Expand Down
20 changes: 12 additions & 8 deletions packages/permission_handler/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ final MaterialColor themeMaterialColor =

/// A Flutter application demonstrating the functionality of this plugin
class PermissionHandlerWidget extends StatefulWidget {
/// Default Constructor
const PermissionHandlerWidget({super.key});

/// Create a page containing the functionality of this plugin
static ExamplePage createPage() {
return ExamplePage(
Icons.location_on, (context) => PermissionHandlerWidget());
Icons.location_on, (context) => const PermissionHandlerWidget());
}

@override
Expand Down Expand Up @@ -69,23 +72,24 @@ class _PermissionHandlerWidgetState extends State<PermissionHandlerWidget> {
/// Permission widget containing information about the passed [Permission]
class PermissionWidget extends StatefulWidget {
/// Constructs a [PermissionWidget] for the supplied [Permission]
const PermissionWidget(this._permission);
const PermissionWidget(this._permission, {super.key});

final Permission _permission;

@override
_PermissionState createState() => _PermissionState(_permission);
_PermissionState createState() {
return _PermissionState();
}
}

class _PermissionState extends State<PermissionWidget> {
_PermissionState(this._permission);

final Permission _permission;
late Permission _permission;
PermissionStatus _permissionStatus = PermissionStatus.denied;

@override
void initState() {
super.initState();
_permission = widget._permission;

_listenForPermissionStatus();
}
Expand Down Expand Up @@ -147,9 +151,9 @@ class _PermissionState extends State<PermissionWidget> {
final status = await permission.request();

setState(() {
print(status);
debugPrint(status.toString());
_permissionStatus = status;
print(_permissionStatus);
debugPrint(_permissionStatus.toString());
});
}
}
1 change: 1 addition & 0 deletions packages/sensors_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT

* Update minimum Flutter and Dart version to 3.13 and 3.1.
* Fix analyze issue.

## 1.1.4

Expand Down
4 changes: 4 additions & 0 deletions packages/sensors_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class _MyHomePageState extends State<MyHomePage> {
_userAccelerometerUpdateTime = now;
},
onError: (e) {
if (!mounted) return;
showDialog(
context: context,
builder: (context) {
Expand Down Expand Up @@ -275,6 +276,7 @@ class _MyHomePageState extends State<MyHomePage> {
_accelerometerUpdateTime = now;
},
onError: (e) {
if (!mounted) return;
showDialog(
context: context,
builder: (context) {
Expand Down Expand Up @@ -304,6 +306,7 @@ class _MyHomePageState extends State<MyHomePage> {
_gyroscopeUpdateTime = now;
},
onError: (e) {
if (!mounted) return;
showDialog(
context: context,
builder: (context) {
Expand Down Expand Up @@ -333,6 +336,7 @@ class _MyHomePageState extends State<MyHomePage> {
_magnetometerUpdateTime = now;
},
onError: (e) {
if (!mounted) return;
showDialog(
context: context,
builder: (context) {
Expand Down
20 changes: 20 additions & 0 deletions packages/video_player_avplay/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## NEXT

* Call the open before calling the SetStreamingProperty.
* Change getStreamingProperty API return type from StreamingPropertyMessage to String.

## 0.4.7

* Add SetBufferConfig interface.

## 0.4.6

* Upgrade plusplayer
1. [HLS] Disabling playback rate change and reducing max latency threshold.
2. [HLS] Bitrate switching optimization and seek to live handling.
3. [DASH] Fixing LL-DASH live channel stuck issue.
4. [PLUSPLAYER] Fixing svace issue cast from int to uint64_t.
5. [DASH] Optimization for LL-DASH catch-up.
6. [HLS] Null check before dereferencing pointer.
7. [HLS] Fix Live stream getting stucked after 15-20 min.

## 0.4.5

* Update plusplayer.ini for using platform gst-ffmpeg library.
Expand Down
2 changes: 1 addition & 1 deletion packages/video_player_avplay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To use this package, add `video_player_avplay` as a dependency in your `pubspec.

```yaml
dependencies:
video_player_avplay: ^0.4.5
video_player_avplay: ^0.4.7
```
Then you can import `video_player_avplay` in your Dart code:
Expand Down
Loading

0 comments on commit a7d0abd

Please sign in to comment.