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 Dec 19, 2023
2 parents eaa4b53 + 623cd21 commit a4e913c
Show file tree
Hide file tree
Showing 116 changed files with 2,152 additions and 1,245 deletions.
5 changes: 4 additions & 1 deletion packages/device_info_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## NEXT
## 1.2.0

* Add `TizenDeviceInfo.data` which represents the device info as a map.
* Disambiguate the method channel name.
* Increase the minimum Flutter version to 3.3.
* Update the example app and integration_test.

## 1.1.0

Expand Down
8 changes: 4 additions & 4 deletions packages/device_info_plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Add `device_info_plus_tizen` as a dependency in your `pubspec.yaml` file.

```yaml
dependencies:
device_info_plus_tizen: ^1.1.0
device_info_plus_tizen: ^1.2.0
```
Then you can import `device_info_plus_tizen` in your Dart code.
Expand All @@ -24,9 +24,9 @@ TizenDeviceInfo tizenInfo = await deviceInfo.tizenInfo;
String modelName = tizenInfo.modelName;
```

## Available values
## Supported properties

| Value | Feature or system key |
| Property | Feature or system key |
|-|-|
| `modelName` | `http://tizen.org/system/model_name` |
| `cpuArch` | `http://tizen.org/feature/platform.core.cpu.arch` |
Expand All @@ -47,4 +47,4 @@ String modelName = tizenInfo.modelName;
| `platformProcessor` | `http://tizen.org/system/platform.processor` |
| `tizenId` | `http://tizen.org/system/tizenid` |

For description on each feature or system key in the list, see https://docs.tizen.org/application/native/guides/device/system.
For a description of each feature or system key in the list, see https://docs.tizen.org/application/native/guides/device/system.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:io';

import 'package:flutter_test/flutter_test.dart';
import 'package:device_info_plus_tizen/device_info_plus_tizen.dart';
import 'package:integration_test/integration_test.dart';
Expand All @@ -19,4 +21,26 @@ void main() {
testWidgets('Can get non-null device model', (WidgetTester tester) async {
expect(tizenInfo.modelName, isNotNull);
});

testWidgets('Check all Tizen info values are available',
(WidgetTester tester) async {
expect(tizenInfo.modelName, isNotNull);
expect(tizenInfo.cpuArch, isNotNull);
expect(tizenInfo.nativeApiVersion, isNotNull);
expect(tizenInfo.platformVersion, isNotNull);
expect(tizenInfo.webApiVersion, isNotNull);
expect(tizenInfo.profile, isNotNull);
expect(tizenInfo.buildDate, isNotNull);
expect(tizenInfo.buildId, isNotNull);
expect(tizenInfo.buildString, isNotNull);
expect(tizenInfo.buildTime, isNotNull);
expect(tizenInfo.buildType, isNotNull);
expect(tizenInfo.buildVariant, isNotNull);
expect(tizenInfo.buildRelease, isNotNull);
expect(tizenInfo.deviceType, isNotNull);
expect(tizenInfo.manufacturer, isNotNull);
expect(tizenInfo.platformName, isNotNull);
expect(tizenInfo.platformProcessor, isNotNull);
expect(tizenInfo.tizenId, isNotNull);
}, skip: !Platform.isLinux);
}
28 changes: 18 additions & 10 deletions packages/device_info_plus/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);

@override
_MyAppState createState() => _MyAppState();
State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
Expand Down Expand Up @@ -80,15 +80,22 @@ class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
useMaterial3: true,
colorSchemeSeed: const Color(0x9f4376f8),
),
home: Scaffold(
appBar: AppBar(title: const Text('Tizen Device Info')),
appBar: AppBar(
title: const Text('Tizen Device Info'),
elevation: 4,
),
body: ListView(
children: _deviceData.keys.map(
(String property) {
return Row(
children: <Widget>[
Container(
padding: const EdgeInsets.all(10.0),
padding: const EdgeInsets.all(10),
child: Text(
property,
style: const TextStyle(
Expand All @@ -97,14 +104,15 @@ class _MyAppState extends State<MyApp> {
),
),
Expanded(
child: Container(
padding: const EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
child: Text(
'${_deviceData[property]}',
maxLines: 10,
overflow: TextOverflow.ellipsis,
child: Container(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Text(
'${_deviceData[property]}',
maxLines: 10,
overflow: TextOverflow.ellipsis,
),
),
)),
),
],
);
},
Expand Down
1 change: 0 additions & 1 deletion packages/device_info_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ dev_dependencies:
sdk: flutter
integration_test_tizen:
path: ../../integration_test/
flutter_lints: ^1.0.4

flutter:
uses-material-design: true
20 changes: 14 additions & 6 deletions packages/device_info_plus/lib/device_info_plus_tizen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import 'package:flutter/services.dart';
///
/// See: https://docs.tizen.org/application/native/guides/device/system
class TizenDeviceInfo {
/// Tizen device info class.
TizenDeviceInfo({
TizenDeviceInfo._({
required this.data,
required this.modelName,
required this.cpuArch,
required this.nativeApiVersion,
Expand All @@ -32,6 +32,9 @@ class TizenDeviceInfo {
required this.tizenId,
});

/// Device information data.
final Map<String, dynamic> data;

/// http://tizen.org/system/model_name
final String? modelName;

Expand Down Expand Up @@ -86,9 +89,10 @@ class TizenDeviceInfo {
/// http://tizen.org/system/tizenid
final String? tizenId;

/// Deserializes from the message received from [_kChannel].
/// Creates a [TizenDeviceInfo] from the [map].
static TizenDeviceInfo fromMap(Map<String, dynamic> map) {
return TizenDeviceInfo(
return TizenDeviceInfo._(
data: map,
modelName: map['modelName'],
cpuArch: map['cpuArch'],
nativeApiVersion: map['nativeApiVersion'],
Expand All @@ -109,12 +113,16 @@ class TizenDeviceInfo {
tizenId: map['tizenId'],
);
}

@override
String toString() {
return 'TizenDeviceInfo{data: $data}';
}
}

class _MethodChannelDeviceInfo {
/// The method channel used to interact with the native platform.
MethodChannel channel =
const MethodChannel('dev.fluttercommunity.plus/device_info');
MethodChannel channel = const MethodChannel('tizen/device_info_plus');

/// Method channel for Tizen devices.
Future<TizenDeviceInfo> tizenInfo() async {
Expand Down
6 changes: 3 additions & 3 deletions packages/device_info_plus/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: device_info_plus_tizen
description: Flutter plugin providing detailed information about Tizen device
(make, model, etc.).
(make, model, etc.) the app is running on.
homepage: https://github.com/flutter-tizen/plugins
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/device_info_plus
version: 1.1.0
version: 1.2.0

environment:
sdk: ">=2.18.0 <4.0.0"
Expand All @@ -21,4 +21,4 @@ dependencies:
sdk: flutter

dev_dependencies:
flutter_lints: ^1.0.4
flutter_lints: ^2.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DeviceInfoPlusTizenPlugin : public flutter::Plugin {
static void RegisterWithRegistrar(flutter::PluginRegistrar *registrar) {
auto channel =
std::make_unique<flutter::MethodChannel<flutter::EncodableValue>>(
registrar->messenger(), "dev.fluttercommunity.plus/device_info",
registrar->messenger(), "tizen/device_info_plus",
&flutter::StandardMethodCodec::GetInstance());

auto plugin = std::make_unique<DeviceInfoPlusTizenPlugin>();
Expand Down
6 changes: 5 additions & 1 deletion packages/flutter_webrtc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## NEXT
## 0.1.3

* Increase the minimum Flutter version to 3.3.
* Update libwebrtc to m114 version.
* Update flutter_webrtc to 0.9.46.
* Update and format flutter_webrtc_demo.
* Support the empty candidate for 'addIceCandidate' api.

## 0.1.2

Expand Down
4 changes: 2 additions & 2 deletions packages/flutter_webrtc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ For other Tizen devices :

```yaml
dependencies:
flutter_webrtc: ^0.9.28
flutter_webrtc_tizen: ^0.1.2
flutter_webrtc: ^0.9.46
flutter_webrtc_tizen: ^0.1.3
```
## Functionality
Expand Down
14 changes: 5 additions & 9 deletions packages/flutter_webrtc/example/flutter_webrtc_demo/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# flutter-webrtc-demo

[![slack](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://join.slack.com/t/flutterwebrtc/shared_invite/zt-q83o7y1s-FExGLWEvtkPKM8ku_F8cEQ)

Flutter WebRTC plugin Demo

Online Demo: <https://demo.cloudwebrtc.com:8086/>
Online Demo: https://flutter-webrtc.github.io/flutter-webrtc-demo/

## Usage

- `cd flutter_webrtc_demo`
- `flutter-tizen pub get`
- `flutter-tizen run`

## Note

- If you want to test `P2P Call Sample`, please use the [webrtc-flutter-server](https://github.com/cloudwebrtc/flutter-webrtc-server), and enter your server address into the example app.

## screenshots

### iOS

# iOS
<img width="180" height="320" src="https://raw.githubusercontent.com/cloudwebrtc/flutter-webrtc-demo/master/screenshots/flutter-webrtc-ios-example.png"/> <img width="180" height="320" src="https://raw.githubusercontent.com/cloudwebrtc/flutter-webrtc-demo/master/screenshots/ios-01.jpeg"/> <img width="180" height="320" src="https://raw.githubusercontent.com/cloudwebrtc/flutter-webrtc-demo/master/screenshots/ios-02.jpeg"/>

### Android

# Android
<img width="180" height="320" src="https://raw.githubusercontent.com/cloudwebrtc/flutter-webrtc-demo/master/screenshots/flutter-webrtc-android-example.png"/> <img width="180" height="320" src="https://raw.githubusercontent.com/cloudwebrtc/flutter-webrtc-demo/master/screenshots/android-01.png"/> <img width="180" height="320" src="https://raw.githubusercontent.com/cloudwebrtc/flutter-webrtc-demo/master/screenshots/android-02.png"/>
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,3 @@ analyzer:
# allow self-reference to deprecated members (we do this because otherwise we have
# to annotate every member in every test, assert, etc, when we deprecate something)
deprecated_member_use_from_same_package: ignore
# Ignore analyzer hints for updating pubspecs when using Future or
# Stream and not importing dart:async
# Please see https://github.com/flutter/flutter/pull/24528 for details.
sdk_version_async_exported_from_core: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class _MyAppState extends State<MyApp> {
_initItems();
}

ListBody _buildRow(context, item) {
Widget _buildRow(context, item) {
return ListBody(children: <Widget>[
ListTile(
title: Text(item.title),
Expand Down
Loading

0 comments on commit a4e913c

Please sign in to comment.