Skip to content

Commit 6241e18

Browse files
v1.0.0
2 parents b63ec7b + dbe9e79 commit 6241e18

File tree

1,148 files changed

+76806
-21414
lines changed

Some content is hidden

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

1,148 files changed

+76806
-21414
lines changed

.circleci/config.yml

-82
This file was deleted.

.github/workflows/main.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Flutter Analyze, Test, and Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
pull_request:
9+
branches:
10+
- "*"
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: "ubuntu-latest"
19+
steps:
20+
- name: 📚 Git Checkout
21+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
22+
23+
- name: 🐦 Setup Flutter
24+
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
25+
with:
26+
flutter-version: "3.10.2"
27+
channel: stable
28+
cache: true
29+
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
30+
31+
- name: 📦 Install Dependencies
32+
run: flutter pub get
33+
34+
# do not fail if the analyze issue is info level
35+
- name: 🕵️ Analyze
36+
run: |
37+
if flutter analyze 2>&1 | grep -q -E 'error:|warning:';
38+
then exit 1
39+
else exit 0
40+
fi
41+
42+
- name: 🧪 Run Tests
43+
run: flutter test
44+
45+
- name: Build Example app
46+
working-directory: ./example
47+
run: flutter build apk --target-platform android-arm

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "binary-websocket-api"]
22
path = binary-websocket-api
3-
url = https://github.com/regentmarkets/binary-websocket-api.git
3+
url = git@github.com:regentmarkets/binary-websocket-api.git
44
branch = master

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## 0.0.1
1+
## 1.0.0
22

3-
* TODO: Describe initial release.
3+
* First release of the package.

CODEOWNERS

-2
This file was deleted.

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ APIInitializer().initialize();
1515
Establishing a connection to WebSocket needs an instance of the `ConnectionInformation` class for initializing API connection.
1616

1717
```dart
18-
final BaseAPI api = Injector.getInjector().get<BaseAPI>();
18+
final BaseAPI api = Injector()<BaseAPI>();
1919
2020
api.connect(
2121
ConnectionInformation(
@@ -45,7 +45,7 @@ print(ping.succeeded);
4545
#### Calling method directly with `BaseAPI`
4646

4747
```dart
48-
final BaseAPI api = Injector.getInjector().get<BaseAPI>();
48+
final BaseAPI api = Injector()<BaseAPI>();
4949
5050
final PingResponse response =
5151
await api.call(request: const PingRequest());
@@ -141,6 +141,8 @@ dependencies:
141141
```
142142
$ git submodule init
143143
$ git submodule update --remote
144+
$ ./setup.sh
145+
$ dart run build_runner build --delete-conflicting-outputs
144146
```
145147

146148
### Run the tests

analysis_options.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ analyzer:
22
exclude:
33
- lib/basic_api/generated/api.dart
44

5-
strong-mode:
6-
implicit-dynamic: false
7-
5+
language:
6+
strict-raw-types: true
7+
88
errors:
99
todo: ignore
1010
missing_required_param: warning
@@ -60,7 +60,7 @@ linter:
6060
- empty_catches
6161
- empty_constructor_bodies
6262
- empty_statements
63-
# - exhaustive_cases # required SDK 2.9.0
63+
- exhaustive_cases # required SDK 2.9.0
6464
- file_names
6565
- flutter_style_todos
6666
- hash_and_equals
@@ -73,6 +73,7 @@ linter:
7373
- list_remove_unrelated_type
7474
- no_adjacent_strings_in_list
7575
- no_duplicate_case_values
76+
- no_leading_underscores_for_local_identifiers
7677
- non_constant_identifier_names
7778
- null_closures
7879
- only_throw_errors
@@ -91,7 +92,6 @@ linter:
9192
- prefer_const_literals_to_create_immutables
9293
- prefer_constructors_over_static_methods
9394
- prefer_contains
94-
- prefer_equal_for_default_values
9595
- prefer_expression_function_bodies # https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
9696
- prefer_final_fields
9797
- prefer_final_in_for_each

android/.gitignore

-8
This file was deleted.

android/build.gradle

-45
This file was deleted.

android/gradle.properties

-4
This file was deleted.

android/gradle/wrapper/gradle-wrapper.properties

-5
This file was deleted.

android/settings.gradle

-1
This file was deleted.

android/src/main/AndroidManifest.xml

-3
This file was deleted.

android/src/main/kotlin/com/deriv/flutter_deriv_api/FlutterDerivApiPlugin.kt

-46
This file was deleted.

0 commit comments

Comments
 (0)