Skip to content

Commit 15078f2

Browse files
HakkyuKimswift-kim
authored andcommitted
[flutter_reactive_ble] Add flutter_reactive_ble_tizen package
1 parent 4b76ac0 commit 15078f2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3903
-0
lines changed

.github/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
- packages/firebase_core/**/*
1414
"p: flutter_app_badger":
1515
- packages/flutter_app_badger/**/*
16+
"p: flutter_reactive_ble":
17+
- packages/flutter_reactive_ble/**/*
1618
"p: flutter_secure_storage":
1719
- packages/flutter_secure_storage/**/*
1820
"p: flutter_tts":

.github/recipe.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ plugins:
2323
wakelock: ["wearable-5.5"]
2424

2525
# No tests.
26+
flutter_reactive_ble: []
2627
google_sign_in: []
2728
image_picker: []
2829
firebase_core: []

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ The _"non-endorsed"_ status means that the plugin is not endorsed by the origina
2121
| [**device_info_plus_tizen**](packages/device_info_plus) | [device_info_plus](https://pub.dev/packages/device_info_plus) (1st-party) | [![pub package](https://img.shields.io/pub/v/device_info_plus_tizen.svg)](https://pub.dev/packages/device_info_plus_tizen) | No |
2222
| [**firebase_core_tizen**](packages/firebase_core) | [firebase_core](https://pub.dev/packages/firebase_core) | [![pub package](https://img.shields.io/pub/v/firebase_core_tizen.svg)](https://pub.dev/packages/firebase_core_tizen) | No |
2323
| [**flutter_app_badger_tizen**](packages/flutter_app_badger) | [flutter_app_badger](https://pub.dev/packages/flutter_app_badger) (3rd-party) | [![pub package](https://img.shields.io/pub/v/flutter_app_badger_tizen.svg)](https://pub.dev/packages/flutter_app_badger_tizen) | No |
24+
| [**flutter_reactive_ble_tizen**](packages/flutter_reactive_ble) | [flutter_reactive_ble](https://pub.dev/packages/flutter_reactive_ble) (3rd-party) | [![pub package](https://img.shields.io/pub/v/flutter_reactive_ble_tizen.svg)](https://pub.dev/packages/flutter_reactive_ble_tizen) | No |
2425
| [**flutter_secure_storage_tizen**](packages/flutter_secure_storage) | [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage) (3rd-party) | [![pub package](https://img.shields.io/pub/v/flutter_secure_storage_tizen.svg)](https://pub.dev/packages/flutter_secure_storage_tizen) | No |
2526
| [**flutter_tts_tizen**](packages/flutter_tts) | [flutter_tts](https://pub.dev/packages/flutter_tts) (3rd-party) | [![pub package](https://img.shields.io/pub/v/flutter_tts_tizen.svg)](https://pub.dev/packages/flutter_tts_tizen) | No |
2627
| [**flutter_webrtc_tizen**](packages/flutter_webrtc) | [flutter_webrtc](https://pub.dev/packages/flutter_webrtc) (3rd-party) | [![pub package](https://img.shields.io/pub/v/flutter_webrtc_tizen.svg)](https://pub.dev/packages/flutter_webrtc_tizen) | No |
@@ -63,6 +64,7 @@ The _"non-endorsed"_ status means that the plugin is not endorsed by the origina
6364
| [**device_info_plus_tizen**](packages/device_info_plus) | 4.0 | ✔️ | ✔️ | ✔️ | ✔️ |
6465
| [**firebase_core**](packages/firebase_core) | 4.0 | ✔️ | ✔️ | ✔️ | ✔️ |
6566
| [**flutter_app_badger_tizen**](packages/flutter_app_badger) | 4.0 | ✔️ | ✔️ ||| API not supported |
67+
| [**flutter_reactive_ble_tizen**](packages/flutter_reactive_ble) | 4.0 | ✔️ || ✔️ || API not supported on emulator |
6668
| [**flutter_secure_storage_tizen**](packages/flutter_secure_storage) | 4.0 | ✔️ | ✔️ | ✔️ | ✔️ |
6769
| [**flutter_tts_tizen**](packages/flutter_tts) | 4.0 | ✔️ | ✔️ | ✔️ | ✔️ |
6870
| [**flutter_webrtc_tizen**](packages/flutter_webrtc) | 6.0 ||| ✔️ || No camera |
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# VS Code related
20+
.vscode/
21+
22+
# Flutter/Dart/Pub related
23+
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
24+
/pubspec.lock
25+
**/doc/api/
26+
.dart_tool/
27+
.packages
28+
build/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.1.0
2+
3+
* Initial release.

packages/flutter_reactive_ble/LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright (c) 2023 Samsung Electronics Co., Ltd. All rights reserved.
2+
Copyright (c) 2019 Signify Holding. All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without modification,
5+
are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above
10+
copyright notice, this list of conditions and the following
11+
disclaimer in the documentation and/or other materials provided
12+
with the distribution.
13+
* Neither the names of the copyright holders nor the names of the
14+
contributors may be used to endorse or promote products derived
15+
from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
24+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# flutter_reactive_ble_tizen
2+
3+
[![pub package](https://img.shields.io/pub/v/flutter_reactive_ble_tizen.svg)](https://pub.dev/packages/flutter_reactive_ble_tizen)
4+
5+
The Tizen implementation of [`flutter_reactive_ble`](https://pub.dev/packages/flutter_reactive_ble).
6+
7+
## Usage
8+
9+
This package is not an _endorsed_ implementation of `flutter_reactive_ble`. Therefore, you have to include `flutter_reactive_ble_tizen` alongside `flutter_reactive_ble` as dependencies in your `pubspec.yaml` file.
10+
11+
```yaml
12+
dependencies:
13+
flutter_reactive_ble: ^5.0.3
14+
flutter_reactive_ble_tizen: ^0.1.0
15+
```
16+
17+
Then you can import `flutter_reactive_ble` in your Dart code:
18+
19+
```dart
20+
import 'package:flutter_reactive_ble/flutter_reactive_ble.dart';
21+
```
22+
23+
For detailed usage, see https://pub.dev/packages/flutter_reactive_ble#usage.
24+
25+
## Required privileges
26+
27+
The bluetooth privilege must be added to your `tizen-manifest.xml` file to use this plugin.
28+
29+
```xml
30+
<privileges>
31+
<privilege>http://tizen.org/privilege/bluetooth</privilege>
32+
</privileges>
33+
```
34+
35+
## Known issues
36+
37+
* The plugin sometimes doesn't respond to characteristic read or notify/indicate requests, requiring the user to press the same button twice in the example app.
38+
* Tizen's BLE module often fails to retrieve the names of discovered devices, which is not the case on other platforms such as Android.
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
analyzer:
4+
strong-mode:
5+
implicit-casts: false
6+
implicit-dynamic: false
7+
exclude:
8+
- "bin/cache/**"
9+
- "**/*.freezed.dart"
10+
- "**/*.g.dart"
11+
- "**/*.mocks.dart"
12+
- "**/generated/**"
13+
14+
linter:
15+
rules:
16+
# Errors
17+
- avoid_empty_else
18+
- avoid_relative_lib_imports
19+
- avoid_returning_null_for_future
20+
- avoid_slow_async_io
21+
- avoid_types_as_parameter_names
22+
- cancel_subscriptions
23+
- close_sinks
24+
# - comment_references -- DISABLED: collision with mockito generation
25+
- control_flow_in_finally
26+
# - diagnostic_describe_all_properties -- DISABLED: experimental feature
27+
- empty_statements
28+
- hash_and_equals
29+
- iterable_contains_unrelated_type
30+
- list_remove_unrelated_type
31+
- literal_only_boolean_expressions
32+
- no_adjacent_strings_in_list
33+
- no_duplicate_case_values
34+
- prefer_void_to_null
35+
- test_types_in_equals
36+
- throw_in_finally
37+
- unnecessary_statements
38+
- unrelated_type_equality_checks
39+
- valid_regexps
40+
# Style checks
41+
- always_declare_return_types
42+
# - always_put_control_body_on_new_line -- DISABLED: DARTFMT INCOMPATIBLE
43+
- always_put_required_named_parameters_first
44+
- always_require_non_null_named_parameters
45+
# - always_specify_types -- DISABLED: LEADS TO FLUFFY CODE
46+
- annotate_overrides
47+
# - avoid_annotating_with_dynamic -- DISABLED: Gives false positives for function arguments where it is needed
48+
# - avoid_as
49+
- avoid_bool_literals_in_conditional_expressions
50+
- avoid_catches_without_on_clauses
51+
- avoid_catching_errors
52+
- avoid_classes_with_only_static_members
53+
- avoid_double_and_int_checks
54+
- avoid_field_initializers_in_const_classes
55+
# - avoid_function_literals_in_foreach_calls -- DISABLED: forEach is often clearer than for-loop
56+
- avoid_implementing_value_types
57+
- avoid_init_to_null
58+
- avoid_js_rounded_ints
59+
- avoid_null_checks_in_equality_operators
60+
- avoid_positional_boolean_parameters
61+
- avoid_private_typedef_functions
62+
- avoid_renaming_method_parameters
63+
- avoid_return_types_on_setters
64+
- avoid_returning_null
65+
- avoid_returning_null_for_void
66+
- avoid_returning_this
67+
# - avoid_setters_without_getters -- DISABLED: Sometimes it makes sense to have write-only member
68+
# - avoid_shadowing_type_parameters -- TODO: Enable new option
69+
- avoid_single_cascade_in_expression_statements
70+
# - avoid_types_on_closure_parameters -- DISABLED: INCOMPATIBLE WITH IMPLICIT TYPE CASTS DISABLED
71+
- avoid_unused_constructor_parameters
72+
- avoid_void_async
73+
- await_only_futures
74+
- camel_case_types
75+
- cascade_invocations
76+
- constant_identifier_names
77+
# - curly_braces_in_flow_control_structures -- DISABLED: WE DO NOT WANT THIS
78+
- directives_ordering
79+
- empty_catches
80+
- empty_constructor_bodies
81+
- file_names
82+
# - flutter_style_todos -- DISABLED: TOO MUCH?
83+
- implementation_imports
84+
- join_return_with_assignment
85+
- library_names
86+
- library_prefixes
87+
# - lines_longer_than_80_chars -- DISABLED: WE DO NOT WANT THIS
88+
- non_constant_identifier_names
89+
- null_closures
90+
- omit_local_variable_types
91+
# - one_member_abstracts -- DISABLED: OBSTRUCTS OO DESIGN
92+
- only_throw_errors
93+
- overridden_fields
94+
- package_api_docs
95+
- package_prefixed_library_names
96+
- parameter_assignments
97+
- prefer_adjacent_string_concatenation
98+
- prefer_asserts_in_initializer_lists
99+
# - prefer_asserts_with_message -- DISABLED: BOOLEAN CONDITIONS ARE GOOD ENOUGH
100+
- prefer_collection_literals
101+
- prefer_conditional_assignment
102+
- prefer_const_constructors
103+
- prefer_const_constructors_in_immutables
104+
- prefer_const_declarations
105+
- prefer_const_literals_to_create_immutables
106+
- prefer_constructors_over_static_methods
107+
- prefer_contains
108+
# - prefer_double_quotes -- DISABLED: This rule is to be supported in a future Dart release
109+
- prefer_equal_for_default_values
110+
- prefer_expression_function_bodies
111+
- prefer_final_fields
112+
- prefer_final_in_for_each
113+
- prefer_final_locals
114+
- prefer_for_elements_to_map_fromIterable
115+
- prefer_foreach
116+
- prefer_function_declarations_over_variables
117+
- prefer_generic_function_type_aliases
118+
- prefer_if_elements_to_conditional_expressions
119+
- prefer_initializing_formals
120+
- prefer_inlined_adds
121+
# - prefer_int_literals -- DISABLED: ADDED VALUE IS UNCLEAR
122+
- prefer_interpolation_to_compose_strings
123+
- prefer_is_empty
124+
- prefer_is_not_empty
125+
- prefer_iterable_whereType
126+
- prefer_mixin
127+
- prefer_null_aware_operators
128+
# - prefer_single_quotes -- DISABLED: ADDED VALUE IS UNCLEAR
129+
- prefer_spread_collections
130+
- prefer_typing_uninitialized_variables
131+
# - provide_deprecation_messages -- DISABLED: This rule is to be supported in a future Dart release
132+
# - public_member_api_docs
133+
- recursive_getters
134+
- slash_for_doc_comments
135+
# - sort_child_properties_last -- This rule is to be supported in a future Dart release
136+
# - sort_constructors_first -- DISABLED: ADDED VALUE IS UNCLEAR
137+
# - sort_unnamed_constructors_first -- DISABLED: ADDED VALUE IS UNCLEAR
138+
# - type_annotate_public_apis -- DISABLED: ADDED VALUE IS UNCLEAR
139+
- type_init_formals
140+
- unawaited_futures
141+
- unnecessary_await_in_return
142+
- unnecessary_brace_in_string_interps
143+
- unnecessary_const
144+
- unnecessary_getters_setters
145+
- unnecessary_lambdas
146+
- unnecessary_new
147+
- unnecessary_null_aware_assignments
148+
- unnecessary_null_in_if_null_operators
149+
- unnecessary_overrides
150+
- unnecessary_parenthesis
151+
- unnecessary_this
152+
- use_full_hex_values_for_flutter_colors
153+
- use_function_type_syntax_for_parameters
154+
- use_rethrow_when_possible
155+
- use_setters_to_change_properties
156+
- use_string_buffers
157+
- use_to_and_as_if_applicable
158+
- void_checks
159+
# Pub Rules
160+
- package_names
161+
- sort_pub_dependencies
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# VS Code related
20+
.vscode/
21+
22+
# Flutter/Dart/Pub related
23+
**/doc/api/
24+
**/ios/Flutter/.last_build_id
25+
.dart_tool/
26+
.flutter-plugins
27+
.flutter-plugins-dependencies
28+
.packages
29+
.pub-cache/
30+
.pub/
31+
/build/
32+
33+
# Symbolication related
34+
app.*.symbols
35+
36+
# Obfuscation related
37+
app.*.map.json
38+
39+
# Android Studio will place build artifacts here
40+
/android/app/debug
41+
/android/app/profile
42+
/android/app/release
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# flutter_reactive_ble_tizen_example
2+
3+
Demonstrates how to use the flutter_reactive_ble_tizen plugin.
4+
5+
## Getting Started
6+
7+
To run this app on your Tizen device, use [flutter-tizen](https://github.com/flutter-tizen/flutter-tizen).

0 commit comments

Comments
 (0)