Compare commits
123 Commits
Author | SHA1 | Date |
---|---|---|
Rongjian Zhang | c30895ab1e | |
Rongjian Zhang | 504ee9c863 | |
Rongjian Zhang | 0f4192f0be | |
Shreyas Thirumalai | 19a87870bb | |
Shreyas Thirumalai | 88ca58d62b | |
Rongjian Zhang | ade30dec99 | |
Rongjian Zhang | 51bd138951 | |
Rongjian Zhang | 4595f61961 | |
Rongjian Zhang | 7d70886d52 | |
Rongjian Zhang | 1edc61edef | |
Rongjian Zhang | 65e43dc633 | |
Rongjian Zhang | 06a96a14be | |
Rongjian Zhang | e2de7feec2 | |
Rongjian Zhang | 56402d789c | |
Rongjian Zhang | 29242aa45d | |
Rongjian Zhang | ad44495236 | |
Rongjian Zhang | 3d21b6c226 | |
Rongjian Zhang | fbb524a7de | |
Rongjian Zhang | 7bd412eb2b | |
Rongjian Zhang | 7ca3fe03c5 | |
Rongjian Zhang | b65ce98077 | |
Rongjian Zhang | fddf67d518 | |
Rongjian Zhang | 5a5b20eb7e | |
Rongjian Zhang | efd74ccd86 | |
Rongjian Zhang | 7b51747576 | |
Rongjian Zhang | 61d5a3e846 | |
Rongjian Zhang | 9892d87f9b | |
Rongjian Zhang | 826664e3f1 | |
Rongjian Zhang | e6298b2363 | |
Rongjian Zhang | 3953544d55 | |
Rongjian Zhang | f7eb0e6f62 | |
Rongjian Zhang | 830441ba05 | |
Rongjian Zhang | d86229e367 | |
Rongjian Zhang | a1182ed6a5 | |
Rongjian Zhang | 633b58d36f | |
Rongjian Zhang | 4c2a7177eb | |
Rongjian Zhang | 057bad71fe | |
Rongjian Zhang | 9b339c6cdf | |
Rongjian Zhang | 7a71d13f7d | |
Rongjian Zhang | 36e505d511 | |
Rongjian Zhang | 775b2cef49 | |
Rongjian Zhang | e872b4753d | |
Rongjian Zhang | df946c514a | |
Rongjian Zhang | e45b8fa134 | |
Rongjian Zhang | 2d28eb7b41 | |
Rongjian Zhang | 55f3f6a713 | |
Rongjian Zhang | 0a28311797 | |
Rongjian Zhang | b7dcf933a3 | |
Rongjian Zhang | 26b78a31a6 | |
Rongjian Zhang | 0e952a6ef7 | |
Rongjian Zhang | 9e2850558d | |
Rongjian Zhang | 206cd1244c | |
Rongjian Zhang | 4fe46b274a | |
Rongjian Zhang | 048d35112b | |
Rongjian Zhang | 3474d931ac | |
Rongjian Zhang | 706d456c46 | |
Rongjian Zhang | efc2359f27 | |
Rongjian Zhang | ba34337b07 | |
Rongjian Zhang | 89966a95e6 | |
Rongjian Zhang | 9df896a0db | |
Rongjian Zhang | 7b08f4cc07 | |
Rongjian Zhang | d5f3bd9f24 | |
Rongjian Zhang | a30385a414 | |
Rongjian Zhang | 8d1e3fa596 | |
Rongjian Zhang | d7972c4084 | |
Rongjian Zhang | 6df89e771e | |
Rongjian Zhang | 536b031655 | |
Rongjian Zhang | 15a57899fd | |
Rongjian Zhang | fee559ba9a | |
Rongjian Zhang | 073af6f492 | |
Rongjian Zhang | d8f38d34aa | |
Rongjian Zhang | 9b914ff1f1 | |
Rongjian Zhang | 20b7addf51 | |
Rongjian Zhang | 5214a404b1 | |
Rongjian Zhang | cf6871ce20 | |
Rongjian Zhang | 988cdbfe45 | |
Rongjian Zhang | e8eb860222 | |
Rongjian Zhang | 7e79da77ee | |
Rongjian Zhang | 606370a85e | |
Rongjian Zhang | e5929aa1b8 | |
Rongjian Zhang | f0b52e82ab | |
Rongjian Zhang | 5b7b465b09 | |
Rongjian Zhang | 8eda3e36c8 | |
Rongjian Zhang | b2e7a97dab | |
Rongjian Zhang | 137af2df75 | |
Rongjian Zhang | ec99de2b6d | |
Rongjian Zhang | 66e14509de | |
Rongjian Zhang | fac17a69ef | |
Rongjian Zhang | d9c50cd0a9 | |
Rongjian Zhang | 4e715d9697 | |
Rongjian Zhang | d250f1c95c | |
Rongjian Zhang | a512e41121 | |
Rongjian Zhang | 9545b26310 | |
Rongjian Zhang | 4af23c160d | |
Rongjian Zhang | 084bc3c86a | |
Rongjian Zhang | aac5fb866b | |
Rongjian Zhang | 08f70164f4 | |
Rongjian Zhang | cac6385e6e | |
Rongjian Zhang | 9207d52cf3 | |
Rongjian Zhang | 3261db8fee | |
Rongjian Zhang | dc40206576 | |
Rongjian Zhang | f14e274d24 | |
Rongjian Zhang | c5ea37f9bd | |
Rongjian Zhang | 5635238921 | |
Rongjian Zhang | 081acbeda8 | |
Rongjian Zhang | b688dc155a | |
Rongjian Zhang | e8f3d956c3 | |
Rongjian Zhang | 854a1c9506 | |
Rongjian Zhang | f52fee752d | |
Rongjian Zhang | ff7eadc5c9 | |
Rongjian Zhang | fc7dd512e8 | |
Rongjian Zhang | 8114cff317 | |
Rongjian Zhang | bad5327928 | |
Rongjian Zhang | 126fadac76 | |
Rongjian Zhang | 594c5de972 | |
Rongjian Zhang | 7247c05817 | |
Rongjian Zhang | 112a97f0eb | |
Rongjian Zhang | d48ac1e484 | |
Shreyas Thirumalai | d6a24c257a | |
Shreyas Thirumalai | 68253e071e | |
Shreyas Thirumalai | ddfa9e469e | |
Rongjian Zhang | 64178db3db | |
Rongjian Zhang | 1f4f034c40 |
|
@ -8,6 +8,7 @@
|
|||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
|
@ -39,4 +40,10 @@ app.*.symbols
|
|||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
lib/generated/
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
|
||||
packages/*/pubspec.lock
|
||||
|
|
39
.metadata
39
.metadata
|
@ -1,10 +1,45 @@
|
|||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
# This file should be version controlled.
|
||||
|
||||
version:
|
||||
revision: d408d302e22179d598f467e11da5dd968dbdc9ec
|
||||
revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
channel: stable
|
||||
|
||||
project_type: app
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
base_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
- platform: android
|
||||
create_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
base_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
- platform: ios
|
||||
create_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
base_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
- platform: linux
|
||||
create_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
base_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
- platform: macos
|
||||
create_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
base_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
- platform: web
|
||||
create_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
base_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
- platform: windows
|
||||
create_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
base_revision: 676cefaaff197f27424942307668886253e1ec35
|
||||
|
||||
# User provided section
|
||||
|
||||
# List of Local paths (relative to this file) that should be
|
||||
# ignored by the migrate tool.
|
||||
#
|
||||
# Files that are not part of the templates will be ignored by default.
|
||||
unmanaged_files:
|
||||
- 'lib/main.dart'
|
||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "all",
|
||||
"dependsOn": ["root", "gql_github", "gql_gitlab", "github_trending"]
|
||||
},
|
||||
{
|
||||
"label": "root",
|
||||
"type": "dart",
|
||||
"command": "dart",
|
||||
"args": ["run", "build_runner", "watch"]
|
||||
},
|
||||
{
|
||||
"label": "gql_github",
|
||||
"type": "dart",
|
||||
"command": "dart",
|
||||
"cwd": "packages/gql_github",
|
||||
"args": ["run", "build_runner", "watch"]
|
||||
},
|
||||
{
|
||||
"label": "gql_gitlab",
|
||||
"type": "dart",
|
||||
"command": "dart",
|
||||
"cwd": "packages/gql_gitlab",
|
||||
"args": ["run", "build_runner", "watch"]
|
||||
},
|
||||
{
|
||||
"label": "github_trending",
|
||||
"type": "dart",
|
||||
"command": "dart",
|
||||
"cwd": "packages/github_trending",
|
||||
"args": ["run", "build_runner", "watch"]
|
||||
}
|
||||
]
|
||||
}
|
731
CHANGELOG.md
731
CHANGELOG.md
|
@ -1,16 +1,721 @@
|
|||
## 1.1.0
|
||||
# [](https://github.com/git-touch/git-touch/compare/v1.13.0...v) (2021-06-14)
|
||||
|
||||
|
||||
|
||||
# [1.13.0](https://github.com/git-touch/git-touch/compare/v1.12.4...v1.13.0) (2021-06-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* avatar url error fallback ([70e19e9](https://github.com/git-touch/git-touch/commit/70e19e9b7204100d5c72ec9dc14991d245c70b07))
|
||||
* bitbucket and gitlab files length ([242dd12](https://github.com/git-touch/git-touch/commit/242dd1200de034b4bf2bfbf30ea94c1a3dcd6153)), closes [#224](https://github.com/git-touch/git-touch/issues/224)
|
||||
* long list scaffold ([17b6fd5](https://github.com/git-touch/git-touch/commit/17b6fd5d783e6dbc80b00e57423c2876ac862306))
|
||||
* types ([97bd998](https://github.com/git-touch/git-touch/commit/97bd99849104bebfc3633b3c5bd96de6db35d3a1))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* check update after opening app ([36930eb](https://github.com/git-touch/git-touch/commit/36930eb8aad7ab78566324fcd1347c4e0c48166f))
|
||||
* crash report ([442d910](https://github.com/git-touch/git-touch/commit/442d910dbdcdc9d1dae519c6e44085874ddf2f76)), closes [#114](https://github.com/git-touch/git-touch/issues/114)
|
||||
|
||||
|
||||
|
||||
## [1.12.4](https://github.com/git-touch/git-touch/compare/v1.12.3...v1.12.4) (2021-05-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* empty accounts ([e2f103a](https://github.com/git-touch/git-touch/commit/e2f103a807291fd0cec12dcca641c70e66f3fa18))
|
||||
* nullable types ([841a5d1](https://github.com/git-touch/git-touch/commit/841a5d13cf76d7f5e0a62ad90471ab241fe06fef))
|
||||
* pagination null ([87dbe87](https://github.com/git-touch/git-touch/commit/87dbe870954139196c318698e47a90d26eb92586))
|
||||
* set locale null ([9b3a6fc](https://github.com/git-touch/git-touch/commit/9b3a6fce078690bc7474aed5b91c7d8dbe6d84b2))
|
||||
|
||||
|
||||
|
||||
## [1.12.3](https://github.com/git-touch/git-touch/compare/v1.12.2...v1.12.3) (2021-02-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **github:** issue screen pagination ([7521c40](https://github.com/git-touch/git-touch/commit/7521c40ee8b7e4805e6a5acdd354c7700839f150)), closes [#198](https://github.com/git-touch/git-touch/issues/198)
|
||||
* locale resolve ([74e731a](https://github.com/git-touch/git-touch/commit/74e731af5ed5242c0852c12f859d0cd16a6c3c94))
|
||||
|
||||
|
||||
|
||||
## [1.12.2](https://github.com/git-touch/git-touch/compare/v1.12.1...v1.12.2) (2021-02-19)
|
||||
|
||||
|
||||
|
||||
## [1.12.1](https://github.com/git-touch/git-touch/compare/v1.12.0...v1.12.1) (2021-02-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* locale fallback ([c80ca3e](https://github.com/git-touch/git-touch/commit/c80ca3e86034979ade2fb170be9a047def016395)), closes [#199](https://github.com/git-touch/git-touch/issues/199)
|
||||
* **bitbucket:** pull requests url ([#197](https://github.com/git-touch/git-touch/issues/197)) ([4a7028f](https://github.com/git-touch/git-touch/commit/4a7028f5256fde36a951f09b6c88e2f420e77e79))
|
||||
|
||||
|
||||
|
||||
# [1.12.0](https://github.com/git-touch/git-touch/compare/v1.11.1...v1.12.0) (2021-02-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **github:** commits screen ref ([07d3910](https://github.com/git-touch/git-touch/commit/07d39100d71ebb32c28e74a2d70a031fc0178f6b)), closes [#196](https://github.com/git-touch/git-touch/issues/196)
|
||||
* files screen error ([#184](https://github.com/git-touch/git-touch/issues/184)) ([4f3d472](https://github.com/git-touch/git-touch/commit/4f3d47200e81f8f77898004d44f8f8006b41d20d))
|
||||
* html view disposed before set state ([f4e5df4](https://github.com/git-touch/git-touch/commit/f4e5df4068847c0033c6cfed4a94128e2cee8354))
|
||||
* set locale and reload ([d488d4b](https://github.com/git-touch/git-touch/commit/d488d4b8269b2df5e9b54dace2da21262f368633))
|
||||
* **github:** comment emoji reaction ([dd6fe2b](https://github.com/git-touch/git-touch/commit/dd6fe2b96148aa25afced4b28da555289b70867c))
|
||||
* **github:** comment of deleted user ([09edf5f](https://github.com/git-touch/git-touch/commit/09edf5f04b31b36c202f2f6d76bf376f95c76d2a)), closes [#161](https://github.com/git-touch/git-touch/issues/161)
|
||||
* **github:** release screen error ([#183](https://github.com/git-touch/git-touch/issues/183)) ([af3c165](https://github.com/git-touch/git-touch/commit/af3c1655e42d4d2057e1996fc57945a46bc49709))
|
||||
* **github:** repo and user mutations ([10477a7](https://github.com/git-touch/git-touch/commit/10477a707115eb11ababb20a684b2b56b84c6e84))
|
||||
* hide contribution graph scrollbar ([#177](https://github.com/git-touch/git-touch/issues/177)) ([b0193a5](https://github.com/git-touch/git-touch/commit/b0193a5deff73b6d9efc263b89431c02a95a2455)), closes [#37](https://github.com/git-touch/git-touch/issues/37)
|
||||
* typo ([7a21961](https://github.com/git-touch/git-touch/commit/7a2196170eeacc2428d3ea8f7c2e0c01d98d3605)), closes [#172](https://github.com/git-touch/git-touch/issues/172)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* choose locale in settings ([#189](https://github.com/git-touch/git-touch/issues/189)) ([717b7cd](https://github.com/git-touch/git-touch/commit/717b7cd3369e8fddca0699b5732726cde37066d7))
|
||||
* skip login screen when logged in ([#191](https://github.com/git-touch/git-touch/issues/191)) ([3b88ad0](https://github.com/git-touch/git-touch/commit/3b88ad01f7af1c7763084d3df2c6b9de27fe602e))
|
||||
* **gitee:** watch, star a repo ([#157](https://github.com/git-touch/git-touch/issues/157)) ([c75288e](https://github.com/git-touch/git-touch/commit/c75288ef977ae84123afc6ed7a1efd2527cc859a))
|
||||
* **github:** add public repos only login option ([31c43ee](https://github.com/git-touch/git-touch/commit/31c43eebc8e3b11a60da92926b94b4c052029e9a)), closes [#133](https://github.com/git-touch/git-touch/issues/133)
|
||||
* **github:** releases, gists(graphql) ([#179](https://github.com/git-touch/git-touch/issues/179)) ([fba6e4c](https://github.com/git-touch/git-touch/commit/fba6e4cb724957357f3ab0410619e6a29d93acb9)), closes [#174](https://github.com/git-touch/git-touch/issues/174)
|
||||
* dark mode avatar placeholder ([c1b3d33](https://github.com/git-touch/git-touch/commit/c1b3d330e009fc3001793d0f1e3aa35d8ba47eb8))
|
||||
* **gitlab:** branches, issueAdd, router path fix ([#165](https://github.com/git-touch/git-touch/issues/165)) ([d826107](https://github.com/git-touch/git-touch/commit/d826107621286cf3e93e870233f070bb4ed9d797))
|
||||
* **gogs:** setup ([#170](https://github.com/git-touch/git-touch/issues/170)) ([4f1e044](https://github.com/git-touch/git-touch/commit/4f1e0441d2e16042482cdc0235a81dd7981c604e)), closes [#117](https://github.com/git-touch/git-touch/issues/117)
|
||||
|
||||
|
||||
|
||||
## [1.11.1](https://github.com/git-touch/git-touch/compare/v1.11.0...v1.11.1) (2021-01-11)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* drop app review dep to fit f-droid ([f1956db](https://github.com/git-touch/git-touch/commit/f1956dbdc31f89fc3b8fdd59404ffbcd3435ebd9))
|
||||
|
||||
|
||||
|
||||
# [1.11.0](https://github.com/git-touch/git-touch/compare/v1.10.1...v1.11.0) (2021-01-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* new issue link ([09ed700](https://github.com/git-touch/git-touch/commit/09ed70024ce38bf72084797884534233567eaaec))
|
||||
* **github:** proper spacing in branch creation/deletion events ([#149](https://github.com/git-touch/git-touch/issues/149)) ([efe882a](https://github.com/git-touch/git-touch/commit/efe882a0dfdc4b824fd3265464f5e92e9557ba96))
|
||||
* fallback language ([#141](https://github.com/git-touch/git-touch/issues/141)) ([8aa6604](https://github.com/git-touch/git-touch/commit/8aa660437fa3ed098ecd1fb1462a80e87a36d1fc)), closes [#140](https://github.com/git-touch/git-touch/issues/140)
|
||||
* gitee typo ([#145](https://github.com/git-touch/git-touch/issues/145)) ([4679ca1](https://github.com/git-touch/git-touch/commit/4679ca10ee1898a10798c10091445f09bfa26617))
|
||||
* UserItem assertion failure ([#135](https://github.com/git-touch/git-touch/issues/135)) ([c6757c1](https://github.com/git-touch/git-touch/commit/c6757c154890b9120848d985229f80c7c842fbfd))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **bitbucket:** update ([#147](https://github.com/git-touch/git-touch/issues/147)) ([76f9999](https://github.com/git-touch/git-touch/commit/76f999953496fa1828795fa22cf1e05148a9ea9b))
|
||||
* **gitea:** issue, issueComment, labels, refactor(GeIssueComment) ([#155](https://github.com/git-touch/git-touch/issues/155)) ([d74b141](https://github.com/git-touch/git-touch/commit/d74b1412791cf94af2ad570eb645ee19f7b9db17))
|
||||
* **gitee:** branches, labels, contributors, refactor(RouterScreen) ([#153](https://github.com/git-touch/git-touch/issues/153)) ([f723eef](https://github.com/git-touch/git-touch/commit/f723eef83af655f383f4da01c41735608777ffec))
|
||||
* **gitee:** comment actions (issue/PR) ([#150](https://github.com/git-touch/git-touch/issues/150)) ([e9454c3](https://github.com/git-touch/git-touch/commit/e9454c3dce9137931856da2775347578b45212f3))
|
||||
* **gitee:** issues, issue, pullRequests screens ([#144](https://github.com/git-touch/git-touch/issues/144)) ([1ac27f4](https://github.com/git-touch/git-touch/commit/1ac27f4853dfe8a8c9aa801bcffac57c7fce2c72))
|
||||
* **gitee:** search screen ([#146](https://github.com/git-touch/git-touch/issues/146)) ([8415a67](https://github.com/git-touch/git-touch/commit/8415a677c0425a5130b6c409a69139c98103b231))
|
||||
* **gitee:** updates ([#148](https://github.com/git-touch/git-touch/issues/148)) ([92bcdaa](https://github.com/git-touch/git-touch/commit/92bcdaa4b0924dfff3fb1b50886d510df93b9fbf))
|
||||
* add generated runner for Linux ([#134](https://github.com/git-touch/git-touch/issues/134)) ([f152c9a](https://github.com/git-touch/git-touch/commit/f152c9afdc2d27d6f3559470370cde649e0c33cc))
|
||||
* localization ([#137](https://github.com/git-touch/git-touch/issues/137)) ([0a1da29](https://github.com/git-touch/git-touch/commit/0a1da29c3eac6aa1785f7722f8da376281bb9865)), closes [#119](https://github.com/git-touch/git-touch/issues/119)
|
||||
|
||||
|
||||
|
||||
## [1.10.1](https://github.com/git-touch/git-touch/compare/v1.10.0...v1.10.1) (2020-12-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* android markdown webview render ([fb3ed14](https://github.com/git-touch/git-touch/commit/fb3ed14b4f9ed2752f96e119bd59ee783bdb5f68)), closes [#123](https://github.com/git-touch/git-touch/issues/123)
|
||||
* remove in-app review ([c6a8b42](https://github.com/git-touch/git-touch/commit/c6a8b42ef1c95f57d2e9439987f4546a6ea3f7c7)), closes [#129](https://github.com/git-touch/git-touch/issues/129)
|
||||
* update android launch image ([378d406](https://github.com/git-touch/git-touch/commit/378d406d379487860649bcad0ff818246ac1b4c1)), closes [#128](https://github.com/git-touch/git-touch/issues/128)
|
||||
|
||||
|
||||
|
||||
# [1.10.0](https://github.com/git-touch/git-touch/compare/v1.9.0...v1.10.0) (2020-12-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* launch image icon size ([15fe6db](https://github.com/git-touch/git-touch/commit/15fe6dbdb648b254e39cefbaa7f87c1787e38062))
|
||||
* **github:** trending api encoding ([9dd02e0](https://github.com/git-touch/git-touch/commit/9dd02e081672b0acc6619bff0195ba013f52c6c4)), closes [#120](https://github.com/git-touch/git-touch/issues/120)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* macos integration ([e41445c](https://github.com/git-touch/git-touch/commit/e41445cc8c4d7a40e78f9a9886d6e6113a697cd9))
|
||||
* request in-app review ([08511fb](https://github.com/git-touch/git-touch/commit/08511fb8fb854af0817eae9814e16f23c67183e1)), closes [#127](https://github.com/git-touch/git-touch/issues/127)
|
||||
* tweak dark mode contribution color ([6036849](https://github.com/git-touch/git-touch/commit/6036849e9b7a3caec51405a6cf2ece96803d64c0))
|
||||
* web deployment ([72d4d2d](https://github.com/git-touch/git-touch/commit/72d4d2d2b90edd56edfb910d95072bdc36f0dded))
|
||||
|
||||
|
||||
|
||||
# [1.9.0](https://github.com/git-touch/git-touch/compare/v1.8.0...v1.9.0) (2020-11-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **github:** actor link ([ee03b52](https://github.com/git-touch/git-touch/commit/ee03b52461591ad38711b2e2a31e501c4204abb4))
|
||||
* markdown webview dark mode ([979e913](https://github.com/git-touch/git-touch/commit/979e91378b2488f5db82b7e4b1bb833fcb340892))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **bitbucket:** clarify app password ([53897f6](https://github.com/git-touch/git-touch/commit/53897f6fb32633659b3a2d4b46b1b688e1af556f)), closes [#125](https://github.com/git-touch/git-touch/issues/125)
|
||||
* add markdown render engine setting ([5795413](https://github.com/git-touch/git-touch/commit/5795413f25d40febfc9bbe3d699c61f7464fac50)), closes [#124](https://github.com/git-touch/git-touch/issues/124)
|
||||
|
||||
|
||||
|
||||
# [1.8.0](https://github.com/git-touch/git-touch/compare/v1.7.0...v1.8.0) (2020-11-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **github:** contribution heatmap ([895f479](https://github.com/git-touch/git-touch/commit/895f4792d648d433b0a75b58a71cac59064307fb)), closes [#122](https://github.com/git-touch/git-touch/issues/122)
|
||||
* avoid hex color parse error ([5f45a54](https://github.com/git-touch/git-touch/commit/5f45a54f95e5386523f33f08a8f7d648e4120ada))
|
||||
* handle navigation in webview ([d940f3b](https://github.com/git-touch/git-touch/commit/d940f3b3e9a7d6e9f25b23064841698244925f8a))
|
||||
* **gitee:** platform type saved ([5534f96](https://github.com/git-touch/git-touch/commit/5534f96f8abbffd5cf0aba057ce00dea801f2345))
|
||||
* hide avatar of commit item if not exist ([d37a5c1](https://github.com/git-touch/git-touch/commit/d37a5c1981bb5a3b117b79128f2bfa1b61db2224))
|
||||
* **github:** head ref name ([1d1804f](https://github.com/git-touch/git-touch/commit/1d1804fa86f2e8eb572c478bd4abbd33cdffc41c)), closes [#116](https://github.com/git-touch/git-touch/issues/116)
|
||||
* **gitlab:** user and group link ([02e8d66](https://github.com/git-touch/git-touch/commit/02e8d66ae2d9271b50ad54f682703f56bb582c26)), closes [#115](https://github.com/git-touch/git-touch/issues/115)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **gitee:** add blob screen ([2bdfb3d](https://github.com/git-touch/git-touch/commit/2bdfb3dfe1295b2a40b8090f5902a7801144b042))
|
||||
* **gitee:** add token login step ([f480dc0](https://github.com/git-touch/git-touch/commit/f480dc048e8a7a6d1ec057009e19b0cf0389ca9c))
|
||||
* **gitee:** add tree screen ([6870aa6](https://github.com/git-touch/git-touch/commit/6870aa6ff1d3d42e9f8f3c482b4bad6c55b70fea))
|
||||
* **gitee:** commits screen ([d9ca01b](https://github.com/git-touch/git-touch/commit/d9ca01b99d515eb7815ba17b610714e6f25f5b58))
|
||||
* **gitee:** empty search screen ([db03560](https://github.com/git-touch/git-touch/commit/db035601de266637dd3641d2007dd24b46184887))
|
||||
* **gitee:** repo screen ([66ab665](https://github.com/git-touch/git-touch/commit/66ab665f31d41ea9c48336668787b7e828efefee))
|
||||
* **gitee:** repos screen ([2e1d869](https://github.com/git-touch/git-touch/commit/2e1d869aa18fd5e2adc890203c3c0519b94ed31a))
|
||||
* **gitee:** user screen ([b5a1948](https://github.com/git-touch/git-touch/commit/b5a19486dd9f7d637cad11dce4516ec5d91b1838))
|
||||
* **gitee:** users screen ([a5d64fd](https://github.com/git-touch/git-touch/commit/a5d64fdb866336f823caad1252af00bb0f7b58ab))
|
||||
* replace io library for web adaptation ([a4f1daa](https://github.com/git-touch/git-touch/commit/a4f1daab31b3b0b7e39ade0f07003f77ba9d5667))
|
||||
|
||||
|
||||
|
||||
# [1.7.0](https://github.com/git-touch/git-touch/compare/v1.6.0...v1.7.0) (2020-10-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* drop svg support to avoid readme screen frozen ([968019b](https://github.com/git-touch/git-touch/commit/968019b932188b1714ba6eae84198462b9ddcfbc)), closes [#112](https://github.com/git-touch/git-touch/issues/112)
|
||||
* use container to fix expansion of tab ([0ab0564](https://github.com/git-touch/git-touch/commit/0ab05646f083aeac177a7ffca8c52d19d783549d))
|
||||
* user item text overflow ([168dcd1](https://github.com/git-touch/git-touch/commit/168dcd1d2ea7605dddd8a6308935ac75d9773bc1))
|
||||
* **github:** cross reference event ([0d722f0](https://github.com/git-touch/git-touch/commit/0d722f062e714de105d228a6ea2683b36d6e616b))
|
||||
* **github:** issue/pr timeline assign event ([85d5cad](https://github.com/git-touch/git-touch/commit/85d5cadbeb8cfcc82ffd9a08053e9814f4c049e3)), closes [#113](https://github.com/git-touch/git-touch/issues/113)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add button to quickly switch accounts ([#36](https://github.com/git-touch/git-touch/issues/36)) ([62b02ed](https://github.com/git-touch/git-touch/commit/62b02ed5040b1b6c7aafdbfd6fcd19ca79fd26d3))
|
||||
* add name to user list item ([70b2dd4](https://github.com/git-touch/git-touch/commit/70b2dd4bb049416be9ddee6793464840b993dfae))
|
||||
|
||||
|
||||
|
||||
# [1.6.0](https://github.com/git-touch/git-touch/compare/v1.5.1...v1.6.0) (2020-10-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **github:** readme loading in repo screen ([ff0104e](https://github.com/git-touch/git-touch/commit/ff0104e9bbb58c30bf4aff1d6f7851382589d0be))
|
||||
* **github:** update trending api ([36de5ec](https://github.com/git-touch/git-touch/commit/36de5ec8a207175ebbe112274d840efe2a2d9142)), closes [#110](https://github.com/git-touch/git-touch/issues/110)
|
||||
* markdown code background color ([9af1900](https://github.com/git-touch/git-touch/commit/9af190000b414f35b96dc8a77f71cb9ad409ff3e)), closes [#108](https://github.com/git-touch/git-touch/issues/108)
|
||||
* **gitea:** keep original query params as is ([aa62524](https://github.com/git-touch/git-touch/commit/aa62524c23d799b572bc54fd0778175b91baa4f9))
|
||||
* **gitea:** pagination has more and cursor ([d47ea5a](https://github.com/git-touch/git-touch/commit/d47ea5a092cbc41eaa0920affae2dc5267f436df))
|
||||
* **github:** empty repo (no ref) ([3002c07](https://github.com/git-touch/git-touch/commit/3002c0736772790d204b845e1540573764271346)), closes [#99](https://github.com/git-touch/git-touch/issues/99)
|
||||
* **github:** timeline item avatar link ([4ae8f52](https://github.com/git-touch/git-touch/commit/4ae8f52991989c05bf56e8b464c4ef9fc20d74ab)), closes [#107](https://github.com/git-touch/git-touch/issues/107)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add status for github and gitlab ([2b68d95](https://github.com/git-touch/git-touch/commit/2b68d95a4af67c62fd8d201b690508f57f972e58))
|
||||
* avoid reloading widget on material bottom tab switch ([11d61e1](https://github.com/git-touch/git-touch/commit/11d61e163fafbf5d222a5dd4489cd5c2c2e999b9)), closes [#42](https://github.com/git-touch/git-touch/issues/42)
|
||||
* **gitea:** add orgs in user screen ([99b2b79](https://github.com/git-touch/git-touch/commit/99b2b795d12c9373b7ca7784d8cb89dfee4537bd))
|
||||
* **gitea:** add repo count in org screen ([f935153](https://github.com/git-touch/git-touch/commit/f9351533c7029ce38290acda2f8509e6870a8701))
|
||||
* **gitea:** add repo count in user screen ([2a1b9fe](https://github.com/git-touch/git-touch/commit/2a1b9fe08dc13b139286d79b0082f68d491371ab))
|
||||
* **gitea:** add status screen ([e3a4b2c](https://github.com/git-touch/git-touch/commit/e3a4b2c0917eb2e0d880ff681d36c7deaa0758ca))
|
||||
|
||||
|
||||
|
||||
## [1.5.1](https://github.com/git-touch/git-touch/compare/v1.5.0...v1.5.1) (2020-10-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **gt:** me screen login ([890c44c](https://github.com/git-touch/git-touch/commit/890c44c4c558649dcbade4a8c7322688a9a0d7ec))
|
||||
|
||||
|
||||
|
||||
# [1.5.0](https://github.com/git-touch/git-touch/compare/v1.4.0...v1.5.0) (2020-10-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* entry item count ([7d3e916](https://github.com/git-touch/git-touch/commit/7d3e916af7abc78bcf9a30abc27c606c36a9ce74))
|
||||
* **gh:** contributions data ([c950559](https://github.com/git-touch/git-touch/commit/c95055904392a9e3b89d4b6ce0bd7b457c1aa6dd))
|
||||
* **gh:** orgs screen description null ([2d96101](https://github.com/git-touch/git-touch/commit/2d9610170b9875a54c047ae5350bab30b49b42eb))
|
||||
* **gh:** text with at notation ([2248415](https://github.com/git-touch/git-touch/commit/2248415574d1499de32be116c1eed5a933f490af))
|
||||
* align contribution graph center for ipad ([#41](https://github.com/git-touch/git-touch/issues/41)) ([b3f56ad](https://github.com/git-touch/git-touch/commit/b3f56adbe988093706be48f1a4207f72eebb559e))
|
||||
* api change user to accountID ([#85](https://github.com/git-touch/git-touch/issues/85)) ([8a1180d](https://github.com/git-touch/git-touch/commit/8a1180dae8b915f8fcd3c3f02e5b74a0e5eeff65)), closes [#79](https://github.com/git-touch/git-touch/issues/79)
|
||||
* back button android, return home on tap ([#59](https://github.com/git-touch/git-touch/issues/59)) ([98f102f](https://github.com/git-touch/git-touch/commit/98f102faec38f318d38a429471a016d99e540a1b))
|
||||
* broken links ([8c4a9ee](https://github.com/git-touch/git-touch/commit/8c4a9ee3a12f90f92d991547989c7b030cde00c6))
|
||||
* commit author color ([57f2ab7](https://github.com/git-touch/git-touch/commit/57f2ab7967efb0b6d491260737884ace264ad4cc))
|
||||
* downgrade provider for compatibility ([74a175f](https://github.com/git-touch/git-touch/commit/74a175f384ef50f3b25732c6ca7636a483cf722b))
|
||||
* lint problems ([1269b66](https://github.com/git-touch/git-touch/commit/1269b66eb41930db286f6c430c0518cd1cd45ba5))
|
||||
* **gh:** subscribe permissions ([8076481](https://github.com/git-touch/git-touch/commit/80764817caae85f0143397645e91e4a62c1c2856)), closes [#47](https://github.com/git-touch/git-touch/issues/47)
|
||||
* **gh:** trending user has no repo ([a3619ba](https://github.com/git-touch/git-touch/commit/a3619ba340cfcd356906eec58ad7929a4d56e4e4))
|
||||
* commit comment event render error ([#93](https://github.com/git-touch/git-touch/issues/93)) ([db62424](https://github.com/git-touch/git-touch/commit/db624247ec0cd7d243ad4f24e3a4179b33754ecd))
|
||||
* error using same token ([#83](https://github.com/git-touch/git-touch/issues/83)) ([e173713](https://github.com/git-touch/git-touch/commit/e17371386143824f2c108942d6fb09102f4616d9)), closes [#82](https://github.com/git-touch/git-touch/issues/82)
|
||||
* event payload ref in create,delete events ([#71](https://github.com/git-touch/git-touch/issues/71)) ([561970a](https://github.com/git-touch/git-touch/commit/561970ab59b2cdb537461bbde010177996db6e2e))
|
||||
* namespace conflicts ([2ef1c0b](https://github.com/git-touch/git-touch/commit/2ef1c0b9829865961f3bcb8d6268a800396ca890))
|
||||
* transparent status bar ([#73](https://github.com/git-touch/git-touch/issues/73)) ([0063e99](https://github.com/git-touch/git-touch/commit/0063e99bbcfef81fbe0e0388289ceb40afeab40d))
|
||||
* yellow underline ([#65](https://github.com/git-touch/git-touch/issues/65)) ([d6a321d](https://github.com/git-touch/git-touch/commit/d6a321d6ca1a1958e878b9b04c4f41bf91e209a9))
|
||||
* **gh:** change branch on close ([ce4f7a1](https://github.com/git-touch/git-touch/commit/ce4f7a180995641c5eee0a0814d7f172ae175dfb))
|
||||
* **gh:** org repos language color ([c2be166](https://github.com/git-touch/git-touch/commit/c2be166a055d2547ebf87bd71008ad6a1acdfe7e))
|
||||
* **gh:** user description overflow ([a5c1d0f](https://github.com/git-touch/git-touch/commit/a5c1d0f5baee6d1c74ffafdb89a5772b340b89a1))
|
||||
* **gl:** handle statistics null ([a198430](https://github.com/git-touch/git-touch/commit/a1984309a9e11b3a1d78bb39bb2de27049634aec))
|
||||
* **gl:** project commits ([60904d7](https://github.com/git-touch/git-touch/commit/60904d763de5e728e70192ffcb72e01409d38edb))
|
||||
* replace transition ([b134bd8](https://github.com/git-touch/git-touch/commit/b134bd87d27333073873584f4dfd4dfd9f8e991a))
|
||||
* **gt:** organizations pagination ([8ee57fd](https://github.com/git-touch/git-touch/commit/8ee57fdc35613ac9c31f5ba710e01cbf28e236d3))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **gh:** add events screen ([5101b25](https://github.com/git-touch/git-touch/commit/5101b2554f0f8a6d5e5a1bfd0a6ff099eef619d4))
|
||||
* **gt:** add contribution heatmap ([d2bb3c4](https://github.com/git-touch/git-touch/commit/d2bb3c4a5ce3e0f1463e59d011a0bb5d295ad446)), closes [#104](https://github.com/git-touch/git-touch/issues/104)
|
||||
* **gt:** followers and following ([3f324b4](https://github.com/git-touch/git-touch/commit/3f324b43fd160de9afae95139e50c7fdd18277be))
|
||||
* **gt:** org members screen ([a87a504](https://github.com/git-touch/git-touch/commit/a87a504cea589d11e96863f7562cff2367e532b5))
|
||||
* **gt:** org repos ([1da8076](https://github.com/git-touch/git-touch/commit/1da807632bbb08c097210a9123958647d3f045df))
|
||||
* **gt:** stargazers, watchers and forks ([61ad3eb](https://github.com/git-touch/git-touch/commit/61ad3ebb164475ab89e5babc4adad14e3a052da7))
|
||||
* **gt:** user repos and stars ([25633b4](https://github.com/git-touch/git-touch/commit/25633b44d98a28233b69298ef043ed849bdeeb01))
|
||||
* add diff view ([aa52263](https://github.com/git-touch/git-touch/commit/aa52263fc04cd2536f8852036a794072b380a49c))
|
||||
* add material app zoom transition ([#98](https://github.com/git-touch/git-touch/issues/98)) ([34e6af2](https://github.com/git-touch/git-touch/commit/34e6af2dab954534999050b99c4f4cf177d6584a)), closes [#94](https://github.com/git-touch/git-touch/issues/94)
|
||||
* bitbucket issues, prs screens ([#91](https://github.com/git-touch/git-touch/issues/91)) ([7a97bc2](https://github.com/git-touch/git-touch/commit/7a97bc22abdef9afaf6d27bfb6fabf5408d0afec))
|
||||
* contributor screen ([#64](https://github.com/git-touch/git-touch/issues/64)) ([be30bcb](https://github.com/git-touch/git-touch/commit/be30bcb7d8ea29ca96c30b5d24e2ce87d8caad2e)), closes [#53](https://github.com/git-touch/git-touch/issues/53)
|
||||
* files screen ([#75](https://github.com/git-touch/git-touch/issues/75)) ([0749a69](https://github.com/git-touch/git-touch/commit/0749a699862bd7030bddf48d6c717b2691bbaa5f)), closes [#74](https://github.com/git-touch/git-touch/issues/74)
|
||||
* gists screen ([#80](https://github.com/git-touch/git-touch/issues/80)) ([094ad4b](https://github.com/git-touch/git-touch/commit/094ad4b1bb25ad21c1bf9d1c2ddce2aade73aa0c)), closes [#66](https://github.com/git-touch/git-touch/issues/66)
|
||||
* github compare screen ([#86](https://github.com/git-touch/git-touch/issues/86)) ([8f5dafd](https://github.com/git-touch/git-touch/commit/8f5dafd2d04c8de7a5ce1b813b73c67fb09913f1))
|
||||
* gitlab search screen ([#81](https://github.com/git-touch/git-touch/issues/81)) ([bc3a204](https://github.com/git-touch/git-touch/commit/bc3a204c2bddbc1aaee35e3540c70595077d6f3c))
|
||||
* handle svg images ([8a490ab](https://github.com/git-touch/git-touch/commit/8a490abb1050797329f455ec0bd1115d0ba88db8))
|
||||
* use cupertino loading again ([8258232](https://github.com/git-touch/git-touch/commit/8258232d48c7981fa03209e4c45f764454d6fb41))
|
||||
* user organizations, fix: create,delete event ([#72](https://github.com/git-touch/git-touch/issues/72)) ([bf5ed23](https://github.com/git-touch/git-touch/commit/bf5ed239716ae9fd29bcae24ecc3741771401f99)), closes [#58](https://github.com/git-touch/git-touch/issues/58)
|
||||
* **gl:** add starrers screen ([f8f436a](https://github.com/git-touch/git-touch/commit/f8f436a38280815e6e3b47a41f45ce645f10f885)), closes [#48](https://github.com/git-touch/git-touch/issues/48)
|
||||
* **gl:** commit screen ([4ea30d0](https://github.com/git-touch/git-touch/commit/4ea30d0132a2d54082aeb70f8ecf78c1354495fe))
|
||||
|
||||
|
||||
|
||||
# [1.4.0](https://github.com/git-touch/git-touch/compare/v1.3.0...v1.4.0) (2020-02-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* hide accounts info in production ([1716714](https://github.com/git-touch/git-touch/commit/171671498165524687b52c0eb93c4ad7fc1502b9))
|
||||
* **gh:** reaction active color ([97a524e](https://github.com/git-touch/git-touch/commit/97a524ecf9a956f173cf0fafd1e0018a24757eab))
|
||||
* code view tab size ([cbb3310](https://github.com/git-touch/git-touch/commit/cbb33108906791950fb74bebab85cbd9182726dc)), closes [#24](https://github.com/git-touch/git-touch/issues/24)
|
||||
* **bb:** commit url ([29902bb](https://github.com/git-touch/git-touch/commit/29902bb711680141423d2272f50ccf1fafd2a538))
|
||||
* avatar size ([12bb22b](https://github.com/git-touch/git-touch/commit/12bb22bda9f27e90415545a6d8d28046d395eca0))
|
||||
* **bb:** download url ([f9fa142](https://github.com/git-touch/git-touch/commit/f9fa142702162c17baee083effa876eb5519ed6e))
|
||||
* **bb:** username get ([376b872](https://github.com/git-touch/git-touch/commit/376b8724a48be12a913a66f3f1561a863024704f))
|
||||
* **bb:** utf8 decode text ([8f9ed54](https://github.com/git-touch/git-touch/commit/8f9ed5469d60806828d7e9daa0d60230cc6216e3))
|
||||
* avatar url null ([76a2f4b](https://github.com/git-touch/git-touch/commit/76a2f4b960eb9adfce597ac864b9d4c645a473b9))
|
||||
* **gitlab:** use default branch instead of master ([79fe174](https://github.com/git-touch/git-touch/commit/79fe174b1052dbeac5f4053bc6f4d44e9f5a2842)), closes [#28](https://github.com/git-touch/git-touch/issues/28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **bb:** commits screen ([f856a1b](https://github.com/git-touch/git-touch/commit/f856a1bfeee99b15a7d1e106d0583b39916ff92f))
|
||||
* **bb:** explore screen ([6d35703](https://github.com/git-touch/git-touch/commit/6d3570355432ac535034ee9607d448cc5d40a8b8))
|
||||
* **bb:** object screen ([a9f9b95](https://github.com/git-touch/git-touch/commit/a9f9b957936978e702e8ded8f5ad85197c5f577b))
|
||||
* **bb:** repo screen ([7f2649c](https://github.com/git-touch/git-touch/commit/7f2649c691c662d11fbdbd16831f0d1c36890f34))
|
||||
* **bb:** team screen ([dfb74ce](https://github.com/git-touch/git-touch/commit/dfb74ce43dc09266383c9fe5eddf975ad848f5e8))
|
||||
* **bb:** teams screen ([3542c36](https://github.com/git-touch/git-touch/commit/3542c36dcce758e98dbc8bc8b667a2e8a0734e64))
|
||||
* **bb:** user screen ([830bcea](https://github.com/git-touch/git-touch/commit/830bceaa367a0f64d89204d7e183b8fb54fc8553))
|
||||
* **bitbucket:** app password login ([53ecb32](https://github.com/git-touch/git-touch/commit/53ecb3242ff3879cd3c5697194ede8a506a76abe))
|
||||
* **gh:** add watch state and action ([940ea5c](https://github.com/git-touch/git-touch/commit/940ea5c1bfc62da1b1b81711d6561c68ea466099))
|
||||
* **gh:** org repos screen ([a105eb6](https://github.com/git-touch/git-touch/commit/a105eb6e5736ccd5962cabd0e35da87b6d9d4991)), closes [#25](https://github.com/git-touch/git-touch/issues/25)
|
||||
|
||||
|
||||
|
||||
# [1.3.0](https://github.com/git-touch/git-touch/compare/v1.2.0...v1.3.0) (2020-02-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* cupertino picker text color ([7c7dc32](https://github.com/git-touch/git-touch/commit/7c7dc32db6345a1d1260a24b3772479a13707d26)), closes [#22](https://github.com/git-touch/git-touch/issues/22)
|
||||
* material dark mode text ([a4284d0](https://github.com/git-touch/git-touch/commit/a4284d00fb3977b87a77f1cea8d3fefa4b8e87ce))
|
||||
* reload app on account switch ([084aec4](https://github.com/git-touch/git-touch/commit/084aec4453a9951f6478bfa7a9dca9d56d1140bf))
|
||||
* repo header avatar link ([3cde09b](https://github.com/git-touch/git-touch/commit/3cde09bf237fdb25fa0f9cd06ea411583b816bc9))
|
||||
* **github:** binary files ([89c311c](https://github.com/git-touch/git-touch/commit/89c311c410dab58cbd5442bb4b08e446f6871045)), closes [#21](https://github.com/git-touch/git-touch/issues/21)
|
||||
* **github:** encode url ([16925f8](https://github.com/git-touch/git-touch/commit/16925f8e1a548ad1017e9b75619716f9dcb3fdbc))
|
||||
* **github:** pull screen router ([c3cf25b](https://github.com/git-touch/git-touch/commit/c3cf25bcf35db750104c0de771dfd42f1d5a8994))
|
||||
* **github:** throw on error ([fe8bf0a](https://github.com/git-touch/git-touch/commit/fe8bf0a800c0f7b62bc88b53f1313f923b3f139a))
|
||||
* query params already decoded in fluro ([a425902](https://github.com/git-touch/git-touch/commit/a425902756a075468610df29f38a49524ae01374)), closes [#23](https://github.com/git-touch/git-touch/issues/23)
|
||||
* **gitlab:** api pagination ([9aec397](https://github.com/git-touch/git-touch/commit/9aec397a602b895724eddad244f88f1b64f8d6b5))
|
||||
* **gitlab:** binary blob view ([d17b6a0](https://github.com/git-touch/git-touch/commit/d17b6a02a16c92ca3a78da9b955bc2160be533ac))
|
||||
* **gitlab:** error catch ([f3e5988](https://github.com/git-touch/git-touch/commit/f3e5988413771bf7dad310f340a9b88b981dbc33))
|
||||
* **gitlab:** issue and user ([92a33e8](https://github.com/git-touch/git-touch/commit/92a33e8fb81455c9f3086402dd58768fe1351fab))
|
||||
* **gitlab:** issue router ([e2e0f6b](https://github.com/git-touch/git-touch/commit/e2e0f6ba2527cd0348844774b5cd223d12954122))
|
||||
* avatar link ([9121316](https://github.com/git-touch/git-touch/commit/9121316acd3ba9b43acafe87b851b46842e0e512))
|
||||
* limit commit message to one line ([5f502ae](https://github.com/git-touch/git-touch/commit/5f502ae29e606128c49a0d12997a31a07dfeb475))
|
||||
* refresh scaffold catch error ([f5ad1ac](https://github.com/git-touch/git-touch/commit/f5ad1acd25d8f9bc74f50dc1827abf4deae723f7))
|
||||
* repo item link ([bc436d2](https://github.com/git-touch/git-touch/commit/bc436d2f9e41978f194d55c322c54cf2f9a3e807))
|
||||
* **gitlab:** mr data ([1d90a39](https://github.com/git-touch/git-touch/commit/1d90a3959ce989877e597f97d8db4ada794287a7))
|
||||
* **gitlab:** project router ([c1df100](https://github.com/git-touch/git-touch/commit/c1df10025378c07d60d1e44c8cbcb0d9e36abd2c))
|
||||
* **gitlab:** syntax highlight in dark mode ([df09ee4](https://github.com/git-touch/git-touch/commit/df09ee4c177f36022330acb9845b02796c3db9b6))
|
||||
* **gitlab:** tree and blob router ([00d6778](https://github.com/git-touch/git-touch/commit/00d67784af5186deb9998b2f64e3a19fabd25787))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **gitea:** org screen ([f0e447f](https://github.com/git-touch/git-touch/commit/f0e447fd842f34e1cc316a5a089c14a16681a290))
|
||||
* **gitea:** orgs screen ([336ff49](https://github.com/git-touch/git-touch/commit/336ff4960e7bf6a5b2796ecd7fa2592459db7755))
|
||||
* remove account ([5aa7483](https://github.com/git-touch/git-touch/commit/5aa7483c906e67777d233554f17cd5e6e4544d97))
|
||||
* **gitea:** blob screen ([9d6985c](https://github.com/git-touch/git-touch/commit/9d6985c3913237d826c6d5fb9ac41abbabbbc13c))
|
||||
* **gitea:** commits screen ([7d1065e](https://github.com/git-touch/git-touch/commit/7d1065eaaeead8fb12bf4a025514a784d0f03e5c))
|
||||
* **gitea:** issue and pr screen ([a7af4cd](https://github.com/git-touch/git-touch/commit/a7af4cdcd01aa1a3642e87cf84a6b7e5675c3e64))
|
||||
* **gitea:** main screen ([76c6948](https://github.com/git-touch/git-touch/commit/76c6948b05dd7d361b59cc031da8bc3692b140cd))
|
||||
* **gitea:** repo screen ([1aa7f0d](https://github.com/git-touch/git-touch/commit/1aa7f0d130ae0edee5ab3ce694ed776cf2c9c426))
|
||||
* **gitea:** user screen ([7039a89](https://github.com/git-touch/git-touch/commit/7039a8905f1cde2eff5348b4c85c58863db5ae88))
|
||||
* **gitlab:** commits screen ([5d453cc](https://github.com/git-touch/git-touch/commit/5d453ccbd5607c83da84ea8b78b7074ae54bdcef))
|
||||
* **gitlab:** explore screen ([62c4c38](https://github.com/git-touch/git-touch/commit/62c4c380f882c62b125512561661657b2d865105))
|
||||
* **gitlab:** group screen ([d7d05bc](https://github.com/git-touch/git-touch/commit/d7d05bc72ba374ecb0737341738969ac0f7a1bcd))
|
||||
* **gitlab:** groups screen ([1c35b0b](https://github.com/git-touch/git-touch/commit/1c35b0b4cd29aa779599f0437915136d0064866c))
|
||||
* **gitlab:** issues screen ([2c9951b](https://github.com/git-touch/git-touch/commit/2c9951be7bbf7d8c4653fa8d555bdbcd0b646908))
|
||||
* **gitlab:** members screen ([d1d2e9e](https://github.com/git-touch/git-touch/commit/d1d2e9e0fbe60d6ba5894cc26fac141a3ec11562))
|
||||
* **gitlab:** project and group members ([b56111d](https://github.com/git-touch/git-touch/commit/b56111db6ffa3983562379d169b16c42920535b8))
|
||||
* object tree item size ([39c360f](https://github.com/git-touch/git-touch/commit/39c360f28118991a68ea629e41377fc6c19046de))
|
||||
* **gitlab:** mrs screen ([4bf049a](https://github.com/git-touch/git-touch/commit/4bf049a2e4a71695932cb304acd5d3d22e612821))
|
||||
* **gitlab:** project badges ([a021f75](https://github.com/git-touch/git-touch/commit/a021f755f343f4bae823a254c98f19bfa8c0435a))
|
||||
* **gitlab:** repo size and commits ([248212c](https://github.com/git-touch/git-touch/commit/248212c95c702432b392a971173a020649a8a761))
|
||||
* **gitlab:** settings entry ([65e45f6](https://github.com/git-touch/git-touch/commit/65e45f6b7f4fb097999764e2d7f352a8eae95316))
|
||||
|
||||
|
||||
|
||||
# [1.2.0](https://github.com/git-touch/git-touch/compare/v1.1.0...v1.2.0) (2020-01-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* account switch ([7bc11e0](https://github.com/git-touch/git-touch/commit/7bc11e0c84dedc814ef5148ac079e54b4bf3803d))
|
||||
* add typename for correctly resolving ([991d563](https://github.com/git-touch/git-touch/commit/991d563b2995165fc2324485576c1f14f32b826f))
|
||||
* after cursor ([172faf5](https://github.com/git-touch/git-touch/commit/172faf53f495584ba6c5d9b9857de2186d24862f))
|
||||
* analysis problems ([7c665e7](https://github.com/git-touch/git-touch/commit/7c665e7f1ab903c16b913011a8926368608c05de))
|
||||
* avatar click ([cd38d96](https://github.com/git-touch/git-touch/commit/cd38d96a91d2a2c835adff1d253f90437bbc54fd))
|
||||
* branch switch ([867f617](https://github.com/git-touch/git-touch/commit/867f617276ccdc0529544b155b892120b4bcb3b7))
|
||||
* check if issue or pull request ([980bbf9](https://github.com/git-touch/git-touch/commit/980bbf9f30f50c76e8687886e2c582d495960928))
|
||||
* code theme settings ([a9265c3](https://github.com/git-touch/git-touch/commit/a9265c3367ec6335834d57a636f0ed14c291557e))
|
||||
* commit history count ([50cfd48](https://github.com/git-touch/git-touch/commit/50cfd48e5107223c67e7b3af9194fd8f4ae2100b))
|
||||
* commit status ([bd9703e](https://github.com/git-touch/git-touch/commit/bd9703e44344746cb80e35ffe2bd68cbc80618b0))
|
||||
* contribution background ([19faf20](https://github.com/git-touch/git-touch/commit/19faf20fb126d5a464cd83449943608962ebf37f))
|
||||
* cupertino button padding ([b1181ff](https://github.com/git-touch/git-touch/commit/b1181ffc6ffe842be86c4b0e12942e72ae4a1e26))
|
||||
* dark mode for notification screen ([743d359](https://github.com/git-touch/git-touch/commit/743d359665a6949d703332fb9dd51cde17ba7e11))
|
||||
* do not wait tap callback ([4b0dae9](https://github.com/git-touch/git-touch/commit/4b0dae95911fe681f9339adc08c72ceb09b22a12))
|
||||
* empty query error ([1ef1a51](https://github.com/git-touch/git-touch/commit/1ef1a5182e4e13369b8f64b66fa031ec2a2722b4))
|
||||
* follow system brightness ([fccb79b](https://github.com/git-touch/git-touch/commit/fccb79b2cc1ab58328fcd475a0772eddb5fce2be))
|
||||
* forks url ([4f65321](https://github.com/git-touch/git-touch/commit/4f65321ef550b66924584105d7b0ed8b3850dd3f))
|
||||
* generic type ([103f05b](https://github.com/git-touch/git-touch/commit/103f05b01ce3eb0ac81af8fa2f8eb0760a976233))
|
||||
* import path ([b91db22](https://github.com/git-touch/git-touch/commit/b91db22eb4c4692778f37e25d832487842283e92))
|
||||
* issue add router ([857e49f](https://github.com/git-touch/git-touch/commit/857e49f220ad400efaadfbd9f7507afe17743598))
|
||||
* link url null ([d2ae236](https://github.com/git-touch/git-touch/commit/d2ae2363568b2440d3077c6b76f4eaec07c0a585))
|
||||
* login screen theme ([0b334f3](https://github.com/git-touch/git-touch/commit/0b334f341ef5935cfe0e2261bfa69fec97820fdd))
|
||||
* markdown dark mode ([3be1a92](https://github.com/git-touch/git-touch/commit/3be1a92ea2cb959d89e755dcb80a92f43e91bcae))
|
||||
* markdown style ([9cac22e](https://github.com/git-touch/git-touch/commit/9cac22e61639e81c6dc7ea31a0821dbfb826e879))
|
||||
* material dark mode ([80ab94d](https://github.com/git-touch/git-touch/commit/80ab94df53d2b6cb1675a9114841983a815ec186))
|
||||
* material style ([91d7a93](https://github.com/git-touch/git-touch/commit/91d7a93575a78d2796bea41f555739c377b47603))
|
||||
* minor fixes ([da48561](https://github.com/git-touch/git-touch/commit/da48561b62516344ad96b2cf97b9038d1c3f8d57))
|
||||
* organization extract ([0c315c3](https://github.com/git-touch/git-touch/commit/0c315c354c355ddcb0ab9ed178d41bbd9f37aaa5))
|
||||
* organization members query ([3586ee5](https://github.com/git-touch/git-touch/commit/3586ee5230bab0ee36635d5a00055e2f818341e3))
|
||||
* path url encode ([7b688ef](https://github.com/git-touch/git-touch/commit/7b688efcb2e77ed118c6932b39b0c512967dcd92))
|
||||
* physical pixel border ([42f67c3](https://github.com/git-touch/git-touch/commit/42f67c3ed198e2d6338bcc9be448b148af4deb40))
|
||||
* pin json_serializable version to fix build error ([21093a6](https://github.com/git-touch/git-touch/commit/21093a6ab978db4344ac3988367d4bbe02534d0c))
|
||||
* pinnable item ([e989ad9](https://github.com/git-touch/git-touch/commit/e989ad9715e7fcb29b867263c261632166f18a79))
|
||||
* pull request comment ([76cfa7a](https://github.com/git-touch/git-touch/commit/76cfa7a7726749c4bbf6985119af0abfb3a88e76))
|
||||
* refresh only if branch changes ([9c0b0f6](https://github.com/git-touch/git-touch/commit/9c0b0f64c455101d5ce826a69e122a8429554990))
|
||||
* remove duplicated users ([4bc2319](https://github.com/git-touch/git-touch/commit/4bc2319ec66a1823858fd7be86875b8b8bea5ea2))
|
||||
* remove operation name ([6b095e8](https://github.com/git-touch/git-touch/commit/6b095e8a3bc34589a7eb7c2769bc1490fd41a9c4))
|
||||
* reset gql client on change ([7b78e66](https://github.com/git-touch/git-touch/commit/7b78e660cb17fc2cd6158675448b6bb7cff89b6d))
|
||||
* review event actor ([eadac28](https://github.com/git-touch/git-touch/commit/eadac28db7da997e9d609bccdd499d2092d54472))
|
||||
* sort files ([1055517](https://github.com/git-touch/git-touch/commit/1055517650ff84c2df14c630e01681c77deaeaa4))
|
||||
* table view icon style ([ffa3ef7](https://github.com/git-touch/git-touch/commit/ffa3ef79d9a2587108ca71dd5d92bfbcf84ea51b))
|
||||
* text overflow ([765bc23](https://github.com/git-touch/git-touch/commit/765bc23b5b6dcdee606b2e46d97a5c3542cc6062))
|
||||
* text overflow ([d40b877](https://github.com/git-touch/git-touch/commit/d40b87750432502421633f5c775f0aa58f190842))
|
||||
* theme select ([20ca296](https://github.com/git-touch/git-touch/commit/20ca29657bea09b9a240c1e1f8833e54ef5d5164))
|
||||
* totalcount ([0b743ff](https://github.com/git-touch/git-touch/commit/0b743ffddb1c5141cd3cad499b69ff86142ec0d4))
|
||||
* trending data compatibale ([a9787d3](https://github.com/git-touch/git-touch/commit/a9787d38a3645b28a9b92e983e302714d4dc1377))
|
||||
* trending user data ([396fe55](https://github.com/git-touch/git-touch/commit/396fe550c40375f9eb3d10f1ff58a11946670662))
|
||||
* user name color ([46ecf2f](https://github.com/git-touch/git-touch/commit/46ecf2ff4aa997db56432bdbb87d235b77f94e5b))
|
||||
* user screen tab null ([b32a0e7](https://github.com/git-touch/git-touch/commit/b32a0e77392dc95d1153fda5391d637398b6b11c))
|
||||
* x build ([91d94a5](https://github.com/git-touch/git-touch/commit/91d94a5180a575fcb4c96e284ba0fb66b72bbd53))
|
||||
* **gitlab:** encode path ([a8faf76](https://github.com/git-touch/git-touch/commit/a8faf7622768ce9d4e41d557a4a4a07e809fe75c))
|
||||
* **gitlab:** full path ([c694b99](https://github.com/git-touch/git-touch/commit/c694b99bc7628308643dddefb804deb42ae9afc3))
|
||||
* user screen login ([f2799ca](https://github.com/git-touch/git-touch/commit/f2799cacc4df9aef5b564cb5f92ee25b32cc77d1))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* about screen ([6441f24](https://github.com/git-touch/git-touch/commit/6441f24c1cee14cec373a54851d7c0e070c37dd7))
|
||||
* add artemis ([716924d](https://github.com/git-touch/git-touch/commit/716924d27d9ff263074b1dc8eb9ad9e7b5a7406b))
|
||||
* add gitlab todos and issue ([810e1eb](https://github.com/git-touch/git-touch/commit/810e1eb4def80bc5e6c10ff0de23691373966319))
|
||||
* add graphql types for user screen ([b11d6be](https://github.com/git-touch/git-touch/commit/b11d6be74b56266f333493c6eca07e7979717f7b))
|
||||
* add web assets ([bfc41cd](https://github.com/git-touch/git-touch/commit/bfc41cd79bec9f9bffecc358301c7b0072d6736a))
|
||||
* brightness toggle button ([a7a05ba](https://github.com/git-touch/git-touch/commit/a7a05bab884db8c91ac1af08ff5e22e4f58f29c4))
|
||||
* cupertino dark mode ([1b7578f](https://github.com/git-touch/git-touch/commit/1b7578f4b48918f22a51e4b1ef9c387b95b6115c))
|
||||
* dark contributions widget ([d4efab4](https://github.com/git-touch/git-touch/commit/d4efab4af2e0a3bd22890ce55e18a18a643ab5c5))
|
||||
* dart theme style tweak ([6a872fc](https://github.com/git-touch/git-touch/commit/6a872fc977d46c4149b4598eb36ae63e98f15709))
|
||||
* event item long press ([9cd38bc](https://github.com/git-touch/git-touch/commit/9cd38bc6403c1ba2316b3a6fbe174924a922c042))
|
||||
* follow button ([6a94d55](https://github.com/git-touch/git-touch/commit/6a94d552e1bf486dd31677d9053d64def7554d67))
|
||||
* follow system option ([baf3e43](https://github.com/git-touch/git-touch/commit/baf3e4304552ead1be262e4c47af125d9646e49b))
|
||||
* force pushed event ([9f1eb49](https://github.com/git-touch/git-touch/commit/9f1eb490890c8a24727bcd2559dc78759d3a6b40))
|
||||
* gitea api ([405cc03](https://github.com/git-touch/git-touch/commit/405cc03a30bb5494799fea694d2c3ea7e995596c))
|
||||
* gitlab domain ([05ff1e4](https://github.com/git-touch/git-touch/commit/05ff1e413b7bebdfd9bb27db6ac90b6e718b9a26))
|
||||
* gitlab login by token ([2b6d45c](https://github.com/git-touch/git-touch/commit/2b6d45c457b24570dfa554fc16b9509b64e49f2b))
|
||||
* gitlab screen routers ([6bff2b4](https://github.com/git-touch/git-touch/commit/6bff2b44b6050a043dc684e909981d7f1ee8d3bf))
|
||||
* gitlab user screen ([c6c5465](https://github.com/git-touch/git-touch/commit/c6c5465ad35e77767ab5ca45d9d7099f18446866))
|
||||
* handle create event ([bb0d9d5](https://github.com/git-touch/git-touch/commit/bb0d9d5d01e0e586d7180297b555c9f4319c5ef9))
|
||||
* handle release event ([5f340e4](https://github.com/git-touch/git-touch/commit/5f340e45028c7a83ea48bc87771cfd47375d02b8))
|
||||
* languages chart ([23983fb](https://github.com/git-touch/git-touch/commit/23983fb556083c1a1aa6c8d05ebdb01c3238260c))
|
||||
* markdown view dark mode ([eac8418](https://github.com/git-touch/git-touch/commit/eac84184af62ccec910feb4dd7263ba68eae19e3))
|
||||
* open and close issue ([1b7bcdb](https://github.com/git-touch/git-touch/commit/1b7bcdb7bbc503af8fd0750a1eb8234bcf4101b0))
|
||||
* repo watch ([42c733f](https://github.com/git-touch/git-touch/commit/42c733fe4c7ae2fa6e98f89d8be6095a0e57e2ac))
|
||||
* review permissiosn ([f757c74](https://github.com/git-touch/git-touch/commit/f757c748ea691c8c1d2f65c2c3402a33a36c18c8))
|
||||
* save brightness settings ([dd093bc](https://github.com/git-touch/git-touch/commit/dd093bc7f7ee4e4f965d0d2f0628f3d7e2bd7ea0))
|
||||
* **gitlab:** blob screen ([d91ae0a](https://github.com/git-touch/git-touch/commit/d91ae0a21325330c5dd3de15aeb6ee72a1adaa85))
|
||||
* **gitlab:** project activity screen ([cb82b48](https://github.com/git-touch/git-touch/commit/cb82b48ed0d29e78a7adf59bccf0352b85e49da9))
|
||||
* **gitlab:** project icons ([956b57e](https://github.com/git-touch/git-touch/commit/956b57e869f1b80f88b753ad41d1f93a65edb0dc))
|
||||
* **gitlab:** project screen ([2636e90](https://github.com/git-touch/git-touch/commit/2636e902f29564a92ce5edc41141bfb3791fbad2))
|
||||
* **gitlab:** repository tree screen ([edd3a8d](https://github.com/git-touch/git-touch/commit/edd3a8d02efc70dcacb8a92d327ba959fa172f51))
|
||||
* handle svg files ([1b00a0a](https://github.com/git-touch/git-touch/commit/1b00a0ae693d1303215d7b1af2a349dfc1d757bf))
|
||||
* long press repo item ([e35d5df](https://github.com/git-touch/git-touch/commit/e35d5dfb3aad238fba020a7643f6b3ab7a785e24))
|
||||
* markdown view base path ([003263d](https://github.com/git-touch/git-touch/commit/003263d955b9cf5b8f1ba0110a7a0749467a2d0a))
|
||||
* open image view on avatar tap ([ed07ff0](https://github.com/git-touch/git-touch/commit/ed07ff086f9e24477587140c7beeeea7d9ca7167))
|
||||
* review comment ([c84a503](https://github.com/git-touch/git-touch/commit/c84a503299964e6e2b936a16eae8458771f94d4d))
|
||||
* use image view in object screen ([3e3e3d1](https://github.com/git-touch/git-touch/commit/3e3e3d1251cfce0c8680ef82c5b3c833805ca8f8))
|
||||
* use sliding control for cupertino ([5a35cbf](https://github.com/git-touch/git-touch/commit/5a35cbfe39112aae907992b196b2bb94498b1b0c))
|
||||
|
||||
|
||||
|
||||
# [1.1.0](https://github.com/git-touch/git-touch/compare/v1.0.0...v1.1.0) (2019-10-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add gaps between languages ([7056d51](https://github.com/git-touch/git-touch/commit/7056d512374c863a9e40afcc4aea2ea6d889ebfb))
|
||||
* add missing files, remove legacy imports ([c4399a9](https://github.com/git-touch/git-touch/commit/c4399a9a72002385a8e917c24d8ef2e9454c4d85))
|
||||
* add missing links ([814b255](https://github.com/git-touch/git-touch/commit/814b255f3a250f1d6a32c9ba68d4f4c6b9cd008e))
|
||||
* add white background ([cce67cc](https://github.com/git-touch/git-touch/commit/cce67cccda1a1d02a4729ab7f3767fa37e44380b))
|
||||
* always show trailing widgets ([0fe8fc5](https://github.com/git-touch/git-touch/commit/0fe8fc59822637796595a2cbb8f3897ae7419b7c))
|
||||
* branch selection ([ac4fe0b](https://github.com/git-touch/git-touch/commit/ac4fe0b2ed39a7a56d773001d7e1f5b31ac0f1a2))
|
||||
* commit without related user ([b2b6ef4](https://github.com/git-touch/git-touch/commit/b2b6ef47958c58de5f70f2da569d9bdf65e4163a))
|
||||
* contributions initial position ([7606f6e](https://github.com/git-touch/git-touch/commit/7606f6ec1256a5ff5d1e6095cb7cfb94dde5bb27))
|
||||
* correct disk usage ([c3af4e7](https://github.com/git-touch/git-touch/commit/c3af4e7d91f1cd14ae725ffd17eb698f67a7276f))
|
||||
* current branch name ([89786c3](https://github.com/git-touch/git-touch/commit/89786c307ec3c4e543a8e0ce6f77b8a4faefed3b))
|
||||
* deleted user ([356a7f5](https://github.com/git-touch/git-touch/commit/356a7f5e18a108d5022e6f970437c36476ebe7c7))
|
||||
* disable animation on replacement ([ae7b124](https://github.com/git-touch/git-touch/commit/ae7b1247b417a2b1cbcee39023fa407f2797a236))
|
||||
* disable branch selection if less than 2 ([04f483a](https://github.com/git-touch/git-touch/commit/04f483aafea4bba25976888031a2290470d4342d))
|
||||
* disable sub module click ([8e088ef](https://github.com/git-touch/git-touch/commit/8e088ef701fad325398b6dfdf3815485a616b099))
|
||||
* disable tab switch if loading ([a1fe2df](https://github.com/git-touch/git-touch/commit/a1fe2df552bf4bec8ae881b87267d38cbce5bb34))
|
||||
* dispose ([966fa82](https://github.com/git-touch/git-touch/commit/966fa824ed99c06516f5a50708b2fed7a7246c26))
|
||||
* domain comparison ([b958ddf](https://github.com/git-touch/git-touch/commit/b958ddf0cfde2d23ba586870df56f1e3b85ece79))
|
||||
* duplicated class name ([af25486](https://github.com/git-touch/git-touch/commit/af25486a9c140dd38176ed357f7298e16b2c2b2b))
|
||||
* fetch 2x items if filter applied ([f580d4b](https://github.com/git-touch/git-touch/commit/f580d4b96c0e89e0655f0cd3021353c9401ce041))
|
||||
* folders first ([814ac92](https://github.com/git-touch/git-touch/commit/814ac926a13ff32fe4d25f7839ab2acf7d2ba175))
|
||||
* handle commit user null ([cc8ea1d](https://github.com/git-touch/git-touch/commit/cc8ea1d39a8298801b20267629d0f4d2f2cb2e34))
|
||||
* handle default branch ref null case ([cbfa622](https://github.com/git-touch/git-touch/commit/cbfa6221e47a0649c13c437958ba34d9c662ad13))
|
||||
* handle emoji characters ([c06179e](https://github.com/git-touch/git-touch/commit/c06179e1096cfb1b992c8d5e595096a637aebfb4))
|
||||
* handle language color null ([b083c4f](https://github.com/git-touch/git-touch/commit/b083c4fadd1a886e6d116416baaf9ccbf2ad750e))
|
||||
* handle README content null ([6539eb6](https://github.com/git-touch/git-touch/commit/6539eb6ef409961f375e21bab7cfd3354e417604))
|
||||
* hide GitLab account login entry ([003a8e9](https://github.com/git-touch/git-touch/commit/003a8e9fbe5ecdd164bcd43a4ef5800c6cf7ee0c))
|
||||
* hide language bar if no data ([7562f39](https://github.com/git-touch/git-touch/commit/7562f391cc4329ccfefbf1d33fce6d5064f275f1))
|
||||
* horizontal scroll ([9b1921a](https://github.com/git-touch/git-touch/commit/9b1921adda3a56ca157fc938066b1bf897930d04))
|
||||
* issues load more ([94cd4ec](https://github.com/git-touch/git-touch/commit/94cd4ec9459b64d7c958bdf33bfee473704f0f07))
|
||||
* items not fill in list view ([04edb92](https://github.com/git-touch/git-touch/commit/04edb9247af066edee6c08ae6646acc50373cf7c))
|
||||
* label color ([eb9de95](https://github.com/git-touch/git-touch/commit/eb9de95efc493285d68b91ac357a3c44c070ff46))
|
||||
* language color at trending screen ([411a4b9](https://github.com/git-touch/git-touch/commit/411a4b981ef5a138750977dcd196fd76114b95d9))
|
||||
* limit to ascii ([ee61509](https://github.com/git-touch/git-touch/commit/ee615097e7665fb3b72d226e24a89a8f48bc99c3))
|
||||
* link tap highlight ([27f4bbc](https://github.com/git-touch/git-touch/commit/27f4bbc690b5cdcf1d4e96589521b7eb2fb83717))
|
||||
* list scaffold refresh feature ([0c54611](https://github.com/git-touch/git-touch/commit/0c54611345ddfb01819f82fc68736441bbf0b3f8))
|
||||
* mark all as read ([0d16490](https://github.com/git-touch/git-touch/commit/0d164904f1357c484529e75a2c4d8d64fb726107))
|
||||
* material actions style ([eadef89](https://github.com/git-touch/git-touch/commit/eadef899d5989251b1fd9619b0408a3025b545bd))
|
||||
* multi line body ([bac4ab4](https://github.com/git-touch/git-touch/commit/bac4ab4c62f43e823a50564b8017c46d864259b9))
|
||||
* notification item state query ([49902f2](https://github.com/git-touch/git-touch/commit/49902f2999099cf88170283e13f24f2d4eae5e21))
|
||||
* object screen ([87bb4d5](https://github.com/git-touch/git-touch/commit/87bb4d5513563aa78b2735a6836853b2f7cefd64))
|
||||
* physical pixel border ([9487cc1](https://github.com/git-touch/git-touch/commit/9487cc1bc60e7c5025ae459e48f36c85aa0fdcfc))
|
||||
* refresh scaffold when trailing builder null ([e6d6835](https://github.com/git-touch/git-touch/commit/e6d68356615317e399db519233b266867bb249e7))
|
||||
* release notification item tap ([a4d00e5](https://github.com/git-touch/git-touch/commit/a4d00e5a81ff5fe412015d8d0d44efda756d5d54))
|
||||
* remove background color for ink effect ([ddcd39c](https://github.com/git-touch/git-touch/commit/ddcd39c438a871e05afae3c2f7c26be3bf5059a5))
|
||||
* remove previous account if duplicated ([f2e3120](https://github.com/git-touch/git-touch/commit/f2e312079b20011b8f0c1c76c86f49d274745995))
|
||||
* replace deprecated pinned api ([4db467d](https://github.com/git-touch/git-touch/commit/4db467d212a34c41b1281fc6be75b9ba9b054b26))
|
||||
* repo item link ([b610af4](https://github.com/git-touch/git-touch/commit/b610af44a128b5be318a4591b837555087f2b63c))
|
||||
* repo name containing dot at notification screen ([e5e3831](https://github.com/git-touch/git-touch/commit/e5e38315bea0d6fa04c7e1b7ab4b60b4688cac92))
|
||||
* show repo owner at user stars screen ([0b57a59](https://github.com/git-touch/git-touch/commit/0b57a59392df9a341a67edb811f9dd57b5b2a724))
|
||||
* star and fork count 0 case ([ec1d995](https://github.com/git-touch/git-touch/commit/ec1d9956607cf66b06fc2ff508e0d570ee9b8c03))
|
||||
* started -> starred ([2914d0c](https://github.com/git-touch/git-touch/commit/2914d0c629e2deffc7f4b3dad126316dd20e04af))
|
||||
* table view style ([9bc5c2b](https://github.com/git-touch/git-touch/commit/9bc5c2b96a69c6ddec32119c04bf3dfc01f3fc31))
|
||||
* trending api ([cac2c66](https://github.com/git-touch/git-touch/commit/cac2c664ccf923bb00ddbf2925025ffa0635e0d5))
|
||||
* update data after action ([206e533](https://github.com/git-touch/git-touch/commit/206e53346318f1f42afd623949b290b242f8580b))
|
||||
* use common push route method for span link ([200b250](https://github.com/git-touch/git-touch/commit/200b2509268aa6ed1844aacda65a4750d3d574ae))
|
||||
* use default branch ([a2cb2fb](https://github.com/git-touch/git-touch/commit/a2cb2fb9e979d7ef751ffd0bb081e61e43fbecb5))
|
||||
* use readme api ([b07b25f](https://github.com/git-touch/git-touch/commit/b07b25fca0a56057a0f108366ef254fdcb7df69b))
|
||||
* use spdx id of license ([1a9f708](https://github.com/git-touch/git-touch/commit/1a9f7083ee2a6ba49be22de842a3b1b45d35d684))
|
||||
* user type ([755aba7](https://github.com/git-touch/git-touch/commit/755aba7727939a74a66516469b48cd6c71881617))
|
||||
* users screen title ([bd4ed63](https://github.com/git-touch/git-touch/commit/bd4ed6382cca9b8d4e35033f6de75f824344f2e2))
|
||||
* users star or watch repo ([df485ed](https://github.com/git-touch/git-touch/commit/df485edcd4ca19624fcf070ffa7cc8d6ab09b54a))
|
||||
* widget list contains null ([cb8a879](https://github.com/git-touch/git-touch/commit/cb8a8799ab979e0cdb062684ed28986e9df55b00))
|
||||
* widget span for branch name ([ca11d0f](https://github.com/git-touch/git-touch/commit/ca11d0f0d5d5c38876b510136ce23370413a4229))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* adapter picker for material theme ([fb4c12d](https://github.com/git-touch/git-touch/commit/fb4c12d1a5a29dc51f49496f543fd6676c327839))
|
||||
* add and remove reactions ([3bc1e7e](https://github.com/git-touch/git-touch/commit/3bc1e7edcd97988b347a1a406d67a662acd42846))
|
||||
* add avatar placeholder ([c300113](https://github.com/git-touch/git-touch/commit/c300113b8a0f7fbddf494d3b537ffcd3f53b8acf))
|
||||
* add commit build status ([a48a35e](https://github.com/git-touch/git-touch/commit/a48a35ec4fce035a9e722c864249eb6784591b6a))
|
||||
* add contributions graph to user screen ([c6d9b06](https://github.com/git-touch/git-touch/commit/c6d9b067b1bf6c969b546f78831a35e914523761))
|
||||
* add credits of fonts ([0d5fef8](https://github.com/git-touch/git-touch/commit/0d5fef8dd770425795a2dd4c43139d6319349945))
|
||||
* add credits screen ([00cbac4](https://github.com/git-touch/git-touch/commit/00cbac48585a33e9ea4c68ca41199a331a9ac299))
|
||||
* add feedback entry ([c54df10](https://github.com/git-touch/git-touch/commit/c54df1023405af023f83c07c4c1f69eb97ee9d1c))
|
||||
* add go to review entry ([f4dd41e](https://github.com/git-touch/git-touch/commit/f4dd41e3ff9e8ed54d5eb3632bd3de001e9b7718))
|
||||
* add issue, pull request and commit entry ([08e7c99](https://github.com/git-touch/git-touch/commit/08e7c99c6431f0152ccb7dbe6b0239e2b8757c42))
|
||||
* add more information for users screen ([f3b5476](https://github.com/git-touch/git-touch/commit/f3b547668c84586484b1db20d8fdd5b638891f01))
|
||||
* add news filter ([049f44b](https://github.com/git-touch/git-touch/commit/049f44b5f45fcbc5a70835f4347b820f9ee6744f))
|
||||
* add organization screen ([7182268](https://github.com/git-touch/git-touch/commit/718226860edb3bef09807518d8876e0269c10ff0))
|
||||
* add popular monospace fonts ([7a9fb0f](https://github.com/git-touch/git-touch/commit/7a9fb0ffeec76e288216434d4120db3817bf8d10))
|
||||
* add project entry ([01d7fd2](https://github.com/git-touch/git-touch/commit/01d7fd2fc11ffa32714f7faf1ee8154f9983d63c))
|
||||
* add reaction emoji to issue screen ([af79d33](https://github.com/git-touch/git-touch/commit/af79d33a7f36d242706aa39e03d3d5b526d41456))
|
||||
* add releases ([f9fcf42](https://github.com/git-touch/git-touch/commit/f9fcf42c98a7c9006e03cc4056dff4622c4d532e))
|
||||
* add scrollbar ([5089ac6](https://github.com/git-touch/git-touch/commit/5089ac6bb078f349d9e98f380662e701cba0c1ba))
|
||||
* add topics to repo screen ([3f2b9ed](https://github.com/git-touch/git-touch/commit/3f2b9ed56621bf14ec55d6e65ccc302d12f8ed0e))
|
||||
* add trending developers ([91d6a4b](https://github.com/git-touch/git-touch/commit/91d6a4b2a3ba72738885ff8f5032c6c8fd6ed728))
|
||||
* add trending screen ([c06ef90](https://github.com/git-touch/git-touch/commit/c06ef90618b3a58100f747b4475bcb88f386238b))
|
||||
* add users and issues search ([cefd0bc](https://github.com/git-touch/git-touch/commit/cefd0bcb5c5f05f6b71999c5b2bed8902410b71e))
|
||||
* add view owner action at repo screen ([83c22bd](https://github.com/git-touch/git-touch/commit/83c22bda9acb9f113d4e4f1829721a39d7a2e705))
|
||||
* apply github markdown style ([68dacab](https://github.com/git-touch/git-touch/commit/68dacabfbddbed5e7df5a70dd6832ae3d199b279))
|
||||
* border left padding ([3506609](https://github.com/git-touch/git-touch/commit/3506609024f70968f3e1834d144a37735f1e7777))
|
||||
* bottom navigation style ([68c1be4](https://github.com/git-touch/git-touch/commit/68c1be406d1d80fd3aa3acb2245742825631be57))
|
||||
* code settings ([a47d84a](https://github.com/git-touch/git-touch/commit/a47d84a6cc83df490366e50a14f8b576356ad307))
|
||||
* commits list screen ([a7155d4](https://github.com/git-touch/git-touch/commit/a7155d4def99e3be6aa71595aca5386f0cb8d812))
|
||||
* create issue ([4b8807e](https://github.com/git-touch/git-touch/commit/4b8807e2f19a44e7aafea0f335642caf01e1751e))
|
||||
* disable link to self of repo screen ([932a107](https://github.com/git-touch/git-touch/commit/932a10797e21c1ddd1ead85235d7c861150606fe))
|
||||
* disable refresh on tab switch ([09c1ded](https://github.com/git-touch/git-touch/commit/09c1ded405d7605951085f84f1703d2cdb612a23))
|
||||
* extract markdown view, add basic style ([70f83df](https://github.com/git-touch/git-touch/commit/70f83df1fe07ab55186f0ef8355caf6f60230443))
|
||||
* format numbers with group seperator ([ede2d06](https://github.com/git-touch/git-touch/commit/ede2d064f10e361c4d60142600c05ef4f2698abc))
|
||||
* gitlab account login ([beb8974](https://github.com/git-touch/git-touch/commit/beb8974caa82f4679898f9f53f3c6abca0b5f765))
|
||||
* handle markdown link tap ([b119a42](https://github.com/git-touch/git-touch/commit/b119a425cd75c7ceb69c5e2a12801218241690b7))
|
||||
* hide issue entry if not enabled ([9c5ef59](https://github.com/git-touch/git-touch/commit/9c5ef590131467f10d9f2b32c5eb829bfcda9b79))
|
||||
* hide owner of user page repos if same ([9bdb01e](https://github.com/git-touch/git-touch/commit/9bdb01e04ce1ed50b7db9437f731b844907ca813))
|
||||
* issue screen style ([1108346](https://github.com/git-touch/git-touch/commit/110834616352bb87e11ef85f3847c7742d4722e8))
|
||||
* issues screen info ([bf3f077](https://github.com/git-touch/git-touch/commit/bf3f077efa416220e486c20ea138f741a506320f))
|
||||
* issues screen style ([2c6a3d0](https://github.com/git-touch/git-touch/commit/2c6a3d097c96a4da092ef1ea3178b6aaa2983817))
|
||||
* launch google maps for location ([58ee485](https://github.com/git-touch/git-touch/commit/58ee48527f38328b3a549902d408336f0d9504db))
|
||||
* list group style ([3055c29](https://github.com/git-touch/git-touch/commit/3055c29e7b8d15f8c8cb50a28397ee2ed289c193))
|
||||
* login by access token ([8869c6b](https://github.com/git-touch/git-touch/commit/8869c6b456180cf4f31493030fe680b595178710))
|
||||
* news screen style ([321ab0a](https://github.com/git-touch/git-touch/commit/321ab0a60a2a340f41404a440e69f8b7a65ca87d))
|
||||
* news screen time, style tweaks ([46e380c](https://github.com/git-touch/git-touch/commit/46e380c10d07f61b25d232ea11725e371f8259a0))
|
||||
* notification badge color, remove unnecessary keyword new ([ae1536b](https://github.com/git-touch/git-touch/commit/ae1536b34892026c0f98e082ac3ed950c1f14b53))
|
||||
* notification style ([1eafcff](https://github.com/git-touch/git-touch/commit/1eafcff12498cd664e6b72f8d74313e2bb70b628))
|
||||
* organization members ([1c5b624](https://github.com/git-touch/git-touch/commit/1c5b62430ecaf32c4cd3f4dba77495d8d93066d8))
|
||||
* organization screen ([45687a4](https://github.com/git-touch/git-touch/commit/45687a48a6c3b226a95ecd11f26cf97de9b70711))
|
||||
* pushEvent: show commits, click to launch code compare page ([76d8138](https://github.com/git-touch/git-touch/commit/76d8138716dfea115d55e344a59ce7cd53526c35))
|
||||
* remove news filter ([0e87278](https://github.com/git-touch/git-touch/commit/0e8727891e0efe3f79adfb6cc6fe4f36646caa00))
|
||||
* repo item style ([354520d](https://github.com/git-touch/git-touch/commit/354520d9c11c79912d334115af6807d564f670d7))
|
||||
* repo language ratio bar ([029beba](https://github.com/git-touch/git-touch/commit/029bebaf0dce8f05c1328c3e0fb926155763b122))
|
||||
* repository count ([42debe9](https://github.com/git-touch/git-touch/commit/42debe9bf3887c47d9983e172d9b733a8448b603))
|
||||
* repository forks screen ([250b520](https://github.com/git-touch/git-touch/commit/250b5206625457e464a534fae8522385d2d63b2e))
|
||||
* select branch with picker ([ce00adf](https://github.com/git-touch/git-touch/commit/ce00adf54c2e7a2463619080edcefd83c7356144))
|
||||
* settings style ([c24fd46](https://github.com/git-touch/git-touch/commit/c24fd4600c52024a6c215d68c3c7328626102fee))
|
||||
* settings table view style ([7f9669e](https://github.com/git-touch/git-touch/commit/7f9669eaeaebe3425ba8e934721bbcfd8d39cd23))
|
||||
* show branches count ([4fb32fa](https://github.com/git-touch/git-touch/commit/4fb32fa818f00d83cdc85114231fcbdd3bb1f7d9))
|
||||
* show code blob ([3f59d56](https://github.com/git-touch/git-touch/commit/3f59d5694dd5b6a045b0ad642e5167a9f4e0faf6))
|
||||
* show notification status on load ([80e6332](https://github.com/git-touch/git-touch/commit/80e63324325cab6b1f8e588f1b9928b7d5ca8fb0))
|
||||
* show pinned items ([8cd1d9f](https://github.com/git-touch/git-touch/commit/8cd1d9f1a5125681e08c37d4db5f0d84fa460684))
|
||||
* show repository directory ([09f91f7](https://github.com/git-touch/git-touch/commit/09f91f77ae9fe359ecbec0946cdd677df9e26939))
|
||||
* specify branch of commits screen ([8bc2024](https://github.com/git-touch/git-touch/commit/8bc2024e4142610f55f59396ccb0bfc989a43816))
|
||||
* style tweak ([7d6d1ec](https://github.com/git-touch/git-touch/commit/7d6d1ecd46083190546f19204f078db8c68c86f8))
|
||||
* style tweaks ([2acf857](https://github.com/git-touch/git-touch/commit/2acf85742bf2dfb82a14a786f881b83b31dc0078))
|
||||
* style tweaks ([9fe6639](https://github.com/git-touch/git-touch/commit/9fe6639f6619b3065fdbb89ec498c6423a9d0595))
|
||||
* style tweaks ([6312da8](https://github.com/git-touch/git-touch/commit/6312da876a44b93afa037091c8ed366d5759dac7))
|
||||
* style tweaks ([e3cba91](https://github.com/git-touch/git-touch/commit/e3cba91b9c508322b01ac5b73978cc443fd1cb67))
|
||||
* text contains organization ([562c67d](https://github.com/git-touch/git-touch/commit/562c67dac004de2c7765fbf9198328e0f0f842b2))
|
||||
* text field placeholder ([cb87c32](https://github.com/git-touch/git-touch/commit/cb87c32de7482bac8d718102e5ecf5adc8a44eed))
|
||||
* use popup menu button for material ([951c50c](https://github.com/git-touch/git-touch/commit/951c50c2a983cef1425842090004bca3aaa8b744))
|
||||
* use seti icons ([8b580e2](https://github.com/git-touch/git-touch/commit/8b580e2376517729bf398ebd1672e40b5654b94b))
|
||||
* user screen repos title ([3354ac4](https://github.com/git-touch/git-touch/commit/3354ac4e6bc14ae6646260e0eb66fc14bf64de54))
|
||||
* user screen style ([a589e51](https://github.com/git-touch/git-touch/commit/a589e518bbd926fcdab156320c7d5b7addca8849))
|
||||
* user screen style tweaks ([c78c010](https://github.com/git-touch/git-touch/commit/c78c010fab7055fd14bdc1779e9590d185ba94fc))
|
||||
* user screen style tweaks ([2575576](https://github.com/git-touch/git-touch/commit/2575576e332c5185763e4577d9c8965e3aca49e8))
|
||||
* view image files ([83f3fbb](https://github.com/git-touch/git-touch/commit/83f3fbbdcfab63392e663010ad676fa1aebb12fe))
|
||||
* watch repository ([488f5fc](https://github.com/git-touch/git-touch/commit/488f5fc8f01acf2d73f23155854a4559de115ae2))
|
||||
|
||||
|
||||
|
||||
# [1.0.0](https://github.com/git-touch/git-touch/compare/a051a54549f70a8ba7be33a5b9b04ae5ff5d98a0...v1.0.0) (2019-02-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add missing internet permission to android manifest ([56f598e](https://github.com/git-touch/git-touch/commit/56f598e73228ffa6256cec4ca0ff519e70209002))
|
||||
* check mounted before setState ([ddb9497](https://github.com/git-touch/git-touch/commit/ddb9497ab835e950fd2a4df7e59e37eae81602b8))
|
||||
* checkout code of closeWebView fix PR ([d25b979](https://github.com/git-touch/git-touch/commit/d25b9791382b2fd24def5923a89fe01155b1cbe6))
|
||||
* event item tap screen ([d476018](https://github.com/git-touch/git-touch/commit/d476018092e5110689cafe397fff15e6090e0954))
|
||||
* event item tapable revert ([5b4ff92](https://github.com/git-touch/git-touch/commit/5b4ff92138864b6f39e0cbe8942413c1ef5022e8))
|
||||
* handle notification item type: Commit ([84596d3](https://github.com/git-touch/git-touch/commit/84596d3fcf698c9cf9364cd6b77860c5d5753467))
|
||||
* long list at material theme ([ce11da3](https://github.com/git-touch/git-touch/commit/ce11da379a3f209f7af030f0ce7e5397f56c2276))
|
||||
* move fetch to next tick to get context ([73907f5](https://github.com/git-touch/git-touch/commit/73907f51b4462a811aa4c5b7f3449a852a773296))
|
||||
* refresh scaffold, dash graphql syntax error ([5c4d29c](https://github.com/git-touch/git-touch/commit/5c4d29c5227855302e689ca254159057abb7244d))
|
||||
* remove loading when reach to end ([6933c04](https://github.com/git-touch/git-touch/commit/6933c044723b533672de627c0546be863ac845eb))
|
||||
* replace hard code ([c7a16f6](https://github.com/git-touch/git-touch/commit/c7a16f67a0ca8d6df3340fbcdbff468f03b8e6ca))
|
||||
* style and dependency ([b4c21a1](https://github.com/git-touch/git-touch/commit/b4c21a13724983e4a64b2fe579ce0a28c1936542))
|
||||
* style of pull request and issue screens ([c9d4f4c](https://github.com/git-touch/git-touch/commit/c9d4f4c999404421c3fbeb07a41685abebaccf3e))
|
||||
* styles ([9ce9589](https://github.com/git-touch/git-touch/commit/9ce9589b2ce005a0f1cee0a2dd1d815e8d5a67dd))
|
||||
* test files ([5f94c0f](https://github.com/git-touch/git-touch/commit/5f94c0f80f97f98bb3a81560a3ed93596705bc9a))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add actions to repo, user and issue screen ([d9bec75](https://github.com/git-touch/git-touch/commit/d9bec759e3bcc2715878c29f907520ac5c19da8b))
|
||||
* add all timeline item types ([7a229d0](https://github.com/git-touch/git-touch/commit/7a229d079786b1e6e51a66dc5e7aea8b75839ba9))
|
||||
* add android deep link ([5c0870a](https://github.com/git-touch/git-touch/commit/5c0870a80bc6c098aa167fc8bc8ba5ef32db45cf))
|
||||
* add android notification screen ([b07aee5](https://github.com/git-touch/git-touch/commit/b07aee5aad6cd5117c41d82d033e8bca9dc4a896))
|
||||
* add error screen to handle network and other errors ([0a26509](https://github.com/git-touch/git-touch/commit/0a26509cddb852c8c714539bcd5c63ac6fb87889))
|
||||
* add files and commits links for repo screen ([925472f](https://github.com/git-touch/git-touch/commit/925472f151ce1ef1ab2dafb9c61b2c4ee7e36d7f))
|
||||
* add iOS icons, add display name ([3a254bd](https://github.com/git-touch/git-touch/commit/3a254bd0aa0c6339e66c207e41078cf7e7e07f98))
|
||||
* add issue and pull request state ([fb9fd4c](https://github.com/git-touch/git-touch/commit/fb9fd4cb3a5fdc1b528900e4fb791cb10705031a))
|
||||
* add loading widget when receiving url scheme ([e1170d4](https://github.com/git-touch/git-touch/commit/e1170d411cff0169299c389ad61d1ec2165062ec))
|
||||
* add more event type ([9ae00df](https://github.com/git-touch/git-touch/commit/9ae00dff6d591cf20e76cebe4892d78dedacfc30))
|
||||
* add notification page ([a051a54](https://github.com/git-touch/git-touch/commit/a051a54549f70a8ba7be33a5b9b04ae5ff5d98a0))
|
||||
* add Octicons ([d86c2c3](https://github.com/git-touch/git-touch/commit/d86c2c3b4999826869c46a9c41df29c1ba2336c9))
|
||||
* add placeholder for empty list ([5298c87](https://github.com/git-touch/git-touch/commit/5298c8736f8f6787ad43145cac50d8d31fcf9eee))
|
||||
* add repo item, extract list group widget ([f141405](https://github.com/git-touch/git-touch/commit/f1414057e0a10803f00dc9aa8c8ea531e8a2633d))
|
||||
* add repo's issues and pull requests screen ([5535631](https://github.com/git-touch/git-touch/commit/55356315c437143ab2c3f06d254539fa6e1e2ebb))
|
||||
* add search screen ([8e86e85](https://github.com/git-touch/git-touch/commit/8e86e85b553b21269e2eab965d130bafaeb93e36))
|
||||
* add search screen ([992c7e0](https://github.com/git-touch/git-touch/commit/992c7e0cc6c7cd3782df00eab77b231af141bd1f))
|
||||
* add tips for unimplemented event types ([374a39c](https://github.com/git-touch/git-touch/commit/374a39c4205b5ff29a5dda951856c91920561d21))
|
||||
* add user screen ([3c83804](https://github.com/git-touch/git-touch/commit/3c83804b3d962f919985b57f8d99c2464ff29835))
|
||||
* add users screen: following and followers ([66c040e](https://github.com/git-touch/git-touch/commit/66c040e5239c9a45fd55cfa5a0acfe8fd676c6e7))
|
||||
* add users' repo screen ([ab75500](https://github.com/git-touch/git-touch/commit/ab755005b79d0ef09ffd75c9887bb3b302daa95a))
|
||||
* android icons and display name ([282d29f](https://github.com/git-touch/git-touch/commit/282d29f68f4745efab7b3ff6a6152abe446e4683))
|
||||
* custom event payload type ([6aa65b8](https://github.com/git-touch/git-touch/commit/6aa65b857ff9faa805f7be931eb404814bed7c39))
|
||||
* extract issue and pull request common widget, add more type ([7c6c211](https://github.com/git-touch/git-touch/commit/7c6c211d1c3a2121193f43135ee01c3f3add226c))
|
||||
* extract provider, add android news screen ([908d6df](https://github.com/git-touch/git-touch/commit/908d6df478cc4a38f3af4fcfa7a2cda5153c9e15))
|
||||
* github oauth login ([543f8c8](https://github.com/git-touch/git-touch/commit/543f8c82ea421b0129fbb529daeb0f914c45d309))
|
||||
* home screen style, add pull request screen ([1624027](https://github.com/git-touch/git-touch/commit/16240278f67a2f5fb3c5ba9152bf39b5d31b0b92))
|
||||
* inbox screen ([8e678a3](https://github.com/git-touch/git-touch/commit/8e678a37d4a98c54989ba1d206bffef1173166a0))
|
||||
* iOS URL scheme config ([ef03caa](https://github.com/git-touch/git-touch/commit/ef03caa135c536e04a121686a27308da9a359224))
|
||||
* login screen style, add settings screen, extract simple scaffold ([434781a](https://github.com/git-touch/git-touch/commit/434781a27e9d99aecb201c488a1f0a8d951c51bd))
|
||||
* notification filters ([e16d6c2](https://github.com/git-touch/git-touch/commit/e16d6c24680bba0d29809bd2652db233621efd2e))
|
||||
* notification icon badge ([c047aae](https://github.com/git-touch/git-touch/commit/c047aae099c1c71e2a7c1aeaa02fec29aa161d8f))
|
||||
* notification mark as read ([c0629c5](https://github.com/git-touch/git-touch/commit/c0629c5739109459556b2ef2b35176df590287a4))
|
||||
* notification page style ([2458c63](https://github.com/git-touch/git-touch/commit/2458c63a0c12bdb5985416faa3a042176241a042))
|
||||
* notification screen ([9043322](https://github.com/git-touch/git-touch/commit/90433222012ae6af7c79df82a2f00e49ee3dd7e5))
|
||||
* notification screen filter ([7c35bb7](https://github.com/git-touch/git-touch/commit/7c35bb7ffb4d2144d78ff8b2a29816b46258e2e5))
|
||||
* repo screen ([5664591](https://github.com/git-touch/git-touch/commit/56645910e4aa85f089a53025d7fb8713040923f8))
|
||||
* settings screen ([0a1de91](https://github.com/git-touch/git-touch/commit/0a1de9156993d2d6a3c970d5b4d12c7212e9ba0e))
|
||||
* style of home and notification screen ([4e28608](https://github.com/git-touch/git-touch/commit/4e2860871402a4e0cfa6c076c6260b75780ff8d6))
|
||||
* user screen ([a374a57](https://github.com/git-touch/git-touch/commit/a374a57f8f7d0129e264c0a7021eec9192a992e0))
|
||||
* user screen style ([7a18277](https://github.com/git-touch/git-touch/commit/7a18277ac2130d867ac592b0555aeb441ea0fd28))
|
||||
* users' star repos ([813a956](https://github.com/git-touch/git-touch/commit/813a95666ed26171953b42abe242db7fd35920c4))
|
||||
|
||||
- View GitHub trending repositories and users
|
||||
- View code with syntax highlighting
|
||||
- Search users and issues
|
||||
- Login by access token
|
||||
- Style tweaks
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- View GitHub repositories
|
||||
- View GitHub users
|
||||
- View pull requests and issues
|
||||
- View notifications
|
||||
- Star and unstar repositories
|
||||
- Follow and unfollow users
|
||||
|
|
|
@ -51,7 +51,9 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|||
|
||||
## Contributors
|
||||
|
||||
[![](https://sourcerer.io/fame/pd4d10/pd4d10/git-touch/images/0)![](https://sourcerer.io/fame/pd4d10/pd4d10/git-touch/images/1)![](https://sourcerer.io/fame/pd4d10/pd4d10/git-touch/images/2)![](https://sourcerer.io/fame/pd4d10/pd4d10/git-touch/images/3)![](https://sourcerer.io/fame/pd4d10/pd4d10/git-touch/images/4)![](https://sourcerer.io/fame/pd4d10/pd4d10/git-touch/images/5)![](https://sourcerer.io/fame/pd4d10/pd4d10/git-touch/images/6)![](https://sourcerer.io/fame/pd4d10/pd4d10/git-touch/images/7)](https://github.com/pd4d10/git-touch/graphs/contributors)
|
||||
<a href="https://github.com/git-touch/git-touch/graphs/contributors">
|
||||
<img src="https://contrib.rocks/image?repo=git-touch/git-touch" />
|
||||
</a>
|
||||
|
||||
## License
|
||||
|
||||
|
|
21
SECURITY.md
21
SECURITY.md
|
@ -1,21 +0,0 @@
|
|||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Use this section to tell people about which versions of your project are
|
||||
currently being supported with security updates.
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 5.1.x | :white_check_mark: |
|
||||
| 5.0.x | :x: |
|
||||
| 4.0.x | :white_check_mark: |
|
||||
| < 4.0 | :x: |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
This follows contributing guidelines, as well as the follimg ones.
|
||||
1. Title the vunerablilty
|
||||
2. Describe the vunerablity in as much detail as possible
|
||||
3. Give steps on how to reproduce the vunerablilty
|
||||
4. Add media on the vunerablity, if possible
|
|
@ -1,3 +1,50 @@
|
|||
# This file configures the analyzer, which statically analyzes Dart code to
|
||||
# check for errors, warnings, and lints.
|
||||
#
|
||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||
# invoked from the command line by running `flutter analyze`.
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at
|
||||
# https://dart-lang.github.io/linter/lints/index.html.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
prefer_single_quotes: true
|
||||
always_use_package_imports: true
|
||||
sort_constructors_first: true
|
||||
sort_unnamed_constructors_first: true
|
||||
avoid_types_on_closure_parameters: true
|
||||
omit_local_variable_types: true
|
||||
prefer_final_in_for_each: true
|
||||
prefer_final_locals: true
|
||||
use_super_parameters: true
|
||||
use_key_in_widget_constructors: false # waiting for auto fix: https://github.com/dart-lang/sdk/issues/50056
|
||||
|
||||
# TODO:
|
||||
avoid_print: false
|
||||
use_build_context_synchronously: false
|
||||
non_constant_identifier_names: false
|
||||
|
||||
analyzer:
|
||||
exclude:
|
||||
- lib/**/*.g.dart
|
||||
errors:
|
||||
todo: ignore
|
||||
fixme: ignore
|
||||
invalid_annotation_target: ignore # https://github.com/rrousselGit/freezed#disabling-invalid_annotation_target-warning-and-warning-in-generates-files
|
||||
# TODO:
|
||||
unused_element: false
|
||||
override_on_non_overriding_member: false
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
|
|
|
@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
|
|||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
||||
|
|
|
@ -26,21 +26,29 @@ apply plugin: 'kotlin-android'
|
|||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 29
|
||||
compileSdkVersion 32 // flutter.compileSdkVersion
|
||||
ndkVersion flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
disable 'InvalidPackage'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "io.github.pd4d10.gittouch"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
|
||||
minSdkVersion 19 // flutter.minSdkVersion
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.github.pd4d10.gittouch">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
|
|
@ -1,18 +1,12 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.github.pd4d10.gittouch">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
|
||||
calls FlutterMain.startInitialization(this); in its onCreate method.
|
||||
In most cases you can leave this as-is, but you if you want to provide
|
||||
additional functionality it is fine to subclass or reimplement
|
||||
FlutterApplication and put your custom class here. -->
|
||||
<application
|
||||
android:name="io.flutter.app.FlutterApplication"
|
||||
<application
|
||||
android:label="GitTouch"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
|
@ -26,15 +20,6 @@
|
|||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<!-- Displays an Android View that continues showing the launch screen
|
||||
Drawable until Flutter paints its first frame, then this splash
|
||||
screen fades out. A splash screen is useful to avoid any visual
|
||||
gap between the end of Android's launch screen and the painting of
|
||||
Flutter's first frame. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -1,18 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">@android:color/white</item>
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.github.pd4d10.gittouch">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
buildscript {
|
||||
ext.kotlin_version = '1.3.50'
|
||||
ext.kotlin_version = '1.6.10'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ buildscript {
|
|||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
|
||||
|
|
56
build.yaml
56
build.yaml
|
@ -1,56 +0,0 @@
|
|||
targets:
|
||||
$default:
|
||||
builders:
|
||||
gql_build|ast_builder:
|
||||
enabled: true
|
||||
gql_build|schema_builder:
|
||||
enabled: true
|
||||
options:
|
||||
schema: git_touch|lib/graphql/schema.graphql
|
||||
type_overrides:
|
||||
DateTime:
|
||||
name: DateTime
|
||||
URI:
|
||||
name: String
|
||||
GitObjectID:
|
||||
name: String
|
||||
gql_build|data_builder:
|
||||
enabled: true
|
||||
options:
|
||||
schema: git_touch|lib/graphql/schema.graphql
|
||||
type_overrides:
|
||||
DateTime:
|
||||
name: DateTime
|
||||
URI:
|
||||
name: String
|
||||
GitObjectID:
|
||||
name: String
|
||||
gql_build|var_builder:
|
||||
enabled: true
|
||||
options:
|
||||
schema: git_touch|lib/graphql/schema.graphql
|
||||
type_overrides:
|
||||
DateTime:
|
||||
name: DateTime
|
||||
URI:
|
||||
name: String
|
||||
GitObjectID:
|
||||
name: String
|
||||
gql_build|serializer_builder:
|
||||
enabled: true
|
||||
options:
|
||||
schema: git_touch|lib/graphql/schema.graphql
|
||||
custom_serializers:
|
||||
- import: package:git_touch/utils/date_time_serializer.dart
|
||||
name: DateTimeSerializer
|
||||
ferry_generator|req_builder:
|
||||
enabled: true
|
||||
options:
|
||||
schema: git_touch|lib/graphql/schema.graphql
|
||||
type_overrides:
|
||||
DateTime:
|
||||
name: DateTime
|
||||
URI:
|
||||
name: String
|
||||
GitObjectID:
|
||||
name: String
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,4 @@
|
|||
**/dgph
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
|
@ -18,6 +19,7 @@ Flutter/App.framework
|
|||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/ephemeral/
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
@ -21,6 +21,6 @@
|
|||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<string>11.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '9.0'
|
||||
# platform :ios, '11.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
|
|
@ -2,39 +2,42 @@ PODS:
|
|||
- Flutter (1.0.0)
|
||||
- launch_review (0.0.1):
|
||||
- Flutter
|
||||
- package_info (0.0.1):
|
||||
- maps_launcher (0.0.1):
|
||||
- Flutter
|
||||
- package_info_plus (0.4.5):
|
||||
- Flutter
|
||||
- Sentry (7.1.3):
|
||||
- Sentry/Core (= 7.1.3)
|
||||
- Sentry/Core (7.1.3)
|
||||
- path_provider_ios (0.0.1):
|
||||
- Flutter
|
||||
- Sentry (7.27.1):
|
||||
- Sentry/Core (= 7.27.1)
|
||||
- Sentry/Core (7.27.1)
|
||||
- sentry_flutter (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- Sentry (~> 7.1.3)
|
||||
- share (0.0.1):
|
||||
- Sentry (~> 7.27.1)
|
||||
- share_plus (0.0.1):
|
||||
- Flutter
|
||||
- shared_preferences (0.0.1):
|
||||
- shared_preferences_ios (0.0.1):
|
||||
- Flutter
|
||||
- uni_links (0.0.1):
|
||||
- Flutter
|
||||
- url_launcher (0.0.1):
|
||||
- url_launcher_ios (0.0.1):
|
||||
- Flutter
|
||||
- webview_flutter (0.0.1):
|
||||
- webview_flutter_wkwebview (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- launch_review (from `.symlinks/plugins/launch_review/ios`)
|
||||
- package_info (from `.symlinks/plugins/package_info/ios`)
|
||||
- maps_launcher (from `.symlinks/plugins/maps_launcher/ios`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
|
||||
- sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
|
||||
- share (from `.symlinks/plugins/share/ios`)
|
||||
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
|
||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||
- shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`)
|
||||
- uni_links (from `.symlinks/plugins/uni_links/ios`)
|
||||
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
|
||||
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
|
||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
|
@ -45,36 +48,39 @@ EXTERNAL SOURCES:
|
|||
:path: Flutter
|
||||
launch_review:
|
||||
:path: ".symlinks/plugins/launch_review/ios"
|
||||
package_info:
|
||||
:path: ".symlinks/plugins/package_info/ios"
|
||||
maps_launcher:
|
||||
:path: ".symlinks/plugins/maps_launcher/ios"
|
||||
package_info_plus:
|
||||
:path: ".symlinks/plugins/package_info_plus/ios"
|
||||
path_provider_ios:
|
||||
:path: ".symlinks/plugins/path_provider_ios/ios"
|
||||
sentry_flutter:
|
||||
:path: ".symlinks/plugins/sentry_flutter/ios"
|
||||
share:
|
||||
:path: ".symlinks/plugins/share/ios"
|
||||
shared_preferences:
|
||||
:path: ".symlinks/plugins/shared_preferences/ios"
|
||||
share_plus:
|
||||
:path: ".symlinks/plugins/share_plus/ios"
|
||||
shared_preferences_ios:
|
||||
:path: ".symlinks/plugins/shared_preferences_ios/ios"
|
||||
uni_links:
|
||||
:path: ".symlinks/plugins/uni_links/ios"
|
||||
url_launcher:
|
||||
:path: ".symlinks/plugins/url_launcher/ios"
|
||||
webview_flutter:
|
||||
:path: ".symlinks/plugins/webview_flutter/ios"
|
||||
url_launcher_ios:
|
||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||
webview_flutter_wkwebview:
|
||||
:path: ".symlinks/plugins/webview_flutter_wkwebview/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
launch_review: 75d5a956ba8eaa493e9c9d4bf4c05e505e8d5ed0
|
||||
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
|
||||
maps_launcher: 2e5b6a2d664ec6c27f82ffa81b74228d770ab203
|
||||
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
|
||||
Sentry: 6d963d64804dd06d96e778be729613f481394312
|
||||
sentry_flutter: f20d4f199442900fbdab2b8496f1d2091d8b94d9
|
||||
share: 0b2c3e82132f5888bccca3351c504d0003b3b410
|
||||
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
|
||||
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
|
||||
Sentry: bc644307e2eb6a4c9c55cf117a80b895bb2a25a7
|
||||
sentry_flutter: 649559f0512e00d3f6fc92cf51f74bc2fe68d1d3
|
||||
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
|
||||
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
|
||||
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
|
||||
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
|
||||
webview_flutter: 9f491a9b5a66f2573946a389b2677987b0ff8c0b
|
||||
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
|
||||
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f
|
||||
|
||||
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
||||
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
|
||||
|
||||
COCOAPODS: 1.10.1
|
||||
COCOAPODS: 1.11.3
|
||||
|
|
|
@ -3,17 +3,17 @@
|
|||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objectVersion = 50;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
37EE18F57BCDEA525EB92F36 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B20C9E04554129631AB8EE78 /* Pods_Runner.framework */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
FA131E1B3A78EEDD359ED551 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75205C87EE834F576A3F9103 /* Pods_Runner.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
|
@ -30,14 +30,15 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
03BC239D24FE0B4D9A1D2D83 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
346CC1AE8457DF6B48B85A03 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
2F67270DBA3C43464E2F44EE /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
75205C87EE834F576A3F9103 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9220593D71312B73EFB9B261 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
|
@ -45,8 +46,7 @@
|
|||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
AE6CD52BC7D64064E7B512FF /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
B20C9E04554129631AB8EE78 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
B984CAF4E26B4FACF6C11EC5 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -54,24 +54,13 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
37EE18F57BCDEA525EB92F36 /* Pods_Runner.framework in Frameworks */,
|
||||
FA131E1B3A78EEDD359ED551 /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
2E2AB605F70DF2344A2B9E92 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AE6CD52BC7D64064E7B512FF /* Pods-Runner.debug.xcconfig */,
|
||||
346CC1AE8457DF6B48B85A03 /* Pods-Runner.release.xcconfig */,
|
||||
03BC239D24FE0B4D9A1D2D83 /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -89,8 +78,8 @@
|
|||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
2E2AB605F70DF2344A2B9E92 /* Pods */,
|
||||
A3B00A29EAF11D6D1B02DEAB /* Frameworks */,
|
||||
A28BA2DF970A8F973E2CD5D0 /* Pods */,
|
||||
B48C5EFD064AE0D1E1B42C23 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
|
@ -117,10 +106,21 @@
|
|||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A3B00A29EAF11D6D1B02DEAB /* Frameworks */ = {
|
||||
A28BA2DF970A8F973E2CD5D0 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B20C9E04554129631AB8EE78 /* Pods_Runner.framework */,
|
||||
2F67270DBA3C43464E2F44EE /* Pods-Runner.debug.xcconfig */,
|
||||
9220593D71312B73EFB9B261 /* Pods-Runner.release.xcconfig */,
|
||||
B984CAF4E26B4FACF6C11EC5 /* Pods-Runner.profile.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
B48C5EFD064AE0D1E1B42C23 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
75205C87EE834F576A3F9103 /* Pods_Runner.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
|
@ -132,14 +132,14 @@
|
|||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
CB11531C1F26F7678F621EA7 /* [CP] Check Pods Manifest.lock */,
|
||||
2B6DD7B668196BD9756C3725 /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
58A5FDDED951DFF2FCF219F9 /* [CP] Embed Pods Frameworks */,
|
||||
C34908B9EA82FDA61F8BDAA0 /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -156,7 +156,7 @@
|
|||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1020;
|
||||
LastUpgradeCheck = 1300;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
|
@ -198,52 +198,7 @@
|
|||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
58A5FDDED951DFF2FCF219F9 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
CB11531C1F26F7678F621EA7 /* [CP] Check Pods Manifest.lock */ = {
|
||||
2B6DD7B668196BD9756C3725 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
|
@ -265,6 +220,51 @@
|
|||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
C34908B9EA82FDA61F8BDAA0 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
|
@ -340,7 +340,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
|
@ -357,15 +357,10 @@
|
|||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.github.pd4d10.gitTouch;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
@ -422,7 +417,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
|
@ -471,11 +466,12 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
|
@ -489,15 +485,10 @@
|
|||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.github.pd4d10.gitTouch;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
@ -516,15 +507,10 @@
|
|||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.github.pd4d10.gitTouch;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1020"
|
||||
LastUpgradeVersion = "1300"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -27,8 +27,6 @@
|
|||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
|
@ -38,8 +36,8 @@
|
|||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
|
@ -61,8 +59,6 @@
|
|||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
|
@ -4,11 +4,6 @@
|
|||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleLocalizations</key>
|
||||
<array>
|
||||
<string>en</string>
|
||||
<string>hi</string>
|
||||
</array>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>GitTouch</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
@ -63,5 +58,7 @@
|
|||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
119
lib/app.dart
119
lib/app.dart
|
@ -1,78 +1,77 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:antd_mobile/antd_mobile.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:git_touch/home.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/router.dart';
|
||||
import 'package:intl/locale.dart' as l;
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final auth = Provider.of<AuthModel>(context);
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
|
||||
final LocaleListResolutionCallback localeListResolutionCallback =
|
||||
(locales, supportedLocales) {
|
||||
// 1. user set locale
|
||||
// 2. system locale
|
||||
try {
|
||||
if (theme.locale != null) {
|
||||
final intlLocale = l.Locale.parse(theme.locale!);
|
||||
locales = [
|
||||
Locale.fromSubtags(
|
||||
languageCode: intlLocale.languageCode,
|
||||
countryCode: intlLocale.countryCode,
|
||||
scriptCode: intlLocale.scriptCode,
|
||||
),
|
||||
...locales!
|
||||
];
|
||||
}
|
||||
} catch (err) {
|
||||
print(err);
|
||||
}
|
||||
|
||||
for (final locale in locales!) {
|
||||
// this is necessary because Flutter only handles zh_Hans -> zh
|
||||
// and would not handle non-exist language code
|
||||
if (AppLocalizations.delegate.isSupported(locale)) {
|
||||
return locale;
|
||||
}
|
||||
}
|
||||
|
||||
// 3. if none match, use the default
|
||||
return supportedLocales.firstWhere((l) => l.languageCode == 'en');
|
||||
};
|
||||
|
||||
return Container(
|
||||
return AntTheme(
|
||||
key: auth.rootKey,
|
||||
child: theme.theme == AppThemeType.cupertino
|
||||
? CupertinoApp(
|
||||
theme: CupertinoThemeData(brightness: theme.brightness),
|
||||
home: Home(),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
localeListResolutionCallback: localeListResolutionCallback,
|
||||
)
|
||||
: MaterialApp(
|
||||
theme: ThemeData(
|
||||
brightness: theme.brightness,
|
||||
primaryColor:
|
||||
theme.brightness == Brightness.dark ? null : Colors.white,
|
||||
accentColor: theme.palette.primary,
|
||||
scaffoldBackgroundColor: theme.palette.background,
|
||||
pageTransitionsTheme: PageTransitionsTheme(
|
||||
builders: {
|
||||
TargetPlatform.android: ZoomPageTransitionsBuilder(),
|
||||
},
|
||||
data: AntThemeData(brightness: theme.brightness),
|
||||
child: Builder(
|
||||
builder: (context) {
|
||||
final antTheme = AntTheme.of(context);
|
||||
|
||||
return CupertinoApp.router(
|
||||
routeInformationProvider: router.routeInformationProvider,
|
||||
routeInformationParser: router.routeInformationParser,
|
||||
routerDelegate: router.routerDelegate,
|
||||
theme: CupertinoThemeData(
|
||||
brightness: theme.brightness,
|
||||
primaryColor: antTheme.colorPrimary,
|
||||
scaffoldBackgroundColor: antTheme.colorBox,
|
||||
textTheme: CupertinoTextThemeData(
|
||||
textStyle: TextStyle(
|
||||
fontSize: antTheme.fontSizeMain,
|
||||
color: antTheme.colorText,
|
||||
),
|
||||
),
|
||||
home: Home(),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
localeListResolutionCallback: localeListResolutionCallback,
|
||||
),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
localeListResolutionCallback: (locales, supportedLocales) {
|
||||
// 1. user set locale
|
||||
// 2. system locale
|
||||
try {
|
||||
if (theme.locale != null) {
|
||||
final intlLocale = l.Locale.parse(theme.locale!);
|
||||
locales = [
|
||||
Locale.fromSubtags(
|
||||
languageCode: intlLocale.languageCode,
|
||||
countryCode: intlLocale.countryCode,
|
||||
scriptCode: intlLocale.scriptCode,
|
||||
),
|
||||
...locales!
|
||||
];
|
||||
}
|
||||
} catch (err) {
|
||||
print(err);
|
||||
}
|
||||
|
||||
for (final locale in locales!) {
|
||||
// this is necessary because Flutter only handles zh_Hans -> zh
|
||||
// and would not handle non-exist language code
|
||||
if (AppLocalizations.delegate.isSupported(locale)) {
|
||||
return locale;
|
||||
}
|
||||
}
|
||||
|
||||
// 3. if none match, use the default
|
||||
return supportedLocales.firstWhere((l) => l.languageCode == 'en');
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
159
lib/home.dart
159
lib/home.dart
|
@ -1,39 +1,40 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:antd_mobile/antd_mobile.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/notification.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/screens/bb_explore.dart';
|
||||
import 'package:git_touch/screens/bb_teams.dart';
|
||||
import 'package:git_touch/screens/bb_user.dart';
|
||||
import 'package:git_touch/screens/ge_search.dart';
|
||||
import 'package:git_touch/screens/ge_user.dart';
|
||||
import 'package:git_touch/screens/gh_news.dart';
|
||||
import 'package:git_touch/screens/gh_notification.dart';
|
||||
import 'package:git_touch/screens/gh_search.dart';
|
||||
import 'package:git_touch/screens/gh_trending.dart';
|
||||
import 'package:git_touch/screens/gh_user.dart';
|
||||
import 'package:git_touch/screens/gl_explore.dart';
|
||||
import 'package:git_touch/screens/gl_groups.dart';
|
||||
import 'package:git_touch/screens/gl_search.dart';
|
||||
import 'package:git_touch/screens/gl_user.dart';
|
||||
import 'package:git_touch/screens/go_search.dart';
|
||||
import 'package:git_touch/screens/go_user.dart';
|
||||
import 'package:git_touch/screens/gt_orgs.dart';
|
||||
import 'package:git_touch/screens/gt_user.dart';
|
||||
import 'package:git_touch/screens/gl_explore.dart';
|
||||
import 'package:git_touch/screens/gl_groups.dart';
|
||||
import 'package:git_touch/screens/gl_user.dart';
|
||||
import 'package:git_touch/screens/login.dart';
|
||||
import 'package:git_touch/screens/gh_notification.dart';
|
||||
import 'package:git_touch/screens/gh_user.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:launch_review/launch_review.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:git_touch/screens/gh_news.dart';
|
||||
import 'package:git_touch/screens/gh_search.dart';
|
||||
import 'package:git_touch/screens/gh_trending.dart';
|
||||
import 'package:git_touch/screens/ge_search.dart';
|
||||
import 'package:github/github.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:launch_review/launch_review.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:pub_semver/pub_semver.dart';
|
||||
import 'package:universal_io/io.dart';
|
||||
|
||||
class Home extends StatefulWidget {
|
||||
@override
|
||||
_HomeState createState() => _HomeState();
|
||||
State<Home> createState() => _HomeState();
|
||||
}
|
||||
|
||||
class _HomeState extends State<Home> {
|
||||
|
@ -47,7 +48,7 @@ class _HomeState extends State<Home> {
|
|||
@override
|
||||
initState() {
|
||||
super.initState();
|
||||
Future.delayed(Duration(seconds: 5), () async {
|
||||
Future.delayed(const Duration(seconds: 5), () async {
|
||||
final latest = await GitHub()
|
||||
.repositories
|
||||
.getLatestRelease(RepositorySlug.full('git-touch/git-touch'));
|
||||
|
@ -57,13 +58,13 @@ class _HomeState extends State<Home> {
|
|||
.compareTo(Version.parse(current)) ==
|
||||
1) {
|
||||
final res = await context.read<ThemeModel>().showConfirm(context,
|
||||
Text('New version released. Would you like to download it?'));
|
||||
const Text('New version released. Would you like to download it?'));
|
||||
if (res == true) {
|
||||
if (Platform.isIOS) {
|
||||
// go to app store
|
||||
LaunchReview.launch(writeReview: false);
|
||||
} else {
|
||||
context.read<ThemeModel>().push(context, latest.htmlUrl!);
|
||||
context.pushUrl(latest.htmlUrl!);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +92,7 @@ class _HomeState extends State<Home> {
|
|||
case 3:
|
||||
return GhSearchScreen();
|
||||
case 4:
|
||||
return GhViewer();
|
||||
return const GhViewerScreen();
|
||||
}
|
||||
break;
|
||||
case PlatformType.gitlab:
|
||||
|
@ -103,7 +104,7 @@ class _HomeState extends State<Home> {
|
|||
case 2:
|
||||
return GlSearchScreen();
|
||||
case 3:
|
||||
return GlUserScreen(null);
|
||||
return const GlUserScreen(null);
|
||||
}
|
||||
break;
|
||||
case PlatformType.bitbucket:
|
||||
|
@ -113,13 +114,13 @@ class _HomeState extends State<Home> {
|
|||
case 1:
|
||||
return BbTeamsScreen();
|
||||
case 2:
|
||||
return BbUserScreen(null);
|
||||
return const BbUserScreen(null);
|
||||
}
|
||||
break;
|
||||
case PlatformType.gitea:
|
||||
switch (index) {
|
||||
case 0:
|
||||
return GtOrgsScreen();
|
||||
return const GtOrgsScreen();
|
||||
case 1:
|
||||
return GtUserScreen(auth.activeAccount!.login, isViewer: true);
|
||||
}
|
||||
|
@ -143,8 +144,7 @@ class _HomeState extends State<Home> {
|
|||
}
|
||||
|
||||
Widget _buildNotificationIcon(BuildContext context, IconData iconData) {
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
int count = Provider.of<NotificationModel>(context).count;
|
||||
final count = Provider.of<NotificationModel>(context).count;
|
||||
if (count == 0) {
|
||||
return Icon(iconData);
|
||||
}
|
||||
|
@ -154,10 +154,11 @@ class _HomeState extends State<Home> {
|
|||
children: <Widget>[
|
||||
Icon(iconData),
|
||||
Positioned(
|
||||
right: -2,
|
||||
top: -2,
|
||||
child: Icon(Octicons.primitive_dot,
|
||||
color: theme.palette.primary, size: 14))
|
||||
right: -2,
|
||||
top: -2,
|
||||
child: Icon(Octicons.dot_fill,
|
||||
color: AntTheme.of(context).colorPrimary, size: 14),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -180,23 +181,23 @@ class _HomeState extends State<Home> {
|
|||
|
||||
List<BottomNavigationBarItem> _buildNavigationItems(String platform) {
|
||||
final search = BottomNavigationBarItem(
|
||||
icon: Icon(Ionicons.search_outline),
|
||||
activeIcon: Icon(Ionicons.search),
|
||||
icon: const Icon(Ionicons.search_outline),
|
||||
activeIcon: const Icon(Ionicons.search),
|
||||
label: AppLocalizations.of(context)!.search,
|
||||
);
|
||||
final group = BottomNavigationBarItem(
|
||||
icon: Icon(Ionicons.people_outline),
|
||||
activeIcon: Icon(Ionicons.people),
|
||||
icon: const Icon(Ionicons.people_outline),
|
||||
activeIcon: const Icon(Ionicons.people),
|
||||
label: AppLocalizations.of(context)!.organizations,
|
||||
);
|
||||
final me = BottomNavigationBarItem(
|
||||
icon: Icon(Ionicons.person_outline),
|
||||
activeIcon: Icon(Ionicons.person),
|
||||
icon: const Icon(Ionicons.person_outline),
|
||||
activeIcon: const Icon(Ionicons.person),
|
||||
label: AppLocalizations.of(context)!.me,
|
||||
);
|
||||
final explore = BottomNavigationBarItem(
|
||||
icon: Icon(Ionicons.compass_outline),
|
||||
activeIcon: Icon(Ionicons.compass),
|
||||
icon: const Icon(Ionicons.compass_outline),
|
||||
activeIcon: const Icon(Ionicons.compass),
|
||||
label: AppLocalizations.of(context)!.explore,
|
||||
);
|
||||
|
||||
|
@ -204,8 +205,8 @@ class _HomeState extends State<Home> {
|
|||
case PlatformType.github:
|
||||
return [
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Ionicons.newspaper_outline),
|
||||
activeIcon: Icon(Ionicons.newspaper),
|
||||
icon: const Icon(Ionicons.newspaper_outline),
|
||||
activeIcon: const Icon(Ionicons.newspaper),
|
||||
label: AppLocalizations.of(context)!.news,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
|
@ -215,8 +216,8 @@ class _HomeState extends State<Home> {
|
|||
label: AppLocalizations.of(context)!.notification,
|
||||
),
|
||||
BottomNavigationBarItem(
|
||||
icon: Icon(Ionicons.flame_outline),
|
||||
activeIcon: Icon(Ionicons.flame),
|
||||
icon: const Icon(Ionicons.flame_outline),
|
||||
activeIcon: const Icon(Ionicons.flame),
|
||||
label: AppLocalizations.of(context)!.trending,
|
||||
),
|
||||
search,
|
||||
|
@ -238,7 +239,6 @@ class _HomeState extends State<Home> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
final auth = Provider.of<AuthModel>(context);
|
||||
|
||||
if (auth.activeAccount == null) {
|
||||
|
@ -247,56 +247,35 @@ class _HomeState extends State<Home> {
|
|||
|
||||
final navigationItems = _buildNavigationItems(auth.activeAccount!.platform);
|
||||
|
||||
switch (theme.theme) {
|
||||
case AppThemeType.cupertino:
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
return !(await getNavigatorKey(auth.activeTab)
|
||||
.currentState
|
||||
?.maybePop())!;
|
||||
},
|
||||
child: CupertinoTabScaffold(
|
||||
tabBuilder: (context, index) {
|
||||
return CupertinoTabView(
|
||||
navigatorKey: getNavigatorKey(index),
|
||||
builder: (context) {
|
||||
return _buildScreen(index);
|
||||
},
|
||||
);
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
return !(await getNavigatorKey(auth.activeTab)
|
||||
.currentState
|
||||
?.maybePop())!;
|
||||
},
|
||||
child: CupertinoTabScaffold(
|
||||
tabBuilder: (context, index) {
|
||||
return CupertinoTabView(
|
||||
navigatorKey: getNavigatorKey(index),
|
||||
builder: (context) {
|
||||
return _buildScreen(index);
|
||||
},
|
||||
tabBar: CupertinoTabBar(
|
||||
items: navigationItems,
|
||||
currentIndex: auth.activeTab,
|
||||
onTap: (index) {
|
||||
if (auth.activeTab == index) {
|
||||
getNavigatorKey(index)
|
||||
.currentState
|
||||
?.popUntil((route) => route.isFirst);
|
||||
} else {
|
||||
auth.setActiveTab(index);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
default:
|
||||
return Scaffold(
|
||||
body: IndexedStack(
|
||||
index: auth.activeTab,
|
||||
children: [
|
||||
for (var i = 0; i < navigationItems.length; i++) _buildScreen(i)
|
||||
],
|
||||
),
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
selectedItemColor: theme.palette.primary,
|
||||
items: navigationItems,
|
||||
currentIndex: auth.activeTab,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
onTap: (int index) {
|
||||
);
|
||||
},
|
||||
tabBar: CupertinoTabBar(
|
||||
items: navigationItems,
|
||||
currentIndex: auth.activeTab,
|
||||
onTap: (index) {
|
||||
if (auth.activeTab == index) {
|
||||
getNavigatorKey(index)
|
||||
.currentState
|
||||
?.popUntil((route) => route.isFirst);
|
||||
} else {
|
||||
auth.setActiveTab(index);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,11 +63,11 @@
|
|||
"@members": {
|
||||
"description": "members of an organization"
|
||||
},
|
||||
"popularRepositories": "popular repositories",
|
||||
"popularRepositories": "Popular Repositories",
|
||||
"@popularRepositories": {
|
||||
"description": "popular repositories"
|
||||
},
|
||||
"pinnedRepositories": "pinned repositories",
|
||||
"pinnedRepositories": "Pinned Repositories",
|
||||
"@pinnedRepositories": {
|
||||
"description": "pinned repositories"
|
||||
},
|
||||
|
@ -75,11 +75,11 @@
|
|||
"@settings": {
|
||||
"description": "settings"
|
||||
},
|
||||
"system": "system",
|
||||
"system": "System",
|
||||
"@system": {
|
||||
"description": "system"
|
||||
},
|
||||
"githubStatus": "GitHub status",
|
||||
"githubStatus": "GitHub Status",
|
||||
"@githubStatus": {
|
||||
"description": "github status"
|
||||
},
|
||||
|
@ -87,15 +87,15 @@
|
|||
"@reviewPermissions": {
|
||||
"description": "review Permissions"
|
||||
},
|
||||
"gitlabStatus": "GitLab status",
|
||||
"gitlabStatus": "GitLab Status",
|
||||
"@gitlabStatus": {
|
||||
"description": "GitLab status"
|
||||
},
|
||||
"giteaStatus": "Gitea status",
|
||||
"giteaStatus": "Gitea Status",
|
||||
"@giteaStatus": {
|
||||
"description": "Gitea status"
|
||||
},
|
||||
"switchAccounts": "Switch accounts",
|
||||
"switchAccounts": "Switch Accounts",
|
||||
"@switchAccounts": {
|
||||
"description": "Switch accounts"
|
||||
},
|
||||
|
@ -115,18 +115,6 @@
|
|||
"@dark": {
|
||||
"description": "dark mode"
|
||||
},
|
||||
"scaffoldTheme": "Scaffold Theme",
|
||||
"@scaffoldTheme": {
|
||||
"description": "Kind of theme - cupertino or material"
|
||||
},
|
||||
"cupertino": "Cupertino",
|
||||
"@cupertino": {
|
||||
"description": "Cupertino scaffold theme"
|
||||
},
|
||||
"material": "Material",
|
||||
"@material": {
|
||||
"description": "Material scaffold theme"
|
||||
},
|
||||
"codeTheme": "Code Theme",
|
||||
"@codeTheme": {
|
||||
"description": "code theme"
|
||||
|
@ -147,10 +135,14 @@
|
|||
"@feedback": {
|
||||
"description": "provide feedback"
|
||||
},
|
||||
"submitAnIssue": "Submit an issue",
|
||||
"submitAnIssue": "Submit An Issue",
|
||||
"@submitAnIssue": {
|
||||
"description": "submit issue for app"
|
||||
},
|
||||
"submit": "Submit",
|
||||
"@submit": {
|
||||
"description": "submit button text"
|
||||
},
|
||||
"rateThisApp": "Rate This App",
|
||||
"@rateThisApp": {
|
||||
"description": "rate the app"
|
||||
|
@ -159,7 +151,7 @@
|
|||
"@email": {
|
||||
"description": "Email to report issues"
|
||||
},
|
||||
"about": "about",
|
||||
"about": "About",
|
||||
"@about": {
|
||||
"description": "about section"
|
||||
},
|
||||
|
@ -187,6 +179,10 @@
|
|||
"@releases": {
|
||||
"description": "releases"
|
||||
},
|
||||
"released": "released",
|
||||
"@released": {
|
||||
"description": "released"
|
||||
},
|
||||
"watchers": "Watchers",
|
||||
"@watchers": {
|
||||
"description": "watchers"
|
||||
|
@ -199,7 +195,7 @@
|
|||
"@issues": {
|
||||
"description": "issues"
|
||||
},
|
||||
"pullRequests": "Pull requests",
|
||||
"pullRequests": "Pull Requests",
|
||||
"@pullRequests": {
|
||||
"description": "Pull Requests"
|
||||
},
|
||||
|
@ -207,6 +203,10 @@
|
|||
"@commits": {
|
||||
"description": "Commits"
|
||||
},
|
||||
"commit": "Commit",
|
||||
"@commit": {
|
||||
"description": "Commit"
|
||||
},
|
||||
"branches": "Branches",
|
||||
"@branches": {
|
||||
"description": "branches"
|
||||
|
@ -263,15 +263,15 @@
|
|||
"@project": {
|
||||
"description": "project"
|
||||
},
|
||||
"selectAccount": "Select account",
|
||||
"selectAccount": "Select Account",
|
||||
"@selectAccount": {
|
||||
"description": "select account message"
|
||||
},
|
||||
"removeAccount": "Remove account",
|
||||
"removeAccount": "Remove Account",
|
||||
"@removeAccount": {
|
||||
"description": "remove account"
|
||||
},
|
||||
"somethingBadHappens": "Something bad happens:",
|
||||
"somethingBadHappens": "Something Bad Happens:",
|
||||
"@somethingBadHappens": {
|
||||
"description": "error message"
|
||||
},
|
||||
|
@ -346,5 +346,507 @@
|
|||
"fontStyle": "FONT STYLE",
|
||||
"@fontStyle": {
|
||||
"description": "font style"
|
||||
},
|
||||
"appLanguage": "App Language",
|
||||
"@appLanguage": {
|
||||
"description": "The app's language"
|
||||
},
|
||||
"reloadMessage": "The app will reload to make the language setting take effect",
|
||||
"@reloadMessage": {
|
||||
"description": "Reload message"
|
||||
},
|
||||
"theme": "Theme",
|
||||
"@theme": {
|
||||
"description": "Theme header text"
|
||||
},
|
||||
"title": "Title",
|
||||
"@title": {
|
||||
"description": "title"
|
||||
},
|
||||
"body": "Body",
|
||||
"@body": {
|
||||
"description": "body"
|
||||
},
|
||||
"timelineTypeNotImplemented": "Type not implemented yet",
|
||||
"@timelineTypeNotImplemented": {
|
||||
"description": "Timeline type not implemented"
|
||||
},
|
||||
"pullRequestCommitMessage": "added commit {commit}",
|
||||
"@pullRequestCommitMessage": {
|
||||
"description": "pull request commit message",
|
||||
"placeholders": {
|
||||
"commit": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"crossReferencedEventMessage": "references this on",
|
||||
"@crossReferencedEventMessage": {
|
||||
"description": "cross referenced event"
|
||||
},
|
||||
"closedEventMessage": "closed this",
|
||||
"@closedEventMessage": {
|
||||
"description": "closed event"
|
||||
},
|
||||
"reopenedEventMessage": "reopened this",
|
||||
"@reopenedEventMessage": {
|
||||
"description": "reopened event"
|
||||
},
|
||||
"subscribedEventMessage": "subscribed to this issue",
|
||||
"@subscribedEventMessage": {
|
||||
"description": "subscribed event"
|
||||
},
|
||||
"unsubscribedEventMessage": "unsubscribed from this issue",
|
||||
"@unsubscribedEventMessage": {
|
||||
"description": "unsubscribed event"
|
||||
},
|
||||
"referencedEventMessage": "referenced this pull request from commit {commit} from {repoName}",
|
||||
"@referencedEventMessage": {
|
||||
"description": "referenced event",
|
||||
"placeholders": {
|
||||
"commit": {
|
||||
"type": "String"
|
||||
},
|
||||
"repoName": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"assignedEventMessage": "assigned this to",
|
||||
"@assignedEventMessage": {
|
||||
"description": "assigned event"
|
||||
},
|
||||
"unassignedEventMessage": "unassigned this from",
|
||||
"@unassignedEventMessage": {
|
||||
"description": "unassigned event"
|
||||
},
|
||||
"added": "added",
|
||||
"@added": {
|
||||
"description": "added"
|
||||
},
|
||||
"removed": "removed",
|
||||
"@removed": {
|
||||
"description": "removed"
|
||||
},
|
||||
"label": "label",
|
||||
"@label": {
|
||||
"description": "label"
|
||||
},
|
||||
"milestonedEventMessage": "added this to {milestone} milestone",
|
||||
"@milestonedEventMessage": {
|
||||
"description": "milestone event",
|
||||
"placeholders": {
|
||||
"milestone": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"demilestonedEventMessage": "removed this from {milestone} milestone",
|
||||
"@demilestonedEventMessage": {
|
||||
"description": "demilestoned event",
|
||||
"placeholders": {
|
||||
"milestone": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"renamedTitleEventMessage": "changed the title to {title} from",
|
||||
"@renamedTitleEventMessage": {
|
||||
"description": "changed title event",
|
||||
"placeholders": {
|
||||
"title": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lockedConversationEventMessage": "locked this conversation",
|
||||
"@lockedConversationEventMessage": {
|
||||
"description": "locked this conversation"
|
||||
},
|
||||
"unlockedConversationEventMessage": "unlocked this conversation",
|
||||
"@unlockedConversationEventMessage": {
|
||||
"description": "unlocked this conversation"
|
||||
},
|
||||
"transferredEventMessage": "transferred this issue from {repoName}",
|
||||
"@transferredEventMessage": {
|
||||
"description": "transferred event",
|
||||
"placeholders": {
|
||||
"repoName": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"approvedChanges": "approved these changes",
|
||||
"@approvedChanges": {
|
||||
"description": "approved these changes"
|
||||
},
|
||||
"reviewed": "reviewed",
|
||||
"@reviewed": {
|
||||
"description": "reviewed"
|
||||
},
|
||||
"mergedEventMessage": "merged commit {commit} into {mergeRefName}",
|
||||
"@mergedEventMessage": {
|
||||
"description": "merged event message",
|
||||
"placeholders": {
|
||||
"commit": {
|
||||
"type": "String"
|
||||
},
|
||||
"mergeRefName": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"mentionedEventMessage": "was mentioned",
|
||||
"@mentionedEventMessage": {
|
||||
"description": "was mentioned"
|
||||
},
|
||||
"pinnedEventMessage": "pinned this issue",
|
||||
"@pinnedEventMessage": {
|
||||
"description": "pinned this issue"
|
||||
},
|
||||
"deployedPR": "deployed the pull request {headRefName}",
|
||||
"@deployedPR": {
|
||||
"description": "deployed the pull request",
|
||||
"placeholders": {
|
||||
"headRefName": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"deploymentEnvironmentChangedEventMessage": "changed the development environment to {devEnv}",
|
||||
"@deploymentEnvironmentChangedEventMessage": {
|
||||
"description": "deployment environment changed event",
|
||||
"placeholders": {
|
||||
"devEnv": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"headRefDeletedEventMessage": "deleted the {headRefName} branch",
|
||||
"@headRefDeletedEventMessage": {
|
||||
"description": "head ref deleted event",
|
||||
"placeholders": {
|
||||
"headRefName": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"headRefRestoredEventMessage": "restored the {headRefName} branch",
|
||||
"@headRefRestoredEventMessage": {
|
||||
"description": "head ref restored event",
|
||||
"placeholders": {
|
||||
"headRefName": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"headRefForcedPushedEventFirstMessage": "force-pushed the",
|
||||
"@headRefForcedPushedEventFirstMessage": {
|
||||
"description": "head ref forced pushed event message first half"
|
||||
},
|
||||
"headRefForcedPushedEventSecondMessage": "branch from",
|
||||
"@headRefForcedPushedEventSecondMessage": {
|
||||
"description": "head ref forced pushed event message second half"
|
||||
},
|
||||
"reviewRequestEventMessage": "requested a review from",
|
||||
"@reviewRequestEventMessage": {
|
||||
"description": "requested a review from"
|
||||
},
|
||||
"fromReviewRequest": "from the review request",
|
||||
"@fromReviewRequest": {
|
||||
"description": "from the review request"
|
||||
},
|
||||
"reviewDismissedEventMessage": "dismissed the pull request review requested by",
|
||||
"@reviewDismissedEventMessage": {
|
||||
"description": "dismissed the pull request review requested by"
|
||||
},
|
||||
"nCommitsTo": "{count,plural, =1{{count} commit to} other{{count} commits to}}",
|
||||
"@nCommitsTo": {
|
||||
"description": "no. of commits to a branch",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"checkRunEventMessage": "{action} a check run for {name}",
|
||||
"@checkRunEventMessage": {
|
||||
"description": "check run event",
|
||||
"placeholders": {
|
||||
"action": {
|
||||
"type": "String"
|
||||
},
|
||||
"name": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"checkSuiteEventConclusionMessage": "it is a {conclusion}",
|
||||
"@checkSuiteEventConclusionMessage": {
|
||||
"description": "check suite event conclusion",
|
||||
"placeholders": {
|
||||
"conclusion": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"actionRequiredConclusion": "it requires more action",
|
||||
"@actionRequiredConclusion": {
|
||||
"description": "it requires more action"
|
||||
},
|
||||
"checkSuiteEventMessage": "{action} the check suite and the conclusion is that",
|
||||
"@checkSuiteEventMessage": {
|
||||
"description": "check suite event message conclusion",
|
||||
"placeholders": {
|
||||
"action": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"commitCommentEventMessage": "commented on a commit at",
|
||||
"@commitCommentEventMessage": {
|
||||
"description": "commit comment event message"
|
||||
},
|
||||
"contentReferenceEventMessage": "{action} a content reference at",
|
||||
"@contentReferenceEventMessage": {
|
||||
"description": "content reference event",
|
||||
"placeholders": {
|
||||
"action": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdEventMessage": "created a {refType} {ref} at",
|
||||
"@createdEventMessage": {
|
||||
"description": "created event message",
|
||||
"placeholders": {
|
||||
"refType": {
|
||||
"type": "String"
|
||||
},
|
||||
"ref": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"deletedEventMessage": "deleted the {refType} {ref} at",
|
||||
"@deletedEventMessage": {
|
||||
"description": "deleted event message",
|
||||
"placeholders": {
|
||||
"refType": {
|
||||
"type": "String"
|
||||
},
|
||||
"ref": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"forked": "forked",
|
||||
"@forked": {
|
||||
"description": "forked"
|
||||
},
|
||||
"createdPages": "created the pages: {pageNames}",
|
||||
"@createdPages": {
|
||||
"description": "created pages",
|
||||
"placeholders": {
|
||||
"pageNames": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"editedPages": "edited the pages: {pageNames}",
|
||||
"@editedPages": {
|
||||
"description": "edited pages",
|
||||
"placeholders": {
|
||||
"pageAction": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"newPermissionsAccepted": "new permissions were accepted for action ",
|
||||
"@newPermissionsAccepted": {
|
||||
"description": "new permissions were accepted for"
|
||||
},
|
||||
"forGithubAppWithId": "for the Github App with id {id}",
|
||||
"@forGithubAppWithId": {
|
||||
"description": "for the Github App with id",
|
||||
"placeholders": {
|
||||
"id": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"wereAddedTo": "{repos} were added to the installation id {id}",
|
||||
"@wereAddedTo": {
|
||||
"description": "example: repo1,repo2 were added to the installation id ID",
|
||||
"placeholders": {
|
||||
"repos": {
|
||||
"type": "String"
|
||||
},
|
||||
"id": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"wereRemovedFrom": "{repos} were removed from the installation id {id}",
|
||||
"@wereRemovedFrom": {
|
||||
"description": "example: repo1,repo2 were removed from the installation id ID",
|
||||
"placeholders": {
|
||||
"repos": {
|
||||
"type": "String"
|
||||
},
|
||||
"id": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"commentedOn": "commented on",
|
||||
"@commentedOn": {
|
||||
"description": "commented on"
|
||||
},
|
||||
"at": "at",
|
||||
"@at": {
|
||||
"description": "at"
|
||||
},
|
||||
"to": "to",
|
||||
"@to": {
|
||||
"description": "to"
|
||||
},
|
||||
"from": "from",
|
||||
"@from": {
|
||||
"description": "from"
|
||||
},
|
||||
"purchasedMarketplacePlan": "purchased a Marketplace Plan",
|
||||
"@purchasedMarketplacePlan": {
|
||||
"description": "purchased a Marketplace Plan"
|
||||
},
|
||||
"cancelledMarketplacePlan": "cancelled their Marketplace Plan",
|
||||
"@cancelledMarketplacePlan": {
|
||||
"description": "cancelled their Marketplace Plan"
|
||||
},
|
||||
"pendingMarketplacePlan": "Marketplace Plan is pending change",
|
||||
"@pendingMarketplacePlan": {
|
||||
"description": "Marketplace Plan is pending change"
|
||||
},
|
||||
"pendingChangeCancelled": "Pending Marketplace Plan was cancelled",
|
||||
"@pendingChangeCancelled": {
|
||||
"description": "Pending Marketplace Plan was cancelled"
|
||||
},
|
||||
"changedMarketplacePlan": "changed their Marketplace Plan",
|
||||
"@changedMarketplacePlan": {
|
||||
"description": "changed their Marketplace Plan"
|
||||
},
|
||||
"was": "was",
|
||||
"@was": {
|
||||
"description": "was"
|
||||
},
|
||||
"convertProjectCard": "converted the project card into an issue",
|
||||
"@convertProjectCard": {
|
||||
"description": "converted the project card into an issue"
|
||||
},
|
||||
"theProjectCard": "the project card",
|
||||
"@theProjectCard": {
|
||||
"description": "the project card"
|
||||
},
|
||||
"projectColumnEventMessage": "{action} the project column {projectColumnName} at ",
|
||||
"@projectColumnEventMessage": {
|
||||
"description": "the project column",
|
||||
"placeholders": {
|
||||
"action": {
|
||||
"type": "String"
|
||||
},
|
||||
"projectColumnName": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"projectEventMessage": "{action} the project {projectName}",
|
||||
"@projectEventMessage": {
|
||||
"description": "the project",
|
||||
"placeholders": {
|
||||
"action" : {
|
||||
"type": "String"
|
||||
},
|
||||
"projectName": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"made": "made",
|
||||
"@made": {
|
||||
"description": "made"
|
||||
},
|
||||
"public": "public",
|
||||
"@public": {
|
||||
"description": "public"
|
||||
},
|
||||
"pullRequestEventMessage": "{action} pull request",
|
||||
"@pullRequestEventMessage": {
|
||||
"description": "pull request event",
|
||||
"placeholders": {
|
||||
"action": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pullRequestReviewEventMessage": "{action} the pull request review",
|
||||
"@pullRequestReviewEventMessage": {
|
||||
"description": "pull request review event message",
|
||||
"placeholders": {
|
||||
"action": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"pullRequestReviewCommentEventMessage": "reviewed pull request",
|
||||
"@pullRequestReviewCommentEventMessage": {
|
||||
"description": "pull request review comment event"
|
||||
},
|
||||
"pushedTo": "pushed to",
|
||||
"@pushedTo": {
|
||||
"description": "pushed to"
|
||||
},
|
||||
"securityAlertInvolvingPackage": "Security alert involving the package {affectedPackageName} between versions {affectedRange} was {action}ed",
|
||||
"@securityAlertInvolvingPackage": {
|
||||
"description": "Security alert involving package",
|
||||
"placeholders": {
|
||||
"affectedPackageName": {
|
||||
"type": "String"
|
||||
},
|
||||
"affectedRange": {
|
||||
"type": "String"
|
||||
},
|
||||
"action": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityAdvisory": "Security advisory regarding {summary} was {action}",
|
||||
"@securityAdvisory": {
|
||||
"description": "Security advisory",
|
||||
"placeholders": {
|
||||
"summary": {
|
||||
"type": "String"
|
||||
},
|
||||
"action": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"starred": "starred",
|
||||
"@starred": {
|
||||
"description": "starred"
|
||||
},
|
||||
"filesChanged": "{count,plural, =1{{count} file changed} other{{count} files changed}}",
|
||||
"@filesChanged": {
|
||||
"description": "no. of files changed",
|
||||
"placeholders": {
|
||||
"count": {
|
||||
"type": "String"
|
||||
}
|
||||
}
|
||||
},
|
||||
"blankDiff": "No text to be shown here",
|
||||
"@blankDiff": {
|
||||
"description": "text to show for a blank diff"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:git_touch/app.dart';
|
||||
import 'package:git_touch/models/code.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/router.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:git_touch/models/code.dart';
|
||||
import 'package:git_touch/models/notification.dart';
|
||||
import 'package:fluro/fluro.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
|
||||
void main() async {
|
||||
|
@ -29,39 +25,6 @@ void main() async {
|
|||
codeModel.init(),
|
||||
]);
|
||||
|
||||
CommonRouter.routes.forEach((screen) {
|
||||
themeModel.router.define(CommonRouter.prefix + screen.path,
|
||||
handler: Handler(handlerFunc: screen.handler));
|
||||
});
|
||||
GitlabRouter.routes.forEach((screen) {
|
||||
themeModel.router.define(GitlabRouter.prefix + screen.path,
|
||||
handler: Handler(handlerFunc: screen.handler));
|
||||
});
|
||||
GiteaRouter.routes.forEach((screen) {
|
||||
themeModel.router.define(GiteaRouter.prefix + screen.path,
|
||||
handler: Handler(handlerFunc: screen.handler));
|
||||
});
|
||||
BitbucketRouter.routes.forEach((screen) {
|
||||
themeModel.router.define(BitbucketRouter.prefix + screen.path,
|
||||
handler: Handler(handlerFunc: screen.handler));
|
||||
});
|
||||
GithubRouter.routes.forEach((screen) {
|
||||
themeModel.router.define(GithubRouter.prefix + screen.path,
|
||||
handler: Handler(handlerFunc: screen.handler));
|
||||
});
|
||||
GiteeRouter.routes.forEach((screen) {
|
||||
themeModel.router.define(GiteeRouter.prefix + screen.path,
|
||||
handler: Handler(handlerFunc: screen.handler));
|
||||
});
|
||||
GogsRouter.routes.forEach((screen) {
|
||||
themeModel.router.define(GogsRouter.prefix + screen.path,
|
||||
handler: Handler(handlerFunc: screen.handler));
|
||||
});
|
||||
// To match status bar color to app bar color
|
||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
));
|
||||
|
||||
runApp(MultiProvider(
|
||||
providers: [
|
||||
ChangeNotifierProvider(create: (context) => notificationModel),
|
||||
|
@ -69,7 +32,7 @@ void main() async {
|
|||
ChangeNotifierProvider(create: (context) => authModel),
|
||||
ChangeNotifierProvider(create: (context) => codeModel),
|
||||
],
|
||||
child: MyApp(),
|
||||
child: const MyApp(),
|
||||
));
|
||||
},
|
||||
);
|
||||
|
|
|
@ -1,43 +1,22 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'account.freezed.dart';
|
||||
part 'account.g.dart';
|
||||
|
||||
@JsonSerializable(includeIfNull: false)
|
||||
class Account {
|
||||
String platform;
|
||||
String domain;
|
||||
String token;
|
||||
String login;
|
||||
String avatarUrl;
|
||||
int? gitlabId; // For GitLab
|
||||
String? appPassword; // For Bitbucket
|
||||
String? accountId; // For Bitbucket
|
||||
|
||||
// equals(Account a) {
|
||||
// final uri = Uri.parse(domain);
|
||||
// final uriA = Uri.parse(a.domain);
|
||||
|
||||
// // Treat domains as the same if they have the same hosts and ports
|
||||
// return a.platform == platform &&
|
||||
// a.login == login &&
|
||||
// a.gitlabId == gitlabId &&
|
||||
// uri.host == uriA.host &&
|
||||
// uri.port == uriA.port;
|
||||
// }
|
||||
|
||||
Account({
|
||||
required this.platform,
|
||||
required this.domain,
|
||||
required this.token,
|
||||
required this.login,
|
||||
required this.avatarUrl,
|
||||
this.gitlabId,
|
||||
this.appPassword,
|
||||
this.accountId,
|
||||
});
|
||||
@freezed
|
||||
class Account with _$Account {
|
||||
@JsonSerializable(includeIfNull: false)
|
||||
factory Account({
|
||||
required String platform,
|
||||
required String domain,
|
||||
required String token,
|
||||
required String login,
|
||||
required String avatarUrl,
|
||||
int? gitlabId, // For GitLab
|
||||
String? appPassword, // For Bitbucket
|
||||
String? accountId, // For Bitbucket
|
||||
}) = _Account;
|
||||
|
||||
factory Account.fromJson(Map<String, dynamic> json) =>
|
||||
_$AccountFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$AccountToJson(this);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,300 @@
|
|||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||
|
||||
part of 'account.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
final _privateConstructorUsedError = UnsupportedError(
|
||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
|
||||
|
||||
Account _$AccountFromJson(Map<String, dynamic> json) {
|
||||
return _Account.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Account {
|
||||
String get platform => throw _privateConstructorUsedError;
|
||||
String get domain => throw _privateConstructorUsedError;
|
||||
String get token => throw _privateConstructorUsedError;
|
||||
String get login => throw _privateConstructorUsedError;
|
||||
String get avatarUrl => throw _privateConstructorUsedError;
|
||||
int? get gitlabId => throw _privateConstructorUsedError; // For GitLab
|
||||
String? get appPassword =>
|
||||
throw _privateConstructorUsedError; // For Bitbucket
|
||||
String? get accountId => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$AccountCopyWith<Account> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $AccountCopyWith<$Res> {
|
||||
factory $AccountCopyWith(Account value, $Res Function(Account) then) =
|
||||
_$AccountCopyWithImpl<$Res, Account>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String platform,
|
||||
String domain,
|
||||
String token,
|
||||
String login,
|
||||
String avatarUrl,
|
||||
int? gitlabId,
|
||||
String? appPassword,
|
||||
String? accountId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$AccountCopyWithImpl<$Res, $Val extends Account>
|
||||
implements $AccountCopyWith<$Res> {
|
||||
_$AccountCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? platform = null,
|
||||
Object? domain = null,
|
||||
Object? token = null,
|
||||
Object? login = null,
|
||||
Object? avatarUrl = null,
|
||||
Object? gitlabId = freezed,
|
||||
Object? appPassword = freezed,
|
||||
Object? accountId = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
platform: null == platform
|
||||
? _value.platform
|
||||
: platform // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
domain: null == domain
|
||||
? _value.domain
|
||||
: domain // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
token: null == token
|
||||
? _value.token
|
||||
: token // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
login: null == login
|
||||
? _value.login
|
||||
: login // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
avatarUrl: null == avatarUrl
|
||||
? _value.avatarUrl
|
||||
: avatarUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
gitlabId: freezed == gitlabId
|
||||
? _value.gitlabId
|
||||
: gitlabId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
appPassword: freezed == appPassword
|
||||
? _value.appPassword
|
||||
: appPassword // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
accountId: freezed == accountId
|
||||
? _value.accountId
|
||||
: accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$_AccountCopyWith<$Res> implements $AccountCopyWith<$Res> {
|
||||
factory _$$_AccountCopyWith(
|
||||
_$_Account value, $Res Function(_$_Account) then) =
|
||||
__$$_AccountCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String platform,
|
||||
String domain,
|
||||
String token,
|
||||
String login,
|
||||
String avatarUrl,
|
||||
int? gitlabId,
|
||||
String? appPassword,
|
||||
String? accountId});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$_AccountCopyWithImpl<$Res>
|
||||
extends _$AccountCopyWithImpl<$Res, _$_Account>
|
||||
implements _$$_AccountCopyWith<$Res> {
|
||||
__$$_AccountCopyWithImpl(_$_Account _value, $Res Function(_$_Account) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? platform = null,
|
||||
Object? domain = null,
|
||||
Object? token = null,
|
||||
Object? login = null,
|
||||
Object? avatarUrl = null,
|
||||
Object? gitlabId = freezed,
|
||||
Object? appPassword = freezed,
|
||||
Object? accountId = freezed,
|
||||
}) {
|
||||
return _then(_$_Account(
|
||||
platform: null == platform
|
||||
? _value.platform
|
||||
: platform // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
domain: null == domain
|
||||
? _value.domain
|
||||
: domain // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
token: null == token
|
||||
? _value.token
|
||||
: token // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
login: null == login
|
||||
? _value.login
|
||||
: login // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
avatarUrl: null == avatarUrl
|
||||
? _value.avatarUrl
|
||||
: avatarUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
gitlabId: freezed == gitlabId
|
||||
? _value.gitlabId
|
||||
: gitlabId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
appPassword: freezed == appPassword
|
||||
? _value.appPassword
|
||||
: appPassword // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
accountId: freezed == accountId
|
||||
? _value.accountId
|
||||
: accountId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
@JsonSerializable(includeIfNull: false)
|
||||
class _$_Account implements _Account {
|
||||
_$_Account(
|
||||
{required this.platform,
|
||||
required this.domain,
|
||||
required this.token,
|
||||
required this.login,
|
||||
required this.avatarUrl,
|
||||
this.gitlabId,
|
||||
this.appPassword,
|
||||
this.accountId});
|
||||
|
||||
factory _$_Account.fromJson(Map<String, dynamic> json) =>
|
||||
_$$_AccountFromJson(json);
|
||||
|
||||
@override
|
||||
final String platform;
|
||||
@override
|
||||
final String domain;
|
||||
@override
|
||||
final String token;
|
||||
@override
|
||||
final String login;
|
||||
@override
|
||||
final String avatarUrl;
|
||||
@override
|
||||
final int? gitlabId;
|
||||
// For GitLab
|
||||
@override
|
||||
final String? appPassword;
|
||||
// For Bitbucket
|
||||
@override
|
||||
final String? accountId;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Account(platform: $platform, domain: $domain, token: $token, login: $login, avatarUrl: $avatarUrl, gitlabId: $gitlabId, appPassword: $appPassword, accountId: $accountId)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(dynamic other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$_Account &&
|
||||
(identical(other.platform, platform) ||
|
||||
other.platform == platform) &&
|
||||
(identical(other.domain, domain) || other.domain == domain) &&
|
||||
(identical(other.token, token) || other.token == token) &&
|
||||
(identical(other.login, login) || other.login == login) &&
|
||||
(identical(other.avatarUrl, avatarUrl) ||
|
||||
other.avatarUrl == avatarUrl) &&
|
||||
(identical(other.gitlabId, gitlabId) ||
|
||||
other.gitlabId == gitlabId) &&
|
||||
(identical(other.appPassword, appPassword) ||
|
||||
other.appPassword == appPassword) &&
|
||||
(identical(other.accountId, accountId) ||
|
||||
other.accountId == accountId));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, platform, domain, token, login,
|
||||
avatarUrl, gitlabId, appPassword, accountId);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$_AccountCopyWith<_$_Account> get copyWith =>
|
||||
__$$_AccountCopyWithImpl<_$_Account>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$_AccountToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Account implements Account {
|
||||
factory _Account(
|
||||
{required final String platform,
|
||||
required final String domain,
|
||||
required final String token,
|
||||
required final String login,
|
||||
required final String avatarUrl,
|
||||
final int? gitlabId,
|
||||
final String? appPassword,
|
||||
final String? accountId}) = _$_Account;
|
||||
|
||||
factory _Account.fromJson(Map<String, dynamic> json) = _$_Account.fromJson;
|
||||
|
||||
@override
|
||||
String get platform;
|
||||
@override
|
||||
String get domain;
|
||||
@override
|
||||
String get token;
|
||||
@override
|
||||
String get login;
|
||||
@override
|
||||
String get avatarUrl;
|
||||
@override
|
||||
int? get gitlabId;
|
||||
@override // For GitLab
|
||||
String? get appPassword;
|
||||
@override // For Bitbucket
|
||||
String? get accountId;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$_AccountCopyWith<_$_Account> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
|
@ -6,20 +6,18 @@ part of 'account.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Account _$AccountFromJson(Map<String, dynamic> json) {
|
||||
return Account(
|
||||
platform: json['platform'] as String,
|
||||
domain: json['domain'] as String,
|
||||
token: json['token'] as String,
|
||||
login: json['login'] as String,
|
||||
avatarUrl: json['avatarUrl'] as String,
|
||||
gitlabId: json['gitlabId'] as int?,
|
||||
appPassword: json['appPassword'] as String?,
|
||||
accountId: json['accountId'] as String?,
|
||||
);
|
||||
}
|
||||
_$_Account _$$_AccountFromJson(Map<String, dynamic> json) => _$_Account(
|
||||
platform: json['platform'] as String,
|
||||
domain: json['domain'] as String,
|
||||
token: json['token'] as String,
|
||||
login: json['login'] as String,
|
||||
avatarUrl: json['avatarUrl'] as String,
|
||||
gitlabId: json['gitlabId'] as int?,
|
||||
appPassword: json['appPassword'] as String?,
|
||||
accountId: json['accountId'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AccountToJson(Account instance) {
|
||||
Map<String, dynamic> _$$_AccountToJson(_$_Account instance) {
|
||||
final val = <String, dynamic>{
|
||||
'platform': instance.platform,
|
||||
'domain': instance.domain,
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:ferry/ferry.dart';
|
||||
import 'package:git_touch/utils/nil_store.dart';
|
||||
// import 'package:in_app_review/in_app_review.dart';
|
||||
import 'package:universal_io/io.dart';
|
||||
import 'package:fimber/fimber.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:git_touch/models/account.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/models/gitea.dart';
|
||||
import 'package:git_touch/models/gitee.dart';
|
||||
import 'package:git_touch/models/gitlab.dart';
|
||||
import 'package:git_touch/models/gogs.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:github/github.dart';
|
||||
import 'package:gql_http_link/gql_http_link.dart';
|
||||
import 'package:fimber/fimber.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:uni_links/uni_links.dart';
|
||||
import 'package:nanoid/nanoid.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import '../utils/utils.dart';
|
||||
import 'account.dart';
|
||||
import 'gitlab.dart';
|
||||
import 'gogs.dart';
|
||||
import 'package:uni_links/uni_links.dart';
|
||||
// import 'package:in_app_review/in_app_review.dart';
|
||||
import 'package:universal_io/io.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
const clientId = 'df930d7d2e219f26142a';
|
||||
|
||||
|
@ -34,16 +34,16 @@ class PlatformType {
|
|||
}
|
||||
|
||||
class DataWithPage<T> {
|
||||
T data;
|
||||
int cursor;
|
||||
bool hasMore;
|
||||
int total;
|
||||
DataWithPage({
|
||||
required this.data,
|
||||
required this.cursor,
|
||||
required this.hasMore,
|
||||
required this.total,
|
||||
});
|
||||
T data;
|
||||
int cursor;
|
||||
bool hasMore;
|
||||
int total;
|
||||
}
|
||||
|
||||
class AuthModel with ChangeNotifier {
|
||||
|
@ -85,7 +85,7 @@ class AuthModel with ChangeNotifier {
|
|||
|
||||
// https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow
|
||||
Future<void> _onSchemeDetected(Uri? uri) async {
|
||||
await closeWebView();
|
||||
await closeInAppWebView();
|
||||
|
||||
loading = true;
|
||||
notifyListeners();
|
||||
|
@ -107,7 +107,7 @@ class AuthModel with ChangeNotifier {
|
|||
await loginWithToken(token);
|
||||
}
|
||||
|
||||
Future<void> loginWithToken(String token) async {
|
||||
Future<void> loginWithToken(String t) async {
|
||||
try {
|
||||
final queryData = await query('''
|
||||
{
|
||||
|
@ -116,12 +116,12 @@ class AuthModel with ChangeNotifier {
|
|||
avatarUrl
|
||||
}
|
||||
}
|
||||
''', token);
|
||||
''', t);
|
||||
|
||||
await _addAccount(Account(
|
||||
platform: PlatformType.github,
|
||||
domain: 'https://github.com',
|
||||
token: token,
|
||||
token: t,
|
||||
login: queryData['viewer']['login'] as String,
|
||||
avatarUrl: queryData['viewer']['avatarUrl'] as String,
|
||||
));
|
||||
|
@ -144,11 +144,7 @@ class AuthModel with ChangeNotifier {
|
|||
throw info['message'];
|
||||
}
|
||||
if (info['error'] != null) {
|
||||
throw info['error'] +
|
||||
'. ' +
|
||||
(info['error_description'] != null
|
||||
? info['error_description']
|
||||
: '');
|
||||
throw info['error'] + '. ' + (info['error_description'] ?? '');
|
||||
}
|
||||
final user = GitlabUser.fromJson(info);
|
||||
await _addAccount(Account(
|
||||
|
@ -204,7 +200,7 @@ class AuthModel with ChangeNotifier {
|
|||
hasMore: next != null,
|
||||
total: int.tryParse(
|
||||
res.headers['X-Total'] ?? res.headers['x-total'] ?? '') ??
|
||||
TOTAL_COUNT_FALLBACK,
|
||||
kTotalCountFallback,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -241,7 +237,7 @@ class AuthModel with ChangeNotifier {
|
|||
Map<String, dynamic> body = const {},
|
||||
}) async {
|
||||
late http.Response res;
|
||||
Map<String, String> headers = {
|
||||
final headers = <String, String>{
|
||||
'Authorization': 'token $token',
|
||||
HttpHeaders.contentTypeHeader: 'application/json'
|
||||
};
|
||||
|
@ -289,7 +285,7 @@ class AuthModel with ChangeNotifier {
|
|||
Future<DataWithPage> fetchGiteaWithPage(String path,
|
||||
{int? page, int? limit}) async {
|
||||
page = page ?? 1;
|
||||
limit = limit ?? PAGE_SIZE;
|
||||
limit = limit ?? kPageSize;
|
||||
|
||||
var uri = Uri.parse('${activeAccount!.domain}/api/v1$path');
|
||||
uri = uri.replace(
|
||||
|
@ -305,9 +301,9 @@ class AuthModel with ChangeNotifier {
|
|||
return DataWithPage(
|
||||
data: info,
|
||||
cursor: page + 1,
|
||||
hasMore: info is List && info.length > 0,
|
||||
hasMore: info is List && info.isNotEmpty,
|
||||
total: int.tryParse(res.headers['x-total-count'] ?? '') ??
|
||||
TOTAL_COUNT_FALLBACK,
|
||||
kTotalCountFallback,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -345,7 +341,7 @@ class AuthModel with ChangeNotifier {
|
|||
Map<String, dynamic> body = const {},
|
||||
}) async {
|
||||
late http.Response res;
|
||||
Map<String, String> headers = {
|
||||
final headers = <String, String>{
|
||||
'Authorization': 'token $token',
|
||||
HttpHeaders.contentTypeHeader: 'application/json'
|
||||
};
|
||||
|
@ -393,7 +389,7 @@ class AuthModel with ChangeNotifier {
|
|||
Future<DataWithPage> fetchGogsWithPage(String path,
|
||||
{int? page, int? limit}) async {
|
||||
page = page ?? 1;
|
||||
limit = limit ?? PAGE_SIZE;
|
||||
limit = limit ?? kPageSize;
|
||||
|
||||
var uri = Uri.parse('${activeAccount!.domain}/api/v1$path');
|
||||
uri = uri.replace(
|
||||
|
@ -409,9 +405,9 @@ class AuthModel with ChangeNotifier {
|
|||
return DataWithPage(
|
||||
data: info,
|
||||
cursor: page + 1,
|
||||
hasMore: info is List && info.length > 0,
|
||||
hasMore: info is List && info.isNotEmpty,
|
||||
total: int.tryParse(res.headers['x-total-count'] ?? '') ??
|
||||
TOTAL_COUNT_FALLBACK,
|
||||
kTotalCountFallback,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -421,7 +417,7 @@ class AuthModel with ChangeNotifier {
|
|||
Map<String, dynamic> body = const {},
|
||||
}) async {
|
||||
http.Response res;
|
||||
Map<String, String> headers = {
|
||||
final headers = <String, String>{
|
||||
'Authorization': 'token $token',
|
||||
HttpHeaders.contentTypeHeader: 'application/json'
|
||||
};
|
||||
|
@ -480,7 +476,7 @@ class AuthModel with ChangeNotifier {
|
|||
Future<DataWithPage> fetchGiteeWithPage(String path,
|
||||
{int? page, int? limit}) async {
|
||||
page = page ?? 1;
|
||||
limit = limit ?? PAGE_SIZE;
|
||||
limit = limit ?? kPageSize;
|
||||
|
||||
var uri = Uri.parse('${activeAccount!.domain}/api/v5$path');
|
||||
uri = uri.replace(
|
||||
|
@ -495,7 +491,7 @@ class AuthModel with ChangeNotifier {
|
|||
|
||||
final totalPage = int.tryParse(res.headers['total_page'] ?? '');
|
||||
final totalCount =
|
||||
int.tryParse(res.headers['total_count'] ?? '') ?? TOTAL_COUNT_FALLBACK;
|
||||
int.tryParse(res.headers['total_count'] ?? '') ?? kTotalCountFallback;
|
||||
|
||||
return DataWithPage(
|
||||
data: info,
|
||||
|
@ -546,7 +542,7 @@ class AuthModel with ChangeNotifier {
|
|||
userInfo: '${activeAccount!.login}:${activeAccount!.appPassword}',
|
||||
path: input.path,
|
||||
queryParameters: {
|
||||
'pagelen': PAGE_SIZE.toString(),
|
||||
'pagelen': kPageSize.toString(),
|
||||
...input.queryParameters
|
||||
},
|
||||
);
|
||||
|
@ -615,11 +611,11 @@ class AuthModel with ChangeNotifier {
|
|||
Fimber.e('getUriLinksStream failed', ex: err);
|
||||
});
|
||||
|
||||
var prefs = await SharedPreferences.getInstance();
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
// Read accounts
|
||||
try {
|
||||
String? str = prefs.getString(StorageKeys.accounts);
|
||||
final str = prefs.getString(StorageKeys.accounts);
|
||||
// Fimber.d('read accounts: $str');
|
||||
_accounts = (json.decode(str ?? '[]') as List)
|
||||
.map((item) => Account.fromJson(item))
|
||||
|
@ -668,7 +664,8 @@ class AuthModel with ChangeNotifier {
|
|||
StorageKeys.getDefaultStartTabKey(activeAccount!.platform)) ??
|
||||
0;
|
||||
_ghClient = null;
|
||||
_gqlClient = null;
|
||||
_ghGqlClient = null;
|
||||
_glGqlClient = null;
|
||||
notifyListeners();
|
||||
|
||||
// TODO: strategy
|
||||
|
@ -684,41 +681,48 @@ class AuthModel with ChangeNotifier {
|
|||
}
|
||||
|
||||
// http timeout
|
||||
var _timeoutDuration = Duration(seconds: 10);
|
||||
final _timeoutDuration = const Duration(seconds: 10);
|
||||
// var _timeoutDuration = Duration(seconds: 1);
|
||||
|
||||
GitHub? _ghClient;
|
||||
GitHub get ghClient {
|
||||
if (_ghClient == null) {
|
||||
_ghClient = GitHub(auth: Authentication.withToken(token));
|
||||
}
|
||||
_ghClient ??= GitHub(auth: Authentication.withToken(token));
|
||||
return _ghClient!;
|
||||
}
|
||||
|
||||
Client? _gqlClient;
|
||||
Client get gqlClient {
|
||||
if (_gqlClient == null) {
|
||||
_gqlClient = Client(
|
||||
link: HttpLink(
|
||||
_apiPrefix + '/graphql',
|
||||
defaultHeaders: {HttpHeaders.authorizationHeader: 'token $token'},
|
||||
),
|
||||
cache: Cache(store: NilStore()),
|
||||
);
|
||||
}
|
||||
|
||||
return _gqlClient!;
|
||||
Client? _ghGqlClient;
|
||||
Client get ghGqlClient {
|
||||
return _ghGqlClient ??= Client(
|
||||
link: HttpLink(
|
||||
'$_apiPrefix/graphql',
|
||||
defaultHeaders: {HttpHeaders.authorizationHeader: 'token $token'},
|
||||
),
|
||||
// https://ferrygraphql.com/docs/fetch-policies#default-fetchpolicies
|
||||
defaultFetchPolicies: {OperationType.query: FetchPolicy.NetworkOnly},
|
||||
);
|
||||
}
|
||||
|
||||
Future<dynamic> query(String query, [String? _token]) async {
|
||||
if (_token == null) {
|
||||
_token = token;
|
||||
}
|
||||
Client? _glGqlClient;
|
||||
Client get glGqlClient {
|
||||
return _glGqlClient ??= Client(
|
||||
link: HttpLink(
|
||||
Uri.parse(activeAccount!.domain)
|
||||
.replace(path: '/api/graphql')
|
||||
.toString(),
|
||||
defaultHeaders: {'Private-Token': token},
|
||||
),
|
||||
// https://ferrygraphql.com/docs/fetch-policies#default-fetchpolicies
|
||||
defaultFetchPolicies: {OperationType.query: FetchPolicy.NetworkOnly},
|
||||
);
|
||||
}
|
||||
|
||||
Future<dynamic> query(String query, [String? t]) async {
|
||||
t ??= token;
|
||||
|
||||
final res = await http
|
||||
.post(Uri.parse(_apiPrefix + '/graphql'),
|
||||
.post(Uri.parse('$_apiPrefix/graphql'),
|
||||
headers: {
|
||||
HttpHeaders.authorizationHeader: 'token $_token',
|
||||
HttpHeaders.authorizationHeader: 'token $t',
|
||||
HttpHeaders.contentTypeHeader: 'application/json'
|
||||
},
|
||||
body: json.encode({'query': query}))
|
||||
|
@ -740,7 +744,7 @@ class AuthModel with ChangeNotifier {
|
|||
final repoScope = publicOnly ? 'public_repo' : 'repo';
|
||||
final scope = Uri.encodeComponent(
|
||||
['user', repoScope, 'read:org', 'notifications'].join(','));
|
||||
launchUrl(
|
||||
launchStringUrl(
|
||||
'https://github.com/login/oauth/authorize?client_id=$clientId&redirect_uri=gittouch://login&scope=$scope&state=$_oauthState',
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,39 +1,42 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'bitbucket.g.dart';
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbPagination {
|
||||
String? next;
|
||||
List values;
|
||||
BbPagination({required this.values});
|
||||
factory BbPagination.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbPaginationFromJson(json);
|
||||
String? next;
|
||||
List values;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbRepoOwner {
|
||||
BbRepoOwner();
|
||||
factory BbRepoOwner.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbRepoOwnerFromJson(json);
|
||||
String? nickname;
|
||||
String? displayName;
|
||||
String? type; // user, team
|
||||
Map<String, dynamic>? links;
|
||||
String? get avatarUrl => links!['avatar']['href'];
|
||||
BbRepoOwner();
|
||||
factory BbRepoOwner.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbRepoOwnerFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbUser extends BbRepoOwner {
|
||||
BbUser();
|
||||
factory BbUser.fromJson(Map<String, dynamic> json) => _$BbUserFromJson(json);
|
||||
String? username;
|
||||
bool? isStaff;
|
||||
DateTime? createdOn;
|
||||
String? accountId;
|
||||
BbUser();
|
||||
factory BbUser.fromJson(Map<String, dynamic> json) => _$BbUserFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbRepo {
|
||||
BbRepo();
|
||||
factory BbRepo.fromJson(Map<String, dynamic> json) => _$BbRepoFromJson(json);
|
||||
String? name;
|
||||
BbRepoOwner? owner;
|
||||
String? website;
|
||||
|
@ -50,51 +53,52 @@ class BbRepo {
|
|||
Map<String, dynamic>? links;
|
||||
String get ownerLogin => fullName!.split('/')[0]; // owner has no username
|
||||
String? get avatarUrl => links!['avatar']['href'];
|
||||
BbRepo();
|
||||
factory BbRepo.fromJson(Map<String, dynamic> json) => _$BbRepoFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbRepoMainbranch {
|
||||
String? type;
|
||||
String? name;
|
||||
BbRepoMainbranch();
|
||||
factory BbRepoMainbranch.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbRepoMainbranchFromJson(json);
|
||||
String? type;
|
||||
String? name;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbTree {
|
||||
BbTree({required this.type, required this.path});
|
||||
factory BbTree.fromJson(Map<String, dynamic> json) => _$BbTreeFromJson(json);
|
||||
String type;
|
||||
String path;
|
||||
int? size;
|
||||
Map<String, dynamic>? links;
|
||||
BbTree({required this.type, required this.path});
|
||||
factory BbTree.fromJson(Map<String, dynamic> json) => _$BbTreeFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbCommit {
|
||||
BbCommit();
|
||||
factory BbCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbCommitFromJson(json);
|
||||
String? message;
|
||||
DateTime? date;
|
||||
String? hash;
|
||||
BbCommitAuthor? author;
|
||||
BbCommit();
|
||||
factory BbCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbCommitFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbCommitAuthor {
|
||||
String? raw;
|
||||
BbRepoOwner? user;
|
||||
BbCommitAuthor();
|
||||
factory BbCommitAuthor.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbCommitAuthorFromJson(json);
|
||||
String? raw;
|
||||
BbRepoOwner? user;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbIssues {
|
||||
BbIssues();
|
||||
factory BbIssues.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbIssuesFromJson(json);
|
||||
String? priority;
|
||||
String? state;
|
||||
BbRepo? repository;
|
||||
|
@ -103,50 +107,47 @@ class BbIssues {
|
|||
DateTime? createdOn;
|
||||
Map<String, dynamic>? links;
|
||||
String? get issueLink => links!['self']['href'];
|
||||
BbIssues();
|
||||
factory BbIssues.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbIssuesFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbPulls {
|
||||
BbPulls();
|
||||
factory BbPulls.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbPullsFromJson(json);
|
||||
String? description;
|
||||
BbRepoOwner? author;
|
||||
String? title;
|
||||
Map<String, dynamic>? links;
|
||||
String? get pullRequestLink => links!['self']['href'];
|
||||
DateTime? createdOn;
|
||||
BbPulls();
|
||||
factory BbPulls.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbPullsFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbCommentContent {
|
||||
String? raw;
|
||||
String? markup;
|
||||
String? html;
|
||||
BbCommentContent();
|
||||
factory BbCommentContent.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbCommentContentFromJson(json);
|
||||
String? raw;
|
||||
String? markup;
|
||||
String? html;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbComment {
|
||||
BbComment();
|
||||
factory BbComment.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbCommentFromJson(json);
|
||||
String? createdOn;
|
||||
String? updatedOn;
|
||||
BbCommentContent? content;
|
||||
BbRepoOwner? user;
|
||||
BbComment();
|
||||
factory BbComment.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbCommentFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class BbBranch {
|
||||
String? name;
|
||||
String? type;
|
||||
BbBranch();
|
||||
factory BbBranch.fromJson(Map<String, dynamic> json) =>
|
||||
_$BbBranchFromJson(json);
|
||||
String? name;
|
||||
String? type;
|
||||
}
|
||||
|
|
|
@ -6,11 +6,9 @@ part of 'bitbucket.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
BbPagination _$BbPaginationFromJson(Map<String, dynamic> json) {
|
||||
return BbPagination(
|
||||
values: json['values'] as List<dynamic>,
|
||||
)..next = json['next'] as String?;
|
||||
}
|
||||
BbPagination _$BbPaginationFromJson(Map<String, dynamic> json) => BbPagination(
|
||||
values: json['values'] as List<dynamic>,
|
||||
)..next = json['next'] as String?;
|
||||
|
||||
Map<String, dynamic> _$BbPaginationToJson(BbPagination instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -18,13 +16,11 @@ Map<String, dynamic> _$BbPaginationToJson(BbPagination instance) =>
|
|||
'values': instance.values,
|
||||
};
|
||||
|
||||
BbRepoOwner _$BbRepoOwnerFromJson(Map<String, dynamic> json) {
|
||||
return BbRepoOwner()
|
||||
..nickname = json['nickname'] as String?
|
||||
..displayName = json['display_name'] as String?
|
||||
..type = json['type'] as String?
|
||||
..links = json['links'] as Map<String, dynamic>?;
|
||||
}
|
||||
BbRepoOwner _$BbRepoOwnerFromJson(Map<String, dynamic> json) => BbRepoOwner()
|
||||
..nickname = json['nickname'] as String?
|
||||
..displayName = json['display_name'] as String?
|
||||
..type = json['type'] as String?
|
||||
..links = json['links'] as Map<String, dynamic>?;
|
||||
|
||||
Map<String, dynamic> _$BbRepoOwnerToJson(BbRepoOwner instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -34,19 +30,17 @@ Map<String, dynamic> _$BbRepoOwnerToJson(BbRepoOwner instance) =>
|
|||
'links': instance.links,
|
||||
};
|
||||
|
||||
BbUser _$BbUserFromJson(Map<String, dynamic> json) {
|
||||
return BbUser()
|
||||
..nickname = json['nickname'] as String?
|
||||
..displayName = json['display_name'] as String?
|
||||
..type = json['type'] as String?
|
||||
..links = json['links'] as Map<String, dynamic>?
|
||||
..username = json['username'] as String?
|
||||
..isStaff = json['is_staff'] as bool?
|
||||
..createdOn = json['created_on'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_on'] as String)
|
||||
..accountId = json['account_id'] as String?;
|
||||
}
|
||||
BbUser _$BbUserFromJson(Map<String, dynamic> json) => BbUser()
|
||||
..nickname = json['nickname'] as String?
|
||||
..displayName = json['display_name'] as String?
|
||||
..type = json['type'] as String?
|
||||
..links = json['links'] as Map<String, dynamic>?
|
||||
..username = json['username'] as String?
|
||||
..isStaff = json['is_staff'] as bool?
|
||||
..createdOn = json['created_on'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_on'] as String)
|
||||
..accountId = json['account_id'] as String?;
|
||||
|
||||
Map<String, dynamic> _$BbUserToJson(BbUser instance) => <String, dynamic>{
|
||||
'nickname': instance.nickname,
|
||||
|
@ -59,31 +53,29 @@ Map<String, dynamic> _$BbUserToJson(BbUser instance) => <String, dynamic>{
|
|||
'account_id': instance.accountId,
|
||||
};
|
||||
|
||||
BbRepo _$BbRepoFromJson(Map<String, dynamic> json) {
|
||||
return BbRepo()
|
||||
..name = json['name'] as String?
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: BbRepoOwner.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..website = json['website'] as String?
|
||||
..language = json['language'] as String?
|
||||
..size = json['size'] as int?
|
||||
..type = json['type'] as String?
|
||||
..isPrivate = json['is_private'] as bool?
|
||||
..createdOn = json['created_on'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_on'] as String)
|
||||
..updatedOn = json['updated_on'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_on'] as String)
|
||||
..description = json['description'] as String?
|
||||
..fullName = json['full_name'] as String?
|
||||
..slug = json['slug'] as String?
|
||||
..mainbranch = json['mainbranch'] == null
|
||||
? null
|
||||
: BbRepoMainbranch.fromJson(json['mainbranch'] as Map<String, dynamic>)
|
||||
..links = json['links'] as Map<String, dynamic>?;
|
||||
}
|
||||
BbRepo _$BbRepoFromJson(Map<String, dynamic> json) => BbRepo()
|
||||
..name = json['name'] as String?
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: BbRepoOwner.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..website = json['website'] as String?
|
||||
..language = json['language'] as String?
|
||||
..size = json['size'] as int?
|
||||
..type = json['type'] as String?
|
||||
..isPrivate = json['is_private'] as bool?
|
||||
..createdOn = json['created_on'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_on'] as String)
|
||||
..updatedOn = json['updated_on'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_on'] as String)
|
||||
..description = json['description'] as String?
|
||||
..fullName = json['full_name'] as String?
|
||||
..slug = json['slug'] as String?
|
||||
..mainbranch = json['mainbranch'] == null
|
||||
? null
|
||||
: BbRepoMainbranch.fromJson(json['mainbranch'] as Map<String, dynamic>)
|
||||
..links = json['links'] as Map<String, dynamic>?;
|
||||
|
||||
Map<String, dynamic> _$BbRepoToJson(BbRepo instance) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
|
@ -102,11 +94,10 @@ Map<String, dynamic> _$BbRepoToJson(BbRepo instance) => <String, dynamic>{
|
|||
'links': instance.links,
|
||||
};
|
||||
|
||||
BbRepoMainbranch _$BbRepoMainbranchFromJson(Map<String, dynamic> json) {
|
||||
return BbRepoMainbranch()
|
||||
..type = json['type'] as String?
|
||||
..name = json['name'] as String?;
|
||||
}
|
||||
BbRepoMainbranch _$BbRepoMainbranchFromJson(Map<String, dynamic> json) =>
|
||||
BbRepoMainbranch()
|
||||
..type = json['type'] as String?
|
||||
..name = json['name'] as String?;
|
||||
|
||||
Map<String, dynamic> _$BbRepoMainbranchToJson(BbRepoMainbranch instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -114,14 +105,12 @@ Map<String, dynamic> _$BbRepoMainbranchToJson(BbRepoMainbranch instance) =>
|
|||
'name': instance.name,
|
||||
};
|
||||
|
||||
BbTree _$BbTreeFromJson(Map<String, dynamic> json) {
|
||||
return BbTree(
|
||||
type: json['type'] as String,
|
||||
path: json['path'] as String,
|
||||
)
|
||||
..size = json['size'] as int?
|
||||
..links = json['links'] as Map<String, dynamic>?;
|
||||
}
|
||||
BbTree _$BbTreeFromJson(Map<String, dynamic> json) => BbTree(
|
||||
type: json['type'] as String,
|
||||
path: json['path'] as String,
|
||||
)
|
||||
..size = json['size'] as int?
|
||||
..links = json['links'] as Map<String, dynamic>?;
|
||||
|
||||
Map<String, dynamic> _$BbTreeToJson(BbTree instance) => <String, dynamic>{
|
||||
'type': instance.type,
|
||||
|
@ -130,16 +119,13 @@ Map<String, dynamic> _$BbTreeToJson(BbTree instance) => <String, dynamic>{
|
|||
'links': instance.links,
|
||||
};
|
||||
|
||||
BbCommit _$BbCommitFromJson(Map<String, dynamic> json) {
|
||||
return BbCommit()
|
||||
..message = json['message'] as String?
|
||||
..date =
|
||||
json['date'] == null ? null : DateTime.parse(json['date'] as String)
|
||||
..hash = json['hash'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: BbCommitAuthor.fromJson(json['author'] as Map<String, dynamic>);
|
||||
}
|
||||
BbCommit _$BbCommitFromJson(Map<String, dynamic> json) => BbCommit()
|
||||
..message = json['message'] as String?
|
||||
..date = json['date'] == null ? null : DateTime.parse(json['date'] as String)
|
||||
..hash = json['hash'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: BbCommitAuthor.fromJson(json['author'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$BbCommitToJson(BbCommit instance) => <String, dynamic>{
|
||||
'message': instance.message,
|
||||
|
@ -148,13 +134,12 @@ Map<String, dynamic> _$BbCommitToJson(BbCommit instance) => <String, dynamic>{
|
|||
'author': instance.author,
|
||||
};
|
||||
|
||||
BbCommitAuthor _$BbCommitAuthorFromJson(Map<String, dynamic> json) {
|
||||
return BbCommitAuthor()
|
||||
..raw = json['raw'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: BbRepoOwner.fromJson(json['user'] as Map<String, dynamic>);
|
||||
}
|
||||
BbCommitAuthor _$BbCommitAuthorFromJson(Map<String, dynamic> json) =>
|
||||
BbCommitAuthor()
|
||||
..raw = json['raw'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: BbRepoOwner.fromJson(json['user'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$BbCommitAuthorToJson(BbCommitAuthor instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -162,22 +147,20 @@ Map<String, dynamic> _$BbCommitAuthorToJson(BbCommitAuthor instance) =>
|
|||
'user': instance.user,
|
||||
};
|
||||
|
||||
BbIssues _$BbIssuesFromJson(Map<String, dynamic> json) {
|
||||
return BbIssues()
|
||||
..priority = json['priority'] as String?
|
||||
..state = json['state'] as String?
|
||||
..repository = json['repository'] == null
|
||||
? null
|
||||
: BbRepo.fromJson(json['repository'] as Map<String, dynamic>)
|
||||
..title = json['title'] as String?
|
||||
..reporter = json['reporter'] == null
|
||||
? null
|
||||
: BbRepoOwner.fromJson(json['reporter'] as Map<String, dynamic>)
|
||||
..createdOn = json['created_on'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_on'] as String)
|
||||
..links = json['links'] as Map<String, dynamic>?;
|
||||
}
|
||||
BbIssues _$BbIssuesFromJson(Map<String, dynamic> json) => BbIssues()
|
||||
..priority = json['priority'] as String?
|
||||
..state = json['state'] as String?
|
||||
..repository = json['repository'] == null
|
||||
? null
|
||||
: BbRepo.fromJson(json['repository'] as Map<String, dynamic>)
|
||||
..title = json['title'] as String?
|
||||
..reporter = json['reporter'] == null
|
||||
? null
|
||||
: BbRepoOwner.fromJson(json['reporter'] as Map<String, dynamic>)
|
||||
..createdOn = json['created_on'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_on'] as String)
|
||||
..links = json['links'] as Map<String, dynamic>?;
|
||||
|
||||
Map<String, dynamic> _$BbIssuesToJson(BbIssues instance) => <String, dynamic>{
|
||||
'priority': instance.priority,
|
||||
|
@ -189,18 +172,16 @@ Map<String, dynamic> _$BbIssuesToJson(BbIssues instance) => <String, dynamic>{
|
|||
'links': instance.links,
|
||||
};
|
||||
|
||||
BbPulls _$BbPullsFromJson(Map<String, dynamic> json) {
|
||||
return BbPulls()
|
||||
..description = json['description'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: BbRepoOwner.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..title = json['title'] as String?
|
||||
..links = json['links'] as Map<String, dynamic>?
|
||||
..createdOn = json['created_on'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_on'] as String);
|
||||
}
|
||||
BbPulls _$BbPullsFromJson(Map<String, dynamic> json) => BbPulls()
|
||||
..description = json['description'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: BbRepoOwner.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..title = json['title'] as String?
|
||||
..links = json['links'] as Map<String, dynamic>?
|
||||
..createdOn = json['created_on'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_on'] as String);
|
||||
|
||||
Map<String, dynamic> _$BbPullsToJson(BbPulls instance) => <String, dynamic>{
|
||||
'description': instance.description,
|
||||
|
@ -210,12 +191,11 @@ Map<String, dynamic> _$BbPullsToJson(BbPulls instance) => <String, dynamic>{
|
|||
'created_on': instance.createdOn?.toIso8601String(),
|
||||
};
|
||||
|
||||
BbCommentContent _$BbCommentContentFromJson(Map<String, dynamic> json) {
|
||||
return BbCommentContent()
|
||||
..raw = json['raw'] as String?
|
||||
..markup = json['markup'] as String?
|
||||
..html = json['html'] as String?;
|
||||
}
|
||||
BbCommentContent _$BbCommentContentFromJson(Map<String, dynamic> json) =>
|
||||
BbCommentContent()
|
||||
..raw = json['raw'] as String?
|
||||
..markup = json['markup'] as String?
|
||||
..html = json['html'] as String?;
|
||||
|
||||
Map<String, dynamic> _$BbCommentContentToJson(BbCommentContent instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -224,17 +204,15 @@ Map<String, dynamic> _$BbCommentContentToJson(BbCommentContent instance) =>
|
|||
'html': instance.html,
|
||||
};
|
||||
|
||||
BbComment _$BbCommentFromJson(Map<String, dynamic> json) {
|
||||
return BbComment()
|
||||
..createdOn = json['created_on'] as String?
|
||||
..updatedOn = json['updated_on'] as String?
|
||||
..content = json['content'] == null
|
||||
? null
|
||||
: BbCommentContent.fromJson(json['content'] as Map<String, dynamic>)
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: BbRepoOwner.fromJson(json['user'] as Map<String, dynamic>);
|
||||
}
|
||||
BbComment _$BbCommentFromJson(Map<String, dynamic> json) => BbComment()
|
||||
..createdOn = json['created_on'] as String?
|
||||
..updatedOn = json['updated_on'] as String?
|
||||
..content = json['content'] == null
|
||||
? null
|
||||
: BbCommentContent.fromJson(json['content'] as Map<String, dynamic>)
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: BbRepoOwner.fromJson(json['user'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$BbCommentToJson(BbComment instance) => <String, dynamic>{
|
||||
'created_on': instance.createdOn,
|
||||
|
@ -243,11 +221,9 @@ Map<String, dynamic> _$BbCommentToJson(BbComment instance) => <String, dynamic>{
|
|||
'user': instance.user,
|
||||
};
|
||||
|
||||
BbBranch _$BbBranchFromJson(Map<String, dynamic> json) {
|
||||
return BbBranch()
|
||||
..name = json['name'] as String?
|
||||
..type = json['type'] as String?;
|
||||
}
|
||||
BbBranch _$BbBranchFromJson(Map<String, dynamic> json) => BbBranch()
|
||||
..name = json['name'] as String?
|
||||
..type = json['type'] as String?;
|
||||
|
||||
Map<String, dynamic> _$BbBranchToJson(BbBranch instance) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
|
|
|
@ -1,41 +1,56 @@
|
|||
import 'package:fimber/fimber.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_highlight/theme_map.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
class CodeModel with ChangeNotifier {
|
||||
static var themes = themeMap.keys.toList();
|
||||
static const fontSizes = [12, 13, 14, 15, 16, 17, 18, 19, 20];
|
||||
static const fontFamilies = [
|
||||
static final fontFamilies = [
|
||||
'System',
|
||||
'JetBrains Mono',
|
||||
'Fira Code',
|
||||
'Inconsolata',
|
||||
'PT Mono',
|
||||
'Source Code Pro',
|
||||
'Ubuntu Mono',
|
||||
'Cascadia Code',
|
||||
|
||||
// https://fonts.google.com/?category=Monospace
|
||||
...GoogleFonts.asMap().keys.where((element) =>
|
||||
element.endsWith('Mono') ||
|
||||
[
|
||||
'Inconsolata',
|
||||
'Source Code Pro',
|
||||
'Nanum Gothic Coding',
|
||||
'Cousine',
|
||||
'Anonymous Pro',
|
||||
'Courier Prime',
|
||||
'VT323',
|
||||
'Fira Code'
|
||||
].contains(element)),
|
||||
];
|
||||
|
||||
String _theme = 'vs';
|
||||
String _themeDark = 'vs2015';
|
||||
int _fontSize = 14;
|
||||
String _fontFamily = 'JetBrains Mono';
|
||||
String _fontFamily = 'System';
|
||||
|
||||
String get theme => _theme;
|
||||
String get themeDark => _themeDark;
|
||||
|
||||
int get fontSize => _fontSize;
|
||||
String get fontFamily => _fontFamily;
|
||||
String get fontFamilyUsed =>
|
||||
_fontFamily == 'System' ? CommonStyle.monospace : _fontFamily;
|
||||
TextStyle get fontStyle {
|
||||
if (_fontFamily == 'System') {
|
||||
return TextStyle(
|
||||
fontFamily: CommonStyle.monospace, fontSize: fontSize.toDouble());
|
||||
} else {
|
||||
return GoogleFonts.getFont(_fontFamily, fontSize: fontSize.toDouble());
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> init() async {
|
||||
var prefs = await SharedPreferences.getInstance();
|
||||
var vh = prefs.getString(StorageKeys.codeTheme);
|
||||
var vdh = prefs.getString(StorageKeys.codeThemeDark);
|
||||
var vs = prefs.getInt(StorageKeys.iCodeFontSize);
|
||||
var vf = prefs.getString(StorageKeys.codeFontFamily);
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
final vh = prefs.getString(StorageKeys.codeTheme);
|
||||
final vdh = prefs.getString(StorageKeys.codeThemeDark);
|
||||
final vs = prefs.getInt(StorageKeys.iCodeFontSize);
|
||||
final vf = prefs.getString(StorageKeys.codeFontFamily);
|
||||
|
||||
Fimber.d('read code: $vh, $vs, $vf');
|
||||
if (themeMap.keys.contains(vh)) {
|
||||
|
@ -55,7 +70,7 @@ class CodeModel with ChangeNotifier {
|
|||
}
|
||||
|
||||
setTheme(String v) async {
|
||||
var prefs = await SharedPreferences.getInstance();
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
await prefs.setString(StorageKeys.codeTheme, v);
|
||||
Fimber.d('write code theme: $v');
|
||||
|
@ -65,7 +80,7 @@ class CodeModel with ChangeNotifier {
|
|||
}
|
||||
|
||||
setThemeDark(String v) async {
|
||||
var prefs = await SharedPreferences.getInstance();
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
await prefs.setString(StorageKeys.codeThemeDark, v);
|
||||
Fimber.d('write code theme dark: $v');
|
||||
|
@ -75,7 +90,7 @@ class CodeModel with ChangeNotifier {
|
|||
}
|
||||
|
||||
setFontSize(int v) async {
|
||||
var prefs = await SharedPreferences.getInstance();
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
await prefs.setInt(StorageKeys.iCodeFontSize, v);
|
||||
Fimber.d('write code font size: $v');
|
||||
|
@ -85,7 +100,7 @@ class CodeModel with ChangeNotifier {
|
|||
}
|
||||
|
||||
setFontFamily(String v) async {
|
||||
var prefs = await SharedPreferences.getInstance();
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
await prefs.setString(StorageKeys.codeFontFamily, v);
|
||||
Fimber.d('write code font family: $v');
|
||||
|
|
|
@ -4,18 +4,21 @@ part 'gitea.g.dart';
|
|||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaUser {
|
||||
GiteaUser();
|
||||
factory GiteaUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaUserFromJson(json);
|
||||
int? id;
|
||||
String? login;
|
||||
String? fullName;
|
||||
String? avatarUrl;
|
||||
DateTime? created;
|
||||
GiteaUser();
|
||||
factory GiteaUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaUserFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaOrg {
|
||||
GiteaOrg();
|
||||
factory GiteaOrg.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaOrgFromJson(json);
|
||||
int? id;
|
||||
String? username;
|
||||
String? fullName;
|
||||
|
@ -23,13 +26,13 @@ class GiteaOrg {
|
|||
String? description;
|
||||
String? website;
|
||||
String? location;
|
||||
GiteaOrg();
|
||||
factory GiteaOrg.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaOrgFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaRepository {
|
||||
GiteaRepository();
|
||||
factory GiteaRepository.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaRepositoryFromJson(json);
|
||||
int? id;
|
||||
GiteaUser? owner;
|
||||
String? name;
|
||||
|
@ -41,34 +44,33 @@ class GiteaRepository {
|
|||
int? size;
|
||||
int? openIssuesCount;
|
||||
int? openPrCounter;
|
||||
GiteaRepository();
|
||||
factory GiteaRepository.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaRepositoryFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaTree {
|
||||
GiteaTree({required this.type, required this.name});
|
||||
factory GiteaTree.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaTreeFromJson(json);
|
||||
String type;
|
||||
String name;
|
||||
String? path;
|
||||
int? size;
|
||||
String? downloadUrl;
|
||||
GiteaTree({required this.type, required this.name});
|
||||
factory GiteaTree.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaTreeFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaBlob extends GiteaTree {
|
||||
String? content;
|
||||
GiteaBlob({required String type, required String name})
|
||||
: super(name: name, type: type);
|
||||
GiteaBlob({required super.type, required super.name});
|
||||
factory GiteaBlob.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaBlobFromJson(json);
|
||||
String? content;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaCommit {
|
||||
GiteaCommit();
|
||||
factory GiteaCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaCommitFromJson(json);
|
||||
int? number;
|
||||
GiteaUser? author;
|
||||
String? title;
|
||||
|
@ -76,33 +78,33 @@ class GiteaCommit {
|
|||
GiteaCommitDetail? commit;
|
||||
String? sha;
|
||||
String? htmlUrl;
|
||||
GiteaCommit();
|
||||
factory GiteaCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaCommitFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaCommitDetail {
|
||||
String? message;
|
||||
GiteaCommitAuthor? author;
|
||||
GiteaCommitAuthor? committer;
|
||||
GiteaCommitDetail();
|
||||
factory GiteaCommitDetail.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaCommitDetailFromJson(json);
|
||||
String? message;
|
||||
GiteaCommitAuthor? author;
|
||||
GiteaCommitAuthor? committer;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaCommitAuthor {
|
||||
String? name;
|
||||
String? email;
|
||||
DateTime? date;
|
||||
GiteaCommitAuthor();
|
||||
factory GiteaCommitAuthor.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaCommitAuthorFromJson(json);
|
||||
String? name;
|
||||
String? email;
|
||||
DateTime? date;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaIssue {
|
||||
GiteaIssue();
|
||||
factory GiteaIssue.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaIssueFromJson(json);
|
||||
String? title;
|
||||
String? body;
|
||||
int? number;
|
||||
|
@ -112,31 +114,31 @@ class GiteaIssue {
|
|||
String? state;
|
||||
String? htmlUrl;
|
||||
List<GiteaLabel>? labels;
|
||||
GiteaIssue();
|
||||
factory GiteaIssue.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaIssueFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaLabel {
|
||||
String? color;
|
||||
String? name;
|
||||
GiteaLabel();
|
||||
factory GiteaLabel.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaLabelFromJson(json);
|
||||
String? color;
|
||||
String? name;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaHeatmapItem {
|
||||
int? timestamp;
|
||||
int? contributions;
|
||||
GiteaHeatmapItem();
|
||||
factory GiteaHeatmapItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaHeatmapItemFromJson(json);
|
||||
int? timestamp;
|
||||
int? contributions;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteaComment {
|
||||
GiteaComment();
|
||||
factory GiteaComment.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaCommentFromJson(json);
|
||||
String? body;
|
||||
DateTime? createdAt;
|
||||
String? htmlUrl;
|
||||
|
@ -144,7 +146,4 @@ class GiteaComment {
|
|||
DateTime? updatedAt;
|
||||
int? id;
|
||||
GiteaUser? user;
|
||||
GiteaComment();
|
||||
factory GiteaComment.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteaCommentFromJson(json);
|
||||
}
|
||||
|
|
|
@ -6,16 +6,14 @@ part of 'gitea.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
GiteaUser _$GiteaUserFromJson(Map<String, dynamic> json) {
|
||||
return GiteaUser()
|
||||
..id = json['id'] as int?
|
||||
..login = json['login'] as String?
|
||||
..fullName = json['full_name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..created = json['created'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created'] as String);
|
||||
}
|
||||
GiteaUser _$GiteaUserFromJson(Map<String, dynamic> json) => GiteaUser()
|
||||
..id = json['id'] as int?
|
||||
..login = json['login'] as String?
|
||||
..fullName = json['full_name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..created = json['created'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created'] as String);
|
||||
|
||||
Map<String, dynamic> _$GiteaUserToJson(GiteaUser instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
|
@ -25,16 +23,14 @@ Map<String, dynamic> _$GiteaUserToJson(GiteaUser instance) => <String, dynamic>{
|
|||
'created': instance.created?.toIso8601String(),
|
||||
};
|
||||
|
||||
GiteaOrg _$GiteaOrgFromJson(Map<String, dynamic> json) {
|
||||
return GiteaOrg()
|
||||
..id = json['id'] as int?
|
||||
..username = json['username'] as String?
|
||||
..fullName = json['full_name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..website = json['website'] as String?
|
||||
..location = json['location'] as String?;
|
||||
}
|
||||
GiteaOrg _$GiteaOrgFromJson(Map<String, dynamic> json) => GiteaOrg()
|
||||
..id = json['id'] as int?
|
||||
..username = json['username'] as String?
|
||||
..fullName = json['full_name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..website = json['website'] as String?
|
||||
..location = json['location'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteaOrgToJson(GiteaOrg instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
|
@ -46,24 +42,23 @@ Map<String, dynamic> _$GiteaOrgToJson(GiteaOrg instance) => <String, dynamic>{
|
|||
'location': instance.location,
|
||||
};
|
||||
|
||||
GiteaRepository _$GiteaRepositoryFromJson(Map<String, dynamic> json) {
|
||||
return GiteaRepository()
|
||||
..id = json['id'] as int?
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: GiteaUser.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..name = json['name'] as String?
|
||||
..description = json['description'] as String?
|
||||
..starsCount = json['stars_count'] as int?
|
||||
..forksCount = json['forks_count'] as int?
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..website = json['website'] as String?
|
||||
..size = json['size'] as int?
|
||||
..openIssuesCount = json['open_issues_count'] as int?
|
||||
..openPrCounter = json['open_pr_counter'] as int?;
|
||||
}
|
||||
GiteaRepository _$GiteaRepositoryFromJson(Map<String, dynamic> json) =>
|
||||
GiteaRepository()
|
||||
..id = json['id'] as int?
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: GiteaUser.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..name = json['name'] as String?
|
||||
..description = json['description'] as String?
|
||||
..starsCount = json['stars_count'] as int?
|
||||
..forksCount = json['forks_count'] as int?
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..website = json['website'] as String?
|
||||
..size = json['size'] as int?
|
||||
..openIssuesCount = json['open_issues_count'] as int?
|
||||
..openPrCounter = json['open_pr_counter'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GiteaRepositoryToJson(GiteaRepository instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -80,15 +75,13 @@ Map<String, dynamic> _$GiteaRepositoryToJson(GiteaRepository instance) =>
|
|||
'open_pr_counter': instance.openPrCounter,
|
||||
};
|
||||
|
||||
GiteaTree _$GiteaTreeFromJson(Map<String, dynamic> json) {
|
||||
return GiteaTree(
|
||||
type: json['type'] as String,
|
||||
name: json['name'] as String,
|
||||
)
|
||||
..path = json['path'] as String?
|
||||
..size = json['size'] as int?
|
||||
..downloadUrl = json['download_url'] as String?;
|
||||
}
|
||||
GiteaTree _$GiteaTreeFromJson(Map<String, dynamic> json) => GiteaTree(
|
||||
type: json['type'] as String,
|
||||
name: json['name'] as String,
|
||||
)
|
||||
..path = json['path'] as String?
|
||||
..size = json['size'] as int?
|
||||
..downloadUrl = json['download_url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteaTreeToJson(GiteaTree instance) => <String, dynamic>{
|
||||
'type': instance.type,
|
||||
|
@ -98,16 +91,14 @@ Map<String, dynamic> _$GiteaTreeToJson(GiteaTree instance) => <String, dynamic>{
|
|||
'download_url': instance.downloadUrl,
|
||||
};
|
||||
|
||||
GiteaBlob _$GiteaBlobFromJson(Map<String, dynamic> json) {
|
||||
return GiteaBlob(
|
||||
type: json['type'] as String,
|
||||
name: json['name'] as String,
|
||||
)
|
||||
..path = json['path'] as String?
|
||||
..size = json['size'] as int?
|
||||
..downloadUrl = json['download_url'] as String?
|
||||
..content = json['content'] as String?;
|
||||
}
|
||||
GiteaBlob _$GiteaBlobFromJson(Map<String, dynamic> json) => GiteaBlob(
|
||||
type: json['type'] as String,
|
||||
name: json['name'] as String,
|
||||
)
|
||||
..path = json['path'] as String?
|
||||
..size = json['size'] as int?
|
||||
..downloadUrl = json['download_url'] as String?
|
||||
..content = json['content'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteaBlobToJson(GiteaBlob instance) => <String, dynamic>{
|
||||
'type': instance.type,
|
||||
|
@ -118,20 +109,18 @@ Map<String, dynamic> _$GiteaBlobToJson(GiteaBlob instance) => <String, dynamic>{
|
|||
'content': instance.content,
|
||||
};
|
||||
|
||||
GiteaCommit _$GiteaCommitFromJson(Map<String, dynamic> json) {
|
||||
return GiteaCommit()
|
||||
..number = json['number'] as int?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GiteaUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..title = json['title'] as String?
|
||||
..body = json['body'] as String?
|
||||
..commit = json['commit'] == null
|
||||
? null
|
||||
: GiteaCommitDetail.fromJson(json['commit'] as Map<String, dynamic>)
|
||||
..sha = json['sha'] as String?
|
||||
..htmlUrl = json['html_url'] as String?;
|
||||
}
|
||||
GiteaCommit _$GiteaCommitFromJson(Map<String, dynamic> json) => GiteaCommit()
|
||||
..number = json['number'] as int?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GiteaUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..title = json['title'] as String?
|
||||
..body = json['body'] as String?
|
||||
..commit = json['commit'] == null
|
||||
? null
|
||||
: GiteaCommitDetail.fromJson(json['commit'] as Map<String, dynamic>)
|
||||
..sha = json['sha'] as String?
|
||||
..htmlUrl = json['html_url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteaCommitToJson(GiteaCommit instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -144,16 +133,16 @@ Map<String, dynamic> _$GiteaCommitToJson(GiteaCommit instance) =>
|
|||
'html_url': instance.htmlUrl,
|
||||
};
|
||||
|
||||
GiteaCommitDetail _$GiteaCommitDetailFromJson(Map<String, dynamic> json) {
|
||||
return GiteaCommitDetail()
|
||||
..message = json['message'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GiteaCommitAuthor.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..committer = json['committer'] == null
|
||||
? null
|
||||
: GiteaCommitAuthor.fromJson(json['committer'] as Map<String, dynamic>);
|
||||
}
|
||||
GiteaCommitDetail _$GiteaCommitDetailFromJson(Map<String, dynamic> json) =>
|
||||
GiteaCommitDetail()
|
||||
..message = json['message'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GiteaCommitAuthor.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..committer = json['committer'] == null
|
||||
? null
|
||||
: GiteaCommitAuthor.fromJson(
|
||||
json['committer'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GiteaCommitDetailToJson(GiteaCommitDetail instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -162,13 +151,12 @@ Map<String, dynamic> _$GiteaCommitDetailToJson(GiteaCommitDetail instance) =>
|
|||
'committer': instance.committer,
|
||||
};
|
||||
|
||||
GiteaCommitAuthor _$GiteaCommitAuthorFromJson(Map<String, dynamic> json) {
|
||||
return GiteaCommitAuthor()
|
||||
..name = json['name'] as String?
|
||||
..email = json['email'] as String?
|
||||
..date =
|
||||
json['date'] == null ? null : DateTime.parse(json['date'] as String);
|
||||
}
|
||||
GiteaCommitAuthor _$GiteaCommitAuthorFromJson(Map<String, dynamic> json) =>
|
||||
GiteaCommitAuthor()
|
||||
..name = json['name'] as String?
|
||||
..email = json['email'] as String?
|
||||
..date =
|
||||
json['date'] == null ? null : DateTime.parse(json['date'] as String);
|
||||
|
||||
Map<String, dynamic> _$GiteaCommitAuthorToJson(GiteaCommitAuthor instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -177,24 +165,22 @@ Map<String, dynamic> _$GiteaCommitAuthorToJson(GiteaCommitAuthor instance) =>
|
|||
'date': instance.date?.toIso8601String(),
|
||||
};
|
||||
|
||||
GiteaIssue _$GiteaIssueFromJson(Map<String, dynamic> json) {
|
||||
return GiteaIssue()
|
||||
..title = json['title'] as String?
|
||||
..body = json['body'] as String?
|
||||
..number = json['number'] as int?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GiteaUser.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..comments = json['comments'] as int?
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..state = json['state'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..labels = (json['labels'] as List<dynamic>?)
|
||||
?.map((e) => GiteaLabel.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
}
|
||||
GiteaIssue _$GiteaIssueFromJson(Map<String, dynamic> json) => GiteaIssue()
|
||||
..title = json['title'] as String?
|
||||
..body = json['body'] as String?
|
||||
..number = json['number'] as int?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GiteaUser.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..comments = json['comments'] as int?
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..state = json['state'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..labels = (json['labels'] as List<dynamic>?)
|
||||
?.map((e) => GiteaLabel.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
|
||||
Map<String, dynamic> _$GiteaIssueToJson(GiteaIssue instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -209,11 +195,9 @@ Map<String, dynamic> _$GiteaIssueToJson(GiteaIssue instance) =>
|
|||
'labels': instance.labels,
|
||||
};
|
||||
|
||||
GiteaLabel _$GiteaLabelFromJson(Map<String, dynamic> json) {
|
||||
return GiteaLabel()
|
||||
..color = json['color'] as String?
|
||||
..name = json['name'] as String?;
|
||||
}
|
||||
GiteaLabel _$GiteaLabelFromJson(Map<String, dynamic> json) => GiteaLabel()
|
||||
..color = json['color'] as String?
|
||||
..name = json['name'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteaLabelToJson(GiteaLabel instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -221,11 +205,10 @@ Map<String, dynamic> _$GiteaLabelToJson(GiteaLabel instance) =>
|
|||
'name': instance.name,
|
||||
};
|
||||
|
||||
GiteaHeatmapItem _$GiteaHeatmapItemFromJson(Map<String, dynamic> json) {
|
||||
return GiteaHeatmapItem()
|
||||
..timestamp = json['timestamp'] as int?
|
||||
..contributions = json['contributions'] as int?;
|
||||
}
|
||||
GiteaHeatmapItem _$GiteaHeatmapItemFromJson(Map<String, dynamic> json) =>
|
||||
GiteaHeatmapItem()
|
||||
..timestamp = json['timestamp'] as int?
|
||||
..contributions = json['contributions'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GiteaHeatmapItemToJson(GiteaHeatmapItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -233,22 +216,20 @@ Map<String, dynamic> _$GiteaHeatmapItemToJson(GiteaHeatmapItem instance) =>
|
|||
'contributions': instance.contributions,
|
||||
};
|
||||
|
||||
GiteaComment _$GiteaCommentFromJson(Map<String, dynamic> json) {
|
||||
return GiteaComment()
|
||||
..body = json['body'] as String?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..originalAuthor = json['original_author'] as String?
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..id = json['id'] as int?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GiteaUser.fromJson(json['user'] as Map<String, dynamic>);
|
||||
}
|
||||
GiteaComment _$GiteaCommentFromJson(Map<String, dynamic> json) => GiteaComment()
|
||||
..body = json['body'] as String?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..originalAuthor = json['original_author'] as String?
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..id = json['id'] as int?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GiteaUser.fromJson(json['user'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GiteaCommentToJson(GiteaComment instance) =>
|
||||
<String, dynamic>{
|
||||
|
|
|
@ -4,6 +4,9 @@ part 'gitee.g.dart';
|
|||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeUser {
|
||||
GiteeUser();
|
||||
factory GiteeUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeUserFromJson(json);
|
||||
String? login;
|
||||
String? avatarUrl;
|
||||
String? name;
|
||||
|
@ -16,24 +19,24 @@ class GiteeUser {
|
|||
int? stared;
|
||||
int? watched;
|
||||
DateTime? createdAt;
|
||||
GiteeUser();
|
||||
factory GiteeUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeUserFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeListUser {
|
||||
GiteeListUser();
|
||||
factory GiteeListUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeListUserFromJson(json);
|
||||
String? login;
|
||||
String? avatarUrl;
|
||||
String? name;
|
||||
String? htmlUrl;
|
||||
GiteeListUser();
|
||||
factory GiteeListUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeListUserFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeRepo {
|
||||
GiteeRepo();
|
||||
factory GiteeRepo.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeRepoFromJson(json);
|
||||
GiteeRepoNamespace? namespace;
|
||||
GiteeRepoOwner? owner;
|
||||
String? path;
|
||||
|
@ -51,90 +54,90 @@ class GiteeRepo {
|
|||
int? openIssuesCount;
|
||||
bool? pullRequestsEnabled;
|
||||
String? defaultBranch;
|
||||
GiteeRepo();
|
||||
factory GiteeRepo.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeRepoFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeRepoOwner {
|
||||
String? login;
|
||||
String? avatarUrl;
|
||||
GiteeRepoOwner();
|
||||
factory GiteeRepoOwner.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeRepoOwnerFromJson(json);
|
||||
String? login;
|
||||
String? avatarUrl;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeRepoNamespace {
|
||||
String? path;
|
||||
GiteeRepoNamespace();
|
||||
factory GiteeRepoNamespace.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeRepoNamespaceFromJson(json);
|
||||
String? path;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeCommit {
|
||||
GiteeCommit();
|
||||
factory GiteeCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeCommitFromJson(json);
|
||||
GiteeUser? author;
|
||||
GiteeCommitDetail? commit;
|
||||
String? sha;
|
||||
String? htmlUrl;
|
||||
List<GiteeCommitFile>? files;
|
||||
GiteeCommit();
|
||||
factory GiteeCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeCommitFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeCommitDetail {
|
||||
String? message;
|
||||
GiteeCommitAuthor? author;
|
||||
GiteeCommitAuthor? committer;
|
||||
GiteeCommitDetail();
|
||||
factory GiteeCommitDetail.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeCommitDetailFromJson(json);
|
||||
String? message;
|
||||
GiteeCommitAuthor? author;
|
||||
GiteeCommitAuthor? committer;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeCommitAuthor {
|
||||
String? name;
|
||||
String? email;
|
||||
DateTime? date;
|
||||
GiteeCommitAuthor();
|
||||
factory GiteeCommitAuthor.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeCommitAuthorFromJson(json);
|
||||
String? name;
|
||||
String? email;
|
||||
DateTime? date;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeTreeItem {
|
||||
GiteeTreeItem({required this.path, required this.type});
|
||||
factory GiteeTreeItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeTreeItemFromJson(json);
|
||||
String path;
|
||||
String type;
|
||||
String? sha;
|
||||
int? size;
|
||||
GiteeTreeItem({required this.path, required this.type});
|
||||
factory GiteeTreeItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeTreeItemFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeBlob {
|
||||
String? content;
|
||||
GiteeBlob();
|
||||
factory GiteeBlob.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeBlobFromJson(json);
|
||||
String? content;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeLabel {
|
||||
String? color;
|
||||
String? name;
|
||||
GiteeLabel();
|
||||
factory GiteeLabel.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeLabelFromJson(json);
|
||||
String? color;
|
||||
String? name;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeIssue {
|
||||
GiteeIssue();
|
||||
factory GiteeIssue.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeIssueFromJson(json);
|
||||
int? comments;
|
||||
String? commentsUrl;
|
||||
String? createdAt;
|
||||
|
@ -149,13 +152,13 @@ class GiteeIssue {
|
|||
String? number;
|
||||
List<GiteeLabel>? labels;
|
||||
int? id;
|
||||
GiteeIssue();
|
||||
factory GiteeIssue.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeIssueFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteePull {
|
||||
GiteePull();
|
||||
factory GiteePull.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteePullFromJson(json);
|
||||
String? commentsUrl;
|
||||
String? createdAt;
|
||||
String? htmlUrl;
|
||||
|
@ -168,34 +171,34 @@ class GiteePull {
|
|||
List<GiteeLabel>? labels;
|
||||
int? number;
|
||||
int? id;
|
||||
GiteePull();
|
||||
factory GiteePull.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteePullFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeComment {
|
||||
GiteeComment();
|
||||
factory GiteeComment.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeCommentFromJson(json);
|
||||
int? id;
|
||||
String? body;
|
||||
String? createdAt;
|
||||
GiteeRepoOwner? user;
|
||||
GiteeComment();
|
||||
factory GiteeComment.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeCommentFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteePatch {
|
||||
String? diff;
|
||||
GiteePatch();
|
||||
factory GiteePatch.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteePatchFromJson(json);
|
||||
String? diff;
|
||||
}
|
||||
|
||||
// Two different classes because of variable type mismatch
|
||||
// for additions, deletions, patch
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteePullFile {
|
||||
GiteePullFile();
|
||||
factory GiteePullFile.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteePullFileFromJson(json);
|
||||
String? additions;
|
||||
String? deletions;
|
||||
String? blobUrl;
|
||||
|
@ -203,13 +206,13 @@ class GiteePullFile {
|
|||
String? sha;
|
||||
String? status;
|
||||
GiteePatch? patch;
|
||||
GiteePullFile();
|
||||
factory GiteePullFile.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteePullFileFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeCommitFile {
|
||||
GiteeCommitFile();
|
||||
factory GiteeCommitFile.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeCommitFileFromJson(json);
|
||||
int? additions;
|
||||
int? deletions;
|
||||
int? changes;
|
||||
|
@ -218,24 +221,21 @@ class GiteeCommitFile {
|
|||
String? sha;
|
||||
String? status;
|
||||
String? patch;
|
||||
GiteeCommitFile();
|
||||
factory GiteeCommitFile.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeCommitFileFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeContributor {
|
||||
String? name;
|
||||
int? contributions;
|
||||
GiteeContributor();
|
||||
factory GiteeContributor.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeContributorFromJson(json);
|
||||
String? name;
|
||||
int? contributions;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GiteeBranch {
|
||||
String? name;
|
||||
GiteeBranch();
|
||||
factory GiteeBranch.fromJson(Map<String, dynamic> json) =>
|
||||
_$GiteeBranchFromJson(json);
|
||||
String? name;
|
||||
}
|
||||
|
|
|
@ -6,23 +6,21 @@ part of 'gitee.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
GiteeUser _$GiteeUserFromJson(Map<String, dynamic> json) {
|
||||
return GiteeUser()
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..name = json['name'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..bio = json['bio'] as String?
|
||||
..blog = json['blog'] as String?
|
||||
..publicRepos = json['public_repos'] as int?
|
||||
..followers = json['followers'] as int?
|
||||
..following = json['following'] as int?
|
||||
..stared = json['stared'] as int?
|
||||
..watched = json['watched'] as int?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String);
|
||||
}
|
||||
GiteeUser _$GiteeUserFromJson(Map<String, dynamic> json) => GiteeUser()
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..name = json['name'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..bio = json['bio'] as String?
|
||||
..blog = json['blog'] as String?
|
||||
..publicRepos = json['public_repos'] as int?
|
||||
..followers = json['followers'] as int?
|
||||
..following = json['following'] as int?
|
||||
..stared = json['stared'] as int?
|
||||
..watched = json['watched'] as int?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String);
|
||||
|
||||
Map<String, dynamic> _$GiteeUserToJson(GiteeUser instance) => <String, dynamic>{
|
||||
'login': instance.login,
|
||||
|
@ -39,13 +37,12 @@ Map<String, dynamic> _$GiteeUserToJson(GiteeUser instance) => <String, dynamic>{
|
|||
'created_at': instance.createdAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
GiteeListUser _$GiteeListUserFromJson(Map<String, dynamic> json) {
|
||||
return GiteeListUser()
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..name = json['name'] as String?
|
||||
..htmlUrl = json['html_url'] as String?;
|
||||
}
|
||||
GiteeListUser _$GiteeListUserFromJson(Map<String, dynamic> json) =>
|
||||
GiteeListUser()
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..name = json['name'] as String?
|
||||
..htmlUrl = json['html_url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteeListUserToJson(GiteeListUser instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -55,32 +52,30 @@ Map<String, dynamic> _$GiteeListUserToJson(GiteeListUser instance) =>
|
|||
'html_url': instance.htmlUrl,
|
||||
};
|
||||
|
||||
GiteeRepo _$GiteeRepoFromJson(Map<String, dynamic> json) {
|
||||
return GiteeRepo()
|
||||
..namespace = json['namespace'] == null
|
||||
? null
|
||||
: GiteeRepoNamespace.fromJson(json['namespace'] as Map<String, dynamic>)
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: GiteeRepoOwner.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..path = json['path'] as String?
|
||||
..description = json['description'] as String?
|
||||
..private = json['private'] as bool?
|
||||
..public = json['public'] as bool?
|
||||
..internal = json['internal'] as bool?
|
||||
..fork = json['fork'] as bool?
|
||||
..forksCount = json['forks_count'] as int?
|
||||
..stargazersCount = json['stargazers_count'] as int?
|
||||
..watchersCount = json['watchers_count'] as int?
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..license = json['license'] as String?
|
||||
..homepage = json['homepage'] as String?
|
||||
..openIssuesCount = json['open_issues_count'] as int?
|
||||
..pullRequestsEnabled = json['pull_requests_enabled'] as bool?
|
||||
..defaultBranch = json['default_branch'] as String?;
|
||||
}
|
||||
GiteeRepo _$GiteeRepoFromJson(Map<String, dynamic> json) => GiteeRepo()
|
||||
..namespace = json['namespace'] == null
|
||||
? null
|
||||
: GiteeRepoNamespace.fromJson(json['namespace'] as Map<String, dynamic>)
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: GiteeRepoOwner.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..path = json['path'] as String?
|
||||
..description = json['description'] as String?
|
||||
..private = json['private'] as bool?
|
||||
..public = json['public'] as bool?
|
||||
..internal = json['internal'] as bool?
|
||||
..fork = json['fork'] as bool?
|
||||
..forksCount = json['forks_count'] as int?
|
||||
..stargazersCount = json['stargazers_count'] as int?
|
||||
..watchersCount = json['watchers_count'] as int?
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..license = json['license'] as String?
|
||||
..homepage = json['homepage'] as String?
|
||||
..openIssuesCount = json['open_issues_count'] as int?
|
||||
..pullRequestsEnabled = json['pull_requests_enabled'] as bool?
|
||||
..defaultBranch = json['default_branch'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteeRepoToJson(GiteeRepo instance) => <String, dynamic>{
|
||||
'namespace': instance.namespace,
|
||||
|
@ -102,11 +97,10 @@ Map<String, dynamic> _$GiteeRepoToJson(GiteeRepo instance) => <String, dynamic>{
|
|||
'default_branch': instance.defaultBranch,
|
||||
};
|
||||
|
||||
GiteeRepoOwner _$GiteeRepoOwnerFromJson(Map<String, dynamic> json) {
|
||||
return GiteeRepoOwner()
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?;
|
||||
}
|
||||
GiteeRepoOwner _$GiteeRepoOwnerFromJson(Map<String, dynamic> json) =>
|
||||
GiteeRepoOwner()
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteeRepoOwnerToJson(GiteeRepoOwner instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -114,29 +108,26 @@ Map<String, dynamic> _$GiteeRepoOwnerToJson(GiteeRepoOwner instance) =>
|
|||
'avatar_url': instance.avatarUrl,
|
||||
};
|
||||
|
||||
GiteeRepoNamespace _$GiteeRepoNamespaceFromJson(Map<String, dynamic> json) {
|
||||
return GiteeRepoNamespace()..path = json['path'] as String?;
|
||||
}
|
||||
GiteeRepoNamespace _$GiteeRepoNamespaceFromJson(Map<String, dynamic> json) =>
|
||||
GiteeRepoNamespace()..path = json['path'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteeRepoNamespaceToJson(GiteeRepoNamespace instance) =>
|
||||
<String, dynamic>{
|
||||
'path': instance.path,
|
||||
};
|
||||
|
||||
GiteeCommit _$GiteeCommitFromJson(Map<String, dynamic> json) {
|
||||
return GiteeCommit()
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GiteeUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..commit = json['commit'] == null
|
||||
? null
|
||||
: GiteeCommitDetail.fromJson(json['commit'] as Map<String, dynamic>)
|
||||
..sha = json['sha'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..files = (json['files'] as List<dynamic>?)
|
||||
?.map((e) => GiteeCommitFile.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
}
|
||||
GiteeCommit _$GiteeCommitFromJson(Map<String, dynamic> json) => GiteeCommit()
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GiteeUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..commit = json['commit'] == null
|
||||
? null
|
||||
: GiteeCommitDetail.fromJson(json['commit'] as Map<String, dynamic>)
|
||||
..sha = json['sha'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..files = (json['files'] as List<dynamic>?)
|
||||
?.map((e) => GiteeCommitFile.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
|
||||
Map<String, dynamic> _$GiteeCommitToJson(GiteeCommit instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -147,16 +138,16 @@ Map<String, dynamic> _$GiteeCommitToJson(GiteeCommit instance) =>
|
|||
'files': instance.files,
|
||||
};
|
||||
|
||||
GiteeCommitDetail _$GiteeCommitDetailFromJson(Map<String, dynamic> json) {
|
||||
return GiteeCommitDetail()
|
||||
..message = json['message'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GiteeCommitAuthor.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..committer = json['committer'] == null
|
||||
? null
|
||||
: GiteeCommitAuthor.fromJson(json['committer'] as Map<String, dynamic>);
|
||||
}
|
||||
GiteeCommitDetail _$GiteeCommitDetailFromJson(Map<String, dynamic> json) =>
|
||||
GiteeCommitDetail()
|
||||
..message = json['message'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GiteeCommitAuthor.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..committer = json['committer'] == null
|
||||
? null
|
||||
: GiteeCommitAuthor.fromJson(
|
||||
json['committer'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GiteeCommitDetailToJson(GiteeCommitDetail instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -165,13 +156,12 @@ Map<String, dynamic> _$GiteeCommitDetailToJson(GiteeCommitDetail instance) =>
|
|||
'committer': instance.committer,
|
||||
};
|
||||
|
||||
GiteeCommitAuthor _$GiteeCommitAuthorFromJson(Map<String, dynamic> json) {
|
||||
return GiteeCommitAuthor()
|
||||
..name = json['name'] as String?
|
||||
..email = json['email'] as String?
|
||||
..date =
|
||||
json['date'] == null ? null : DateTime.parse(json['date'] as String);
|
||||
}
|
||||
GiteeCommitAuthor _$GiteeCommitAuthorFromJson(Map<String, dynamic> json) =>
|
||||
GiteeCommitAuthor()
|
||||
..name = json['name'] as String?
|
||||
..email = json['email'] as String?
|
||||
..date =
|
||||
json['date'] == null ? null : DateTime.parse(json['date'] as String);
|
||||
|
||||
Map<String, dynamic> _$GiteeCommitAuthorToJson(GiteeCommitAuthor instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -180,14 +170,13 @@ Map<String, dynamic> _$GiteeCommitAuthorToJson(GiteeCommitAuthor instance) =>
|
|||
'date': instance.date?.toIso8601String(),
|
||||
};
|
||||
|
||||
GiteeTreeItem _$GiteeTreeItemFromJson(Map<String, dynamic> json) {
|
||||
return GiteeTreeItem(
|
||||
path: json['path'] as String,
|
||||
type: json['type'] as String,
|
||||
)
|
||||
..sha = json['sha'] as String?
|
||||
..size = json['size'] as int?;
|
||||
}
|
||||
GiteeTreeItem _$GiteeTreeItemFromJson(Map<String, dynamic> json) =>
|
||||
GiteeTreeItem(
|
||||
path: json['path'] as String,
|
||||
type: json['type'] as String,
|
||||
)
|
||||
..sha = json['sha'] as String?
|
||||
..size = json['size'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GiteeTreeItemToJson(GiteeTreeItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -197,19 +186,16 @@ Map<String, dynamic> _$GiteeTreeItemToJson(GiteeTreeItem instance) =>
|
|||
'size': instance.size,
|
||||
};
|
||||
|
||||
GiteeBlob _$GiteeBlobFromJson(Map<String, dynamic> json) {
|
||||
return GiteeBlob()..content = json['content'] as String?;
|
||||
}
|
||||
GiteeBlob _$GiteeBlobFromJson(Map<String, dynamic> json) =>
|
||||
GiteeBlob()..content = json['content'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteeBlobToJson(GiteeBlob instance) => <String, dynamic>{
|
||||
'content': instance.content,
|
||||
};
|
||||
|
||||
GiteeLabel _$GiteeLabelFromJson(Map<String, dynamic> json) {
|
||||
return GiteeLabel()
|
||||
..color = json['color'] as String?
|
||||
..name = json['name'] as String?;
|
||||
}
|
||||
GiteeLabel _$GiteeLabelFromJson(Map<String, dynamic> json) => GiteeLabel()
|
||||
..color = json['color'] as String?
|
||||
..name = json['name'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteeLabelToJson(GiteeLabel instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -217,29 +203,27 @@ Map<String, dynamic> _$GiteeLabelToJson(GiteeLabel instance) =>
|
|||
'name': instance.name,
|
||||
};
|
||||
|
||||
GiteeIssue _$GiteeIssueFromJson(Map<String, dynamic> json) {
|
||||
return GiteeIssue()
|
||||
..comments = json['comments'] as int?
|
||||
..commentsUrl = json['comments_url'] as String?
|
||||
..createdAt = json['created_at'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..updatedAt = json['updated_at'] as String?
|
||||
..body = json['body'] as String?
|
||||
..bodyHtml = json['body_html'] as String?
|
||||
..title = json['title'] as String?
|
||||
..state = json['state'] as String?
|
||||
..repository = json['repository'] == null
|
||||
? null
|
||||
: GiteeRepo.fromJson(json['repository'] as Map<String, dynamic>)
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GiteeRepoOwner.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..number = json['number'] as String?
|
||||
..labels = (json['labels'] as List<dynamic>?)
|
||||
?.map((e) => GiteeLabel.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..id = json['id'] as int?;
|
||||
}
|
||||
GiteeIssue _$GiteeIssueFromJson(Map<String, dynamic> json) => GiteeIssue()
|
||||
..comments = json['comments'] as int?
|
||||
..commentsUrl = json['comments_url'] as String?
|
||||
..createdAt = json['created_at'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..updatedAt = json['updated_at'] as String?
|
||||
..body = json['body'] as String?
|
||||
..bodyHtml = json['body_html'] as String?
|
||||
..title = json['title'] as String?
|
||||
..state = json['state'] as String?
|
||||
..repository = json['repository'] == null
|
||||
? null
|
||||
: GiteeRepo.fromJson(json['repository'] as Map<String, dynamic>)
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GiteeRepoOwner.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..number = json['number'] as String?
|
||||
..labels = (json['labels'] as List<dynamic>?)
|
||||
?.map((e) => GiteeLabel.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..id = json['id'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GiteeIssueToJson(GiteeIssue instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -259,25 +243,23 @@ Map<String, dynamic> _$GiteeIssueToJson(GiteeIssue instance) =>
|
|||
'id': instance.id,
|
||||
};
|
||||
|
||||
GiteePull _$GiteePullFromJson(Map<String, dynamic> json) {
|
||||
return GiteePull()
|
||||
..commentsUrl = json['comments_url'] as String?
|
||||
..createdAt = json['created_at'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..updatedAt = json['updated_at'] as String?
|
||||
..body = json['body'] as String?
|
||||
..bodyHtml = json['body_html'] as String?
|
||||
..title = json['title'] as String?
|
||||
..state = json['state'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GiteeRepoOwner.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..labels = (json['labels'] as List<dynamic>?)
|
||||
?.map((e) => GiteeLabel.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..number = json['number'] as int?
|
||||
..id = json['id'] as int?;
|
||||
}
|
||||
GiteePull _$GiteePullFromJson(Map<String, dynamic> json) => GiteePull()
|
||||
..commentsUrl = json['comments_url'] as String?
|
||||
..createdAt = json['created_at'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..updatedAt = json['updated_at'] as String?
|
||||
..body = json['body'] as String?
|
||||
..bodyHtml = json['body_html'] as String?
|
||||
..title = json['title'] as String?
|
||||
..state = json['state'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GiteeRepoOwner.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..labels = (json['labels'] as List<dynamic>?)
|
||||
?.map((e) => GiteeLabel.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..number = json['number'] as int?
|
||||
..id = json['id'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GiteePullToJson(GiteePull instance) => <String, dynamic>{
|
||||
'comments_url': instance.commentsUrl,
|
||||
|
@ -294,15 +276,13 @@ Map<String, dynamic> _$GiteePullToJson(GiteePull instance) => <String, dynamic>{
|
|||
'id': instance.id,
|
||||
};
|
||||
|
||||
GiteeComment _$GiteeCommentFromJson(Map<String, dynamic> json) {
|
||||
return GiteeComment()
|
||||
..id = json['id'] as int?
|
||||
..body = json['body'] as String?
|
||||
..createdAt = json['created_at'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GiteeRepoOwner.fromJson(json['user'] as Map<String, dynamic>);
|
||||
}
|
||||
GiteeComment _$GiteeCommentFromJson(Map<String, dynamic> json) => GiteeComment()
|
||||
..id = json['id'] as int?
|
||||
..body = json['body'] as String?
|
||||
..createdAt = json['created_at'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GiteeRepoOwner.fromJson(json['user'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GiteeCommentToJson(GiteeComment instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -312,27 +292,25 @@ Map<String, dynamic> _$GiteeCommentToJson(GiteeComment instance) =>
|
|||
'user': instance.user,
|
||||
};
|
||||
|
||||
GiteePatch _$GiteePatchFromJson(Map<String, dynamic> json) {
|
||||
return GiteePatch()..diff = json['diff'] as String?;
|
||||
}
|
||||
GiteePatch _$GiteePatchFromJson(Map<String, dynamic> json) =>
|
||||
GiteePatch()..diff = json['diff'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteePatchToJson(GiteePatch instance) =>
|
||||
<String, dynamic>{
|
||||
'diff': instance.diff,
|
||||
};
|
||||
|
||||
GiteePullFile _$GiteePullFileFromJson(Map<String, dynamic> json) {
|
||||
return GiteePullFile()
|
||||
..additions = json['additions'] as String?
|
||||
..deletions = json['deletions'] as String?
|
||||
..blobUrl = json['blob_url'] as String?
|
||||
..filename = json['filename'] as String?
|
||||
..sha = json['sha'] as String?
|
||||
..status = json['status'] as String?
|
||||
..patch = json['patch'] == null
|
||||
? null
|
||||
: GiteePatch.fromJson(json['patch'] as Map<String, dynamic>);
|
||||
}
|
||||
GiteePullFile _$GiteePullFileFromJson(Map<String, dynamic> json) =>
|
||||
GiteePullFile()
|
||||
..additions = json['additions'] as String?
|
||||
..deletions = json['deletions'] as String?
|
||||
..blobUrl = json['blob_url'] as String?
|
||||
..filename = json['filename'] as String?
|
||||
..sha = json['sha'] as String?
|
||||
..status = json['status'] as String?
|
||||
..patch = json['patch'] == null
|
||||
? null
|
||||
: GiteePatch.fromJson(json['patch'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GiteePullFileToJson(GiteePullFile instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -345,17 +323,16 @@ Map<String, dynamic> _$GiteePullFileToJson(GiteePullFile instance) =>
|
|||
'patch': instance.patch,
|
||||
};
|
||||
|
||||
GiteeCommitFile _$GiteeCommitFileFromJson(Map<String, dynamic> json) {
|
||||
return GiteeCommitFile()
|
||||
..additions = json['additions'] as int?
|
||||
..deletions = json['deletions'] as int?
|
||||
..changes = json['changes'] as int?
|
||||
..blobUrl = json['blob_url'] as String?
|
||||
..filename = json['filename'] as String?
|
||||
..sha = json['sha'] as String?
|
||||
..status = json['status'] as String?
|
||||
..patch = json['patch'] as String?;
|
||||
}
|
||||
GiteeCommitFile _$GiteeCommitFileFromJson(Map<String, dynamic> json) =>
|
||||
GiteeCommitFile()
|
||||
..additions = json['additions'] as int?
|
||||
..deletions = json['deletions'] as int?
|
||||
..changes = json['changes'] as int?
|
||||
..blobUrl = json['blob_url'] as String?
|
||||
..filename = json['filename'] as String?
|
||||
..sha = json['sha'] as String?
|
||||
..status = json['status'] as String?
|
||||
..patch = json['patch'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteeCommitFileToJson(GiteeCommitFile instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -369,11 +346,10 @@ Map<String, dynamic> _$GiteeCommitFileToJson(GiteeCommitFile instance) =>
|
|||
'patch': instance.patch,
|
||||
};
|
||||
|
||||
GiteeContributor _$GiteeContributorFromJson(Map<String, dynamic> json) {
|
||||
return GiteeContributor()
|
||||
..name = json['name'] as String?
|
||||
..contributions = json['contributions'] as int?;
|
||||
}
|
||||
GiteeContributor _$GiteeContributorFromJson(Map<String, dynamic> json) =>
|
||||
GiteeContributor()
|
||||
..name = json['name'] as String?
|
||||
..contributions = json['contributions'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GiteeContributorToJson(GiteeContributor instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -381,9 +357,8 @@ Map<String, dynamic> _$GiteeContributorToJson(GiteeContributor instance) =>
|
|||
'contributions': instance.contributions,
|
||||
};
|
||||
|
||||
GiteeBranch _$GiteeBranchFromJson(Map<String, dynamic> json) {
|
||||
return GiteeBranch()..name = json['name'] as String?;
|
||||
}
|
||||
GiteeBranch _$GiteeBranchFromJson(Map<String, dynamic> json) =>
|
||||
GiteeBranch()..name = json['name'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GiteeBranchToJson(GiteeBranch instance) =>
|
||||
<String, dynamic>{
|
||||
|
|
|
@ -6,6 +6,10 @@ part 'github.g.dart';
|
|||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubEvent {
|
||||
GithubEvent();
|
||||
|
||||
factory GithubEvent.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventFromJson(json);
|
||||
GithubEventUser? actor;
|
||||
String? type;
|
||||
GithubEventRepo? repo;
|
||||
|
@ -14,48 +18,41 @@ class GithubEvent {
|
|||
|
||||
Tuple2<String, String>? _repo;
|
||||
String get repoOwner {
|
||||
if (_repo == null) {
|
||||
_repo = parseRepositoryFullName(repo!.name!);
|
||||
}
|
||||
_repo ??= parseRepositoryFullName(repo!.name!);
|
||||
return _repo!.item1;
|
||||
}
|
||||
|
||||
String get repoName {
|
||||
if (_repo == null) {
|
||||
_repo = parseRepositoryFullName(repo!.name!);
|
||||
}
|
||||
_repo ??= parseRepositoryFullName(repo!.name!);
|
||||
return _repo!.item2;
|
||||
}
|
||||
|
||||
GithubEvent();
|
||||
|
||||
factory GithubEvent.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubEventUser {
|
||||
String? login;
|
||||
String? avatarUrl;
|
||||
|
||||
GithubEventUser();
|
||||
|
||||
factory GithubEventUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventUserFromJson(json);
|
||||
String? login;
|
||||
String? avatarUrl;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubEventRepo {
|
||||
String? name;
|
||||
|
||||
GithubEventRepo();
|
||||
|
||||
factory GithubEventRepo.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventRepoFromJson(json);
|
||||
String? name;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubEventPayload {
|
||||
GithubEventPayload();
|
||||
|
||||
factory GithubEventPayload.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventPayloadFromJson(json);
|
||||
GithubEventIssue? issue;
|
||||
GithubEventIssue? pullRequest;
|
||||
GithubEventComment? comment;
|
||||
|
@ -76,14 +73,14 @@ class GithubEventPayload {
|
|||
GithubCheckrunItem? checkRun;
|
||||
GithubCheckSuiteItem? checkSuite;
|
||||
GithubContentReferenceItem? contentReference;
|
||||
GithubEventPayload();
|
||||
|
||||
factory GithubEventPayload.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventPayloadFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubEventIssue {
|
||||
GithubEventIssue();
|
||||
|
||||
factory GithubEventIssue.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventIssueFromJson(json);
|
||||
String? title;
|
||||
GithubEventUser? user;
|
||||
int? number;
|
||||
|
@ -95,51 +92,47 @@ class GithubEventIssue {
|
|||
DateTime? createdAt;
|
||||
|
||||
bool get isPullRequestComment => pullRequest != null;
|
||||
|
||||
GithubEventIssue();
|
||||
|
||||
factory GithubEventIssue.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventIssueFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubEventComment {
|
||||
String? body;
|
||||
GithubEventUser? user;
|
||||
String? commitId;
|
||||
String? htmlUrl;
|
||||
|
||||
GithubEventComment();
|
||||
|
||||
factory GithubEventComment.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventCommentFromJson(json);
|
||||
String? body;
|
||||
GithubEventUser? user;
|
||||
String? commitId;
|
||||
String? htmlUrl;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubEventCommit {
|
||||
String? sha;
|
||||
String? message;
|
||||
|
||||
GithubEventCommit();
|
||||
|
||||
factory GithubEventCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventCommitFromJson(json);
|
||||
String? sha;
|
||||
String? message;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubEventRelease {
|
||||
String? htmlUrl;
|
||||
String? tagName;
|
||||
|
||||
GithubEventRelease();
|
||||
|
||||
factory GithubEventRelease.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubEventReleaseFromJson(json);
|
||||
String? htmlUrl;
|
||||
String? tagName;
|
||||
}
|
||||
|
||||
// Notification
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubNotificationItem {
|
||||
GithubNotificationItem();
|
||||
|
||||
factory GithubNotificationItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubNotificationItemFromJson(json);
|
||||
String? id;
|
||||
GithubNotificationItemSubject? subject;
|
||||
DateTime? updatedAt;
|
||||
|
@ -150,182 +143,169 @@ class GithubNotificationItem {
|
|||
String? state;
|
||||
|
||||
String get key => '_$hashCode';
|
||||
|
||||
GithubNotificationItem();
|
||||
|
||||
factory GithubNotificationItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubNotificationItemFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubNotificationItemSubject {
|
||||
GithubNotificationItemSubject();
|
||||
|
||||
factory GithubNotificationItemSubject.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubNotificationItemSubjectFromJson(json);
|
||||
String? title;
|
||||
String? type;
|
||||
String? url;
|
||||
|
||||
int? _number;
|
||||
int? get number {
|
||||
if (_number == null) {
|
||||
_number = int.parse(url?.split('/').last ?? '0');
|
||||
}
|
||||
_number ??= int.parse(url?.split('/').last ?? '0');
|
||||
return _number;
|
||||
}
|
||||
|
||||
GithubNotificationItemSubject();
|
||||
|
||||
factory GithubNotificationItemSubject.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubNotificationItemSubjectFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubNotificationItemRepo {
|
||||
String? fullName;
|
||||
|
||||
Tuple2<String, String>? _repo;
|
||||
String get owner {
|
||||
if (_repo == null) {
|
||||
_repo = parseRepositoryFullName(fullName!);
|
||||
}
|
||||
return _repo!.item1;
|
||||
}
|
||||
|
||||
String get name {
|
||||
if (_repo == null) {
|
||||
_repo = parseRepositoryFullName(fullName!);
|
||||
}
|
||||
return _repo!.item2;
|
||||
}
|
||||
|
||||
GithubNotificationItemRepo();
|
||||
|
||||
factory GithubNotificationItemRepo.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubNotificationItemRepoFromJson(json);
|
||||
String? fullName;
|
||||
|
||||
Tuple2<String, String>? _repo;
|
||||
String get owner {
|
||||
_repo ??= parseRepositoryFullName(fullName!);
|
||||
return _repo!.item1;
|
||||
}
|
||||
|
||||
String get name {
|
||||
_repo ??= parseRepositoryFullName(fullName!);
|
||||
return _repo!.item2;
|
||||
}
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubTreeItem {
|
||||
GithubTreeItem();
|
||||
factory GithubTreeItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubTreeItemFromJson(json);
|
||||
String? name;
|
||||
String? path;
|
||||
int? size;
|
||||
String? type;
|
||||
String? downloadUrl;
|
||||
String? content;
|
||||
GithubTreeItem();
|
||||
factory GithubTreeItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubTreeItemFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubPagesItem {
|
||||
String? pageName;
|
||||
String? title;
|
||||
String? action;
|
||||
GithubPagesItem();
|
||||
factory GithubPagesItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubPagesItemFromJson(json);
|
||||
String? pageName;
|
||||
String? title;
|
||||
String? action;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubSecurityItem {
|
||||
String? summary;
|
||||
String? description;
|
||||
String? severity;
|
||||
GithubSecurityItem();
|
||||
factory GithubSecurityItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubSecurityItemFromJson(json);
|
||||
String? summary;
|
||||
String? description;
|
||||
String? severity;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubAlertItem {
|
||||
String? affectedPackageName;
|
||||
String? affectedRange;
|
||||
GithubAlertItem();
|
||||
factory GithubAlertItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubAlertItemFromJson(json);
|
||||
String? affectedPackageName;
|
||||
String? affectedRange;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubProjectItem {
|
||||
GithubProjectItem();
|
||||
factory GithubProjectItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubProjectItemFromJson(json);
|
||||
String? name;
|
||||
String? state;
|
||||
String? body;
|
||||
String? htmlUrl;
|
||||
GithubProjectItem();
|
||||
factory GithubProjectItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubProjectItemFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubProjectColumnItem {
|
||||
String? htmlUrl;
|
||||
String? columnsUrl;
|
||||
String? name;
|
||||
GithubProjectColumnItem();
|
||||
factory GithubProjectColumnItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubProjectColumnItemFromJson(json);
|
||||
String? htmlUrl;
|
||||
String? columnsUrl;
|
||||
String? name;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubInstallationRepositoriesItem {
|
||||
List<GithubNotificationItemRepo>? repositoriesAdded, repositoriesRemoved;
|
||||
String? repositoriesSelection;
|
||||
int? id;
|
||||
GithubInstallationRepositoriesItem();
|
||||
factory GithubInstallationRepositoriesItem.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$GithubInstallationRepositoriesItemFromJson(json);
|
||||
List<GithubNotificationItemRepo>? repositoriesAdded, repositoriesRemoved;
|
||||
String? repositoriesSelection;
|
||||
int? id;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubCheckrunItem {
|
||||
String? status;
|
||||
String? name;
|
||||
int? id;
|
||||
GithubCheckrunItem();
|
||||
factory GithubCheckrunItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubCheckrunItemFromJson(json);
|
||||
String? status;
|
||||
String? name;
|
||||
int? id;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubCheckSuiteItem {
|
||||
String? status;
|
||||
String? conclusion;
|
||||
GithubCheckSuiteItem();
|
||||
factory GithubCheckSuiteItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubCheckSuiteItemFromJson(json);
|
||||
String? status;
|
||||
String? conclusion;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubContentReferenceItem {
|
||||
int? id;
|
||||
String? reference;
|
||||
GithubContentReferenceItem();
|
||||
factory GithubContentReferenceItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubContentReferenceItemFromJson(json);
|
||||
int? id;
|
||||
String? reference;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubContributorItem {
|
||||
GithubContributorItem();
|
||||
factory GithubContributorItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubContributorItemFromJson(json);
|
||||
int? id;
|
||||
String? login;
|
||||
String? avatarUrl;
|
||||
String? htmlUrl;
|
||||
int? contributions;
|
||||
GithubContributorItem();
|
||||
factory GithubContributorItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubContributorItemFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubUserOrganizationItem {
|
||||
GithubUserOrganizationItem();
|
||||
factory GithubUserOrganizationItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubUserOrganizationItemFromJson(json);
|
||||
int? id;
|
||||
String? login;
|
||||
String? avatarUrl;
|
||||
String? description;
|
||||
String? url;
|
||||
GithubUserOrganizationItem();
|
||||
factory GithubUserOrganizationItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubUserOrganizationItemFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
|
@ -339,6 +319,9 @@ class GistFiles {
|
|||
this.truncated,
|
||||
this.content,
|
||||
});
|
||||
|
||||
factory GistFiles.fromJson(Map<String, dynamic> json) =>
|
||||
_$GistFilesFromJson(json);
|
||||
String? filename;
|
||||
int? size;
|
||||
String? rawUrl;
|
||||
|
@ -346,21 +329,21 @@ class GistFiles {
|
|||
String? language;
|
||||
bool? truncated;
|
||||
String? content;
|
||||
|
||||
factory GistFiles.fromJson(Map<String, dynamic> json) =>
|
||||
_$GistFilesFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubGistsItem {
|
||||
GithubGistsItem();
|
||||
factory GithubGistsItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubGistsItemFromJson(json);
|
||||
String? id;
|
||||
String? description;
|
||||
bool? public;
|
||||
Map<String, GistFiles>? files;
|
||||
GithubEventUser? owner;
|
||||
List<GistFiles> get fileNames {
|
||||
List<GistFiles> filenames = [];
|
||||
files!.forEach((String key, GistFiles value) {
|
||||
final filenames = <GistFiles>[];
|
||||
files!.forEach((key, value) {
|
||||
filenames.add(value);
|
||||
});
|
||||
return filenames;
|
||||
|
@ -368,32 +351,28 @@ class GithubGistsItem {
|
|||
|
||||
DateTime? createdAt;
|
||||
DateTime? updatedAt;
|
||||
|
||||
GithubGistsItem();
|
||||
factory GithubGistsItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubGistsItemFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubFilesItem {
|
||||
GithubFilesItem();
|
||||
factory GithubFilesItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubFilesItemFromJson(json);
|
||||
String? filename;
|
||||
String? status;
|
||||
int? additions;
|
||||
int? deletions;
|
||||
int? changes;
|
||||
String? patch;
|
||||
GithubFilesItem();
|
||||
factory GithubFilesItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubFilesItemFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GithubComparisonItem {
|
||||
GithubComparisonItem();
|
||||
factory GithubComparisonItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubComparisonItemFromJson(json);
|
||||
List<GithubFilesItem>? files;
|
||||
String? status;
|
||||
int? aheadBy;
|
||||
int? behindBy;
|
||||
GithubComparisonItem();
|
||||
factory GithubComparisonItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GithubComparisonItemFromJson(json);
|
||||
}
|
||||
|
|
|
@ -6,22 +6,20 @@ part of 'github.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
GithubEvent _$GithubEventFromJson(Map<String, dynamic> json) {
|
||||
return GithubEvent()
|
||||
..actor = json['actor'] == null
|
||||
? null
|
||||
: GithubEventUser.fromJson(json['actor'] as Map<String, dynamic>)
|
||||
..type = json['type'] as String?
|
||||
..repo = json['repo'] == null
|
||||
? null
|
||||
: GithubEventRepo.fromJson(json['repo'] as Map<String, dynamic>)
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..payload = json['payload'] == null
|
||||
? null
|
||||
: GithubEventPayload.fromJson(json['payload'] as Map<String, dynamic>);
|
||||
}
|
||||
GithubEvent _$GithubEventFromJson(Map<String, dynamic> json) => GithubEvent()
|
||||
..actor = json['actor'] == null
|
||||
? null
|
||||
: GithubEventUser.fromJson(json['actor'] as Map<String, dynamic>)
|
||||
..type = json['type'] as String?
|
||||
..repo = json['repo'] == null
|
||||
? null
|
||||
: GithubEventRepo.fromJson(json['repo'] as Map<String, dynamic>)
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..payload = json['payload'] == null
|
||||
? null
|
||||
: GithubEventPayload.fromJson(json['payload'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GithubEventToJson(GithubEvent instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -32,11 +30,10 @@ Map<String, dynamic> _$GithubEventToJson(GithubEvent instance) =>
|
|||
'payload': instance.payload,
|
||||
};
|
||||
|
||||
GithubEventUser _$GithubEventUserFromJson(Map<String, dynamic> json) {
|
||||
return GithubEventUser()
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?;
|
||||
}
|
||||
GithubEventUser _$GithubEventUserFromJson(Map<String, dynamic> json) =>
|
||||
GithubEventUser()
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubEventUserToJson(GithubEventUser instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -44,72 +41,71 @@ Map<String, dynamic> _$GithubEventUserToJson(GithubEventUser instance) =>
|
|||
'avatar_url': instance.avatarUrl,
|
||||
};
|
||||
|
||||
GithubEventRepo _$GithubEventRepoFromJson(Map<String, dynamic> json) {
|
||||
return GithubEventRepo()..name = json['name'] as String?;
|
||||
}
|
||||
GithubEventRepo _$GithubEventRepoFromJson(Map<String, dynamic> json) =>
|
||||
GithubEventRepo()..name = json['name'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubEventRepoToJson(GithubEventRepo instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
GithubEventPayload _$GithubEventPayloadFromJson(Map<String, dynamic> json) {
|
||||
return GithubEventPayload()
|
||||
..issue = json['issue'] == null
|
||||
? null
|
||||
: GithubEventIssue.fromJson(json['issue'] as Map<String, dynamic>)
|
||||
..pullRequest = json['pull_request'] == null
|
||||
? null
|
||||
: GithubEventIssue.fromJson(
|
||||
json['pull_request'] as Map<String, dynamic>)
|
||||
..comment = json['comment'] == null
|
||||
? null
|
||||
: GithubEventComment.fromJson(json['comment'] as Map<String, dynamic>)
|
||||
..release = json['release'] == null
|
||||
? null
|
||||
: GithubEventRelease.fromJson(json['release'] as Map<String, dynamic>)
|
||||
..action = json['action'] as String?
|
||||
..ref = json['ref'] as String?
|
||||
..refType = json['ref_type'] as String?
|
||||
..before = json['before'] as String?
|
||||
..head = json['head'] as String?
|
||||
..commits = (json['commits'] as List<dynamic>?)
|
||||
?.map((e) => GithubEventCommit.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..forkee = json['forkee'] as Map<String, dynamic>?
|
||||
..pages = (json['pages'] as List<dynamic>?)
|
||||
?.map((e) => GithubPagesItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..securityAdvisory = json['security_advisory'] == null
|
||||
? null
|
||||
: GithubSecurityItem.fromJson(
|
||||
json['security_advisory'] as Map<String, dynamic>)
|
||||
..alert = json['alert'] == null
|
||||
? null
|
||||
: GithubAlertItem.fromJson(json['alert'] as Map<String, dynamic>)
|
||||
..project = json['project'] == null
|
||||
? null
|
||||
: GithubProjectItem.fromJson(json['project'] as Map<String, dynamic>)
|
||||
..projectColumn = json['project_column'] == null
|
||||
? null
|
||||
: GithubProjectColumnItem.fromJson(
|
||||
json['project_column'] as Map<String, dynamic>)
|
||||
..installation = json['installation'] == null
|
||||
? null
|
||||
: GithubInstallationRepositoriesItem.fromJson(
|
||||
json['installation'] as Map<String, dynamic>)
|
||||
..checkRun = json['check_run'] == null
|
||||
? null
|
||||
: GithubCheckrunItem.fromJson(json['check_run'] as Map<String, dynamic>)
|
||||
..checkSuite = json['check_suite'] == null
|
||||
? null
|
||||
: GithubCheckSuiteItem.fromJson(
|
||||
json['check_suite'] as Map<String, dynamic>)
|
||||
..contentReference = json['content_reference'] == null
|
||||
? null
|
||||
: GithubContentReferenceItem.fromJson(
|
||||
json['content_reference'] as Map<String, dynamic>);
|
||||
}
|
||||
GithubEventPayload _$GithubEventPayloadFromJson(Map<String, dynamic> json) =>
|
||||
GithubEventPayload()
|
||||
..issue = json['issue'] == null
|
||||
? null
|
||||
: GithubEventIssue.fromJson(json['issue'] as Map<String, dynamic>)
|
||||
..pullRequest = json['pull_request'] == null
|
||||
? null
|
||||
: GithubEventIssue.fromJson(
|
||||
json['pull_request'] as Map<String, dynamic>)
|
||||
..comment = json['comment'] == null
|
||||
? null
|
||||
: GithubEventComment.fromJson(json['comment'] as Map<String, dynamic>)
|
||||
..release = json['release'] == null
|
||||
? null
|
||||
: GithubEventRelease.fromJson(json['release'] as Map<String, dynamic>)
|
||||
..action = json['action'] as String?
|
||||
..ref = json['ref'] as String?
|
||||
..refType = json['ref_type'] as String?
|
||||
..before = json['before'] as String?
|
||||
..head = json['head'] as String?
|
||||
..commits = (json['commits'] as List<dynamic>?)
|
||||
?.map((e) => GithubEventCommit.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..forkee = json['forkee'] as Map<String, dynamic>?
|
||||
..pages = (json['pages'] as List<dynamic>?)
|
||||
?.map((e) => GithubPagesItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..securityAdvisory = json['security_advisory'] == null
|
||||
? null
|
||||
: GithubSecurityItem.fromJson(
|
||||
json['security_advisory'] as Map<String, dynamic>)
|
||||
..alert = json['alert'] == null
|
||||
? null
|
||||
: GithubAlertItem.fromJson(json['alert'] as Map<String, dynamic>)
|
||||
..project = json['project'] == null
|
||||
? null
|
||||
: GithubProjectItem.fromJson(json['project'] as Map<String, dynamic>)
|
||||
..projectColumn = json['project_column'] == null
|
||||
? null
|
||||
: GithubProjectColumnItem.fromJson(
|
||||
json['project_column'] as Map<String, dynamic>)
|
||||
..installation = json['installation'] == null
|
||||
? null
|
||||
: GithubInstallationRepositoriesItem.fromJson(
|
||||
json['installation'] as Map<String, dynamic>)
|
||||
..checkRun = json['check_run'] == null
|
||||
? null
|
||||
: GithubCheckrunItem.fromJson(
|
||||
json['check_run'] as Map<String, dynamic>)
|
||||
..checkSuite = json['check_suite'] == null
|
||||
? null
|
||||
: GithubCheckSuiteItem.fromJson(
|
||||
json['check_suite'] as Map<String, dynamic>)
|
||||
..contentReference = json['content_reference'] == null
|
||||
? null
|
||||
: GithubContentReferenceItem.fromJson(
|
||||
json['content_reference'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GithubEventPayloadToJson(GithubEventPayload instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -135,22 +131,21 @@ Map<String, dynamic> _$GithubEventPayloadToJson(GithubEventPayload instance) =>
|
|||
'content_reference': instance.contentReference,
|
||||
};
|
||||
|
||||
GithubEventIssue _$GithubEventIssueFromJson(Map<String, dynamic> json) {
|
||||
return GithubEventIssue()
|
||||
..title = json['title'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GithubEventUser.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..number = json['number'] as int?
|
||||
..body = json['body'] as String?
|
||||
..pullRequest = json['pull_request']
|
||||
..state = json['state'] as String?
|
||||
..comments = json['comments'] as int?
|
||||
..merged = json['merged'] as bool?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String);
|
||||
}
|
||||
GithubEventIssue _$GithubEventIssueFromJson(Map<String, dynamic> json) =>
|
||||
GithubEventIssue()
|
||||
..title = json['title'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GithubEventUser.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..number = json['number'] as int?
|
||||
..body = json['body'] as String?
|
||||
..pullRequest = json['pull_request']
|
||||
..state = json['state'] as String?
|
||||
..comments = json['comments'] as int?
|
||||
..merged = json['merged'] as bool?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String);
|
||||
|
||||
Map<String, dynamic> _$GithubEventIssueToJson(GithubEventIssue instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -165,15 +160,14 @@ Map<String, dynamic> _$GithubEventIssueToJson(GithubEventIssue instance) =>
|
|||
'created_at': instance.createdAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
GithubEventComment _$GithubEventCommentFromJson(Map<String, dynamic> json) {
|
||||
return GithubEventComment()
|
||||
..body = json['body'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GithubEventUser.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..commitId = json['commit_id'] as String?
|
||||
..htmlUrl = json['html_url'] as String?;
|
||||
}
|
||||
GithubEventComment _$GithubEventCommentFromJson(Map<String, dynamic> json) =>
|
||||
GithubEventComment()
|
||||
..body = json['body'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GithubEventUser.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..commitId = json['commit_id'] as String?
|
||||
..htmlUrl = json['html_url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubEventCommentToJson(GithubEventComment instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -183,11 +177,10 @@ Map<String, dynamic> _$GithubEventCommentToJson(GithubEventComment instance) =>
|
|||
'html_url': instance.htmlUrl,
|
||||
};
|
||||
|
||||
GithubEventCommit _$GithubEventCommitFromJson(Map<String, dynamic> json) {
|
||||
return GithubEventCommit()
|
||||
..sha = json['sha'] as String?
|
||||
..message = json['message'] as String?;
|
||||
}
|
||||
GithubEventCommit _$GithubEventCommitFromJson(Map<String, dynamic> json) =>
|
||||
GithubEventCommit()
|
||||
..sha = json['sha'] as String?
|
||||
..message = json['message'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubEventCommitToJson(GithubEventCommit instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -195,11 +188,10 @@ Map<String, dynamic> _$GithubEventCommitToJson(GithubEventCommit instance) =>
|
|||
'message': instance.message,
|
||||
};
|
||||
|
||||
GithubEventRelease _$GithubEventReleaseFromJson(Map<String, dynamic> json) {
|
||||
return GithubEventRelease()
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..tagName = json['tag_name'] as String?;
|
||||
}
|
||||
GithubEventRelease _$GithubEventReleaseFromJson(Map<String, dynamic> json) =>
|
||||
GithubEventRelease()
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..tagName = json['tag_name'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubEventReleaseToJson(GithubEventRelease instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -208,22 +200,21 @@ Map<String, dynamic> _$GithubEventReleaseToJson(GithubEventRelease instance) =>
|
|||
};
|
||||
|
||||
GithubNotificationItem _$GithubNotificationItemFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return GithubNotificationItem()
|
||||
..id = json['id'] as String?
|
||||
..subject = json['subject'] == null
|
||||
? null
|
||||
: GithubNotificationItemSubject.fromJson(
|
||||
json['subject'] as Map<String, dynamic>)
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..repository = json['repository'] == null
|
||||
? null
|
||||
: GithubNotificationItemRepo.fromJson(
|
||||
json['repository'] as Map<String, dynamic>)
|
||||
..unread = json['unread'] as bool?;
|
||||
}
|
||||
Map<String, dynamic> json) =>
|
||||
GithubNotificationItem()
|
||||
..id = json['id'] as String?
|
||||
..subject = json['subject'] == null
|
||||
? null
|
||||
: GithubNotificationItemSubject.fromJson(
|
||||
json['subject'] as Map<String, dynamic>)
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..repository = json['repository'] == null
|
||||
? null
|
||||
: GithubNotificationItemRepo.fromJson(
|
||||
json['repository'] as Map<String, dynamic>)
|
||||
..unread = json['unread'] as bool?;
|
||||
|
||||
Map<String, dynamic> _$GithubNotificationItemToJson(
|
||||
GithubNotificationItem instance) =>
|
||||
|
@ -236,12 +227,11 @@ Map<String, dynamic> _$GithubNotificationItemToJson(
|
|||
};
|
||||
|
||||
GithubNotificationItemSubject _$GithubNotificationItemSubjectFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return GithubNotificationItemSubject()
|
||||
..title = json['title'] as String?
|
||||
..type = json['type'] as String?
|
||||
..url = json['url'] as String?;
|
||||
}
|
||||
Map<String, dynamic> json) =>
|
||||
GithubNotificationItemSubject()
|
||||
..title = json['title'] as String?
|
||||
..type = json['type'] as String?
|
||||
..url = json['url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubNotificationItemSubjectToJson(
|
||||
GithubNotificationItemSubject instance) =>
|
||||
|
@ -252,9 +242,8 @@ Map<String, dynamic> _$GithubNotificationItemSubjectToJson(
|
|||
};
|
||||
|
||||
GithubNotificationItemRepo _$GithubNotificationItemRepoFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return GithubNotificationItemRepo()..fullName = json['full_name'] as String?;
|
||||
}
|
||||
Map<String, dynamic> json) =>
|
||||
GithubNotificationItemRepo()..fullName = json['full_name'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubNotificationItemRepoToJson(
|
||||
GithubNotificationItemRepo instance) =>
|
||||
|
@ -262,15 +251,14 @@ Map<String, dynamic> _$GithubNotificationItemRepoToJson(
|
|||
'full_name': instance.fullName,
|
||||
};
|
||||
|
||||
GithubTreeItem _$GithubTreeItemFromJson(Map<String, dynamic> json) {
|
||||
return GithubTreeItem()
|
||||
..name = json['name'] as String?
|
||||
..path = json['path'] as String?
|
||||
..size = json['size'] as int?
|
||||
..type = json['type'] as String?
|
||||
..downloadUrl = json['download_url'] as String?
|
||||
..content = json['content'] as String?;
|
||||
}
|
||||
GithubTreeItem _$GithubTreeItemFromJson(Map<String, dynamic> json) =>
|
||||
GithubTreeItem()
|
||||
..name = json['name'] as String?
|
||||
..path = json['path'] as String?
|
||||
..size = json['size'] as int?
|
||||
..type = json['type'] as String?
|
||||
..downloadUrl = json['download_url'] as String?
|
||||
..content = json['content'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubTreeItemToJson(GithubTreeItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -282,12 +270,11 @@ Map<String, dynamic> _$GithubTreeItemToJson(GithubTreeItem instance) =>
|
|||
'content': instance.content,
|
||||
};
|
||||
|
||||
GithubPagesItem _$GithubPagesItemFromJson(Map<String, dynamic> json) {
|
||||
return GithubPagesItem()
|
||||
..pageName = json['page_name'] as String?
|
||||
..title = json['title'] as String?
|
||||
..action = json['action'] as String?;
|
||||
}
|
||||
GithubPagesItem _$GithubPagesItemFromJson(Map<String, dynamic> json) =>
|
||||
GithubPagesItem()
|
||||
..pageName = json['page_name'] as String?
|
||||
..title = json['title'] as String?
|
||||
..action = json['action'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubPagesItemToJson(GithubPagesItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -296,12 +283,11 @@ Map<String, dynamic> _$GithubPagesItemToJson(GithubPagesItem instance) =>
|
|||
'action': instance.action,
|
||||
};
|
||||
|
||||
GithubSecurityItem _$GithubSecurityItemFromJson(Map<String, dynamic> json) {
|
||||
return GithubSecurityItem()
|
||||
..summary = json['summary'] as String?
|
||||
..description = json['description'] as String?
|
||||
..severity = json['severity'] as String?;
|
||||
}
|
||||
GithubSecurityItem _$GithubSecurityItemFromJson(Map<String, dynamic> json) =>
|
||||
GithubSecurityItem()
|
||||
..summary = json['summary'] as String?
|
||||
..description = json['description'] as String?
|
||||
..severity = json['severity'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubSecurityItemToJson(GithubSecurityItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -310,11 +296,10 @@ Map<String, dynamic> _$GithubSecurityItemToJson(GithubSecurityItem instance) =>
|
|||
'severity': instance.severity,
|
||||
};
|
||||
|
||||
GithubAlertItem _$GithubAlertItemFromJson(Map<String, dynamic> json) {
|
||||
return GithubAlertItem()
|
||||
..affectedPackageName = json['affected_package_name'] as String?
|
||||
..affectedRange = json['affected_range'] as String?;
|
||||
}
|
||||
GithubAlertItem _$GithubAlertItemFromJson(Map<String, dynamic> json) =>
|
||||
GithubAlertItem()
|
||||
..affectedPackageName = json['affected_package_name'] as String?
|
||||
..affectedRange = json['affected_range'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubAlertItemToJson(GithubAlertItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -322,13 +307,12 @@ Map<String, dynamic> _$GithubAlertItemToJson(GithubAlertItem instance) =>
|
|||
'affected_range': instance.affectedRange,
|
||||
};
|
||||
|
||||
GithubProjectItem _$GithubProjectItemFromJson(Map<String, dynamic> json) {
|
||||
return GithubProjectItem()
|
||||
..name = json['name'] as String?
|
||||
..state = json['state'] as String?
|
||||
..body = json['body'] as String?
|
||||
..htmlUrl = json['html_url'] as String?;
|
||||
}
|
||||
GithubProjectItem _$GithubProjectItemFromJson(Map<String, dynamic> json) =>
|
||||
GithubProjectItem()
|
||||
..name = json['name'] as String?
|
||||
..state = json['state'] as String?
|
||||
..body = json['body'] as String?
|
||||
..htmlUrl = json['html_url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubProjectItemToJson(GithubProjectItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -339,12 +323,11 @@ Map<String, dynamic> _$GithubProjectItemToJson(GithubProjectItem instance) =>
|
|||
};
|
||||
|
||||
GithubProjectColumnItem _$GithubProjectColumnItemFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return GithubProjectColumnItem()
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..columnsUrl = json['columns_url'] as String?
|
||||
..name = json['name'] as String?;
|
||||
}
|
||||
Map<String, dynamic> json) =>
|
||||
GithubProjectColumnItem()
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..columnsUrl = json['columns_url'] as String?
|
||||
..name = json['name'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubProjectColumnItemToJson(
|
||||
GithubProjectColumnItem instance) =>
|
||||
|
@ -355,19 +338,18 @@ Map<String, dynamic> _$GithubProjectColumnItemToJson(
|
|||
};
|
||||
|
||||
GithubInstallationRepositoriesItem _$GithubInstallationRepositoriesItemFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return GithubInstallationRepositoriesItem()
|
||||
..repositoriesAdded = (json['repositories_added'] as List<dynamic>?)
|
||||
?.map((e) =>
|
||||
GithubNotificationItemRepo.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..repositoriesRemoved = (json['repositories_removed'] as List<dynamic>?)
|
||||
?.map((e) =>
|
||||
GithubNotificationItemRepo.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..repositoriesSelection = json['repositories_selection'] as String?
|
||||
..id = json['id'] as int?;
|
||||
}
|
||||
Map<String, dynamic> json) =>
|
||||
GithubInstallationRepositoriesItem()
|
||||
..repositoriesAdded = (json['repositories_added'] as List<dynamic>?)
|
||||
?.map((e) =>
|
||||
GithubNotificationItemRepo.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..repositoriesRemoved = (json['repositories_removed'] as List<dynamic>?)
|
||||
?.map((e) =>
|
||||
GithubNotificationItemRepo.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..repositoriesSelection = json['repositories_selection'] as String?
|
||||
..id = json['id'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GithubInstallationRepositoriesItemToJson(
|
||||
GithubInstallationRepositoriesItem instance) =>
|
||||
|
@ -378,12 +360,11 @@ Map<String, dynamic> _$GithubInstallationRepositoriesItemToJson(
|
|||
'id': instance.id,
|
||||
};
|
||||
|
||||
GithubCheckrunItem _$GithubCheckrunItemFromJson(Map<String, dynamic> json) {
|
||||
return GithubCheckrunItem()
|
||||
..status = json['status'] as String?
|
||||
..name = json['name'] as String?
|
||||
..id = json['id'] as int?;
|
||||
}
|
||||
GithubCheckrunItem _$GithubCheckrunItemFromJson(Map<String, dynamic> json) =>
|
||||
GithubCheckrunItem()
|
||||
..status = json['status'] as String?
|
||||
..name = json['name'] as String?
|
||||
..id = json['id'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GithubCheckrunItemToJson(GithubCheckrunItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -392,11 +373,11 @@ Map<String, dynamic> _$GithubCheckrunItemToJson(GithubCheckrunItem instance) =>
|
|||
'id': instance.id,
|
||||
};
|
||||
|
||||
GithubCheckSuiteItem _$GithubCheckSuiteItemFromJson(Map<String, dynamic> json) {
|
||||
return GithubCheckSuiteItem()
|
||||
..status = json['status'] as String?
|
||||
..conclusion = json['conclusion'] as String?;
|
||||
}
|
||||
GithubCheckSuiteItem _$GithubCheckSuiteItemFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
GithubCheckSuiteItem()
|
||||
..status = json['status'] as String?
|
||||
..conclusion = json['conclusion'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubCheckSuiteItemToJson(
|
||||
GithubCheckSuiteItem instance) =>
|
||||
|
@ -406,11 +387,10 @@ Map<String, dynamic> _$GithubCheckSuiteItemToJson(
|
|||
};
|
||||
|
||||
GithubContentReferenceItem _$GithubContentReferenceItemFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return GithubContentReferenceItem()
|
||||
..id = json['id'] as int?
|
||||
..reference = json['reference'] as String?;
|
||||
}
|
||||
Map<String, dynamic> json) =>
|
||||
GithubContentReferenceItem()
|
||||
..id = json['id'] as int?
|
||||
..reference = json['reference'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubContentReferenceItemToJson(
|
||||
GithubContentReferenceItem instance) =>
|
||||
|
@ -420,14 +400,13 @@ Map<String, dynamic> _$GithubContentReferenceItemToJson(
|
|||
};
|
||||
|
||||
GithubContributorItem _$GithubContributorItemFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return GithubContributorItem()
|
||||
..id = json['id'] as int?
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..contributions = json['contributions'] as int?;
|
||||
}
|
||||
Map<String, dynamic> json) =>
|
||||
GithubContributorItem()
|
||||
..id = json['id'] as int?
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..contributions = json['contributions'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GithubContributorItemToJson(
|
||||
GithubContributorItem instance) =>
|
||||
|
@ -440,14 +419,13 @@ Map<String, dynamic> _$GithubContributorItemToJson(
|
|||
};
|
||||
|
||||
GithubUserOrganizationItem _$GithubUserOrganizationItemFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return GithubUserOrganizationItem()
|
||||
..id = json['id'] as int?
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..url = json['url'] as String?;
|
||||
}
|
||||
Map<String, dynamic> json) =>
|
||||
GithubUserOrganizationItem()
|
||||
..id = json['id'] as int?
|
||||
..login = json['login'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..url = json['url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubUserOrganizationItemToJson(
|
||||
GithubUserOrganizationItem instance) =>
|
||||
|
@ -459,17 +437,15 @@ Map<String, dynamic> _$GithubUserOrganizationItemToJson(
|
|||
'url': instance.url,
|
||||
};
|
||||
|
||||
GistFiles _$GistFilesFromJson(Map<String, dynamic> json) {
|
||||
return GistFiles(
|
||||
filename: json['filename'] as String?,
|
||||
size: json['size'] as int?,
|
||||
rawUrl: json['raw_url'] as String?,
|
||||
type: json['type'] as String?,
|
||||
language: json['language'] as String?,
|
||||
truncated: json['truncated'] as bool?,
|
||||
content: json['content'] as String?,
|
||||
);
|
||||
}
|
||||
GistFiles _$GistFilesFromJson(Map<String, dynamic> json) => GistFiles(
|
||||
filename: json['filename'] as String?,
|
||||
size: json['size'] as int?,
|
||||
rawUrl: json['raw_url'] as String?,
|
||||
type: json['type'] as String?,
|
||||
language: json['language'] as String?,
|
||||
truncated: json['truncated'] as bool?,
|
||||
content: json['content'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GistFilesToJson(GistFiles instance) => <String, dynamic>{
|
||||
'filename': instance.filename,
|
||||
|
@ -481,24 +457,23 @@ Map<String, dynamic> _$GistFilesToJson(GistFiles instance) => <String, dynamic>{
|
|||
'content': instance.content,
|
||||
};
|
||||
|
||||
GithubGistsItem _$GithubGistsItemFromJson(Map<String, dynamic> json) {
|
||||
return GithubGistsItem()
|
||||
..id = json['id'] as String?
|
||||
..description = json['description'] as String?
|
||||
..public = json['public'] as bool?
|
||||
..files = (json['files'] as Map<String, dynamic>?)?.map(
|
||||
(k, e) => MapEntry(k, GistFiles.fromJson(e as Map<String, dynamic>)),
|
||||
)
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: GithubEventUser.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String);
|
||||
}
|
||||
GithubGistsItem _$GithubGistsItemFromJson(Map<String, dynamic> json) =>
|
||||
GithubGistsItem()
|
||||
..id = json['id'] as String?
|
||||
..description = json['description'] as String?
|
||||
..public = json['public'] as bool?
|
||||
..files = (json['files'] as Map<String, dynamic>?)?.map(
|
||||
(k, e) => MapEntry(k, GistFiles.fromJson(e as Map<String, dynamic>)),
|
||||
)
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: GithubEventUser.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String);
|
||||
|
||||
Map<String, dynamic> _$GithubGistsItemToJson(GithubGistsItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -511,15 +486,14 @@ Map<String, dynamic> _$GithubGistsItemToJson(GithubGistsItem instance) =>
|
|||
'updated_at': instance.updatedAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
GithubFilesItem _$GithubFilesItemFromJson(Map<String, dynamic> json) {
|
||||
return GithubFilesItem()
|
||||
..filename = json['filename'] as String?
|
||||
..status = json['status'] as String?
|
||||
..additions = json['additions'] as int?
|
||||
..deletions = json['deletions'] as int?
|
||||
..changes = json['changes'] as int?
|
||||
..patch = json['patch'] as String?;
|
||||
}
|
||||
GithubFilesItem _$GithubFilesItemFromJson(Map<String, dynamic> json) =>
|
||||
GithubFilesItem()
|
||||
..filename = json['filename'] as String?
|
||||
..status = json['status'] as String?
|
||||
..additions = json['additions'] as int?
|
||||
..deletions = json['deletions'] as int?
|
||||
..changes = json['changes'] as int?
|
||||
..patch = json['patch'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GithubFilesItemToJson(GithubFilesItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -531,15 +505,15 @@ Map<String, dynamic> _$GithubFilesItemToJson(GithubFilesItem instance) =>
|
|||
'patch': instance.patch,
|
||||
};
|
||||
|
||||
GithubComparisonItem _$GithubComparisonItemFromJson(Map<String, dynamic> json) {
|
||||
return GithubComparisonItem()
|
||||
..files = (json['files'] as List<dynamic>?)
|
||||
?.map((e) => GithubFilesItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..status = json['status'] as String?
|
||||
..aheadBy = json['ahead_by'] as int?
|
||||
..behindBy = json['behind_by'] as int?;
|
||||
}
|
||||
GithubComparisonItem _$GithubComparisonItemFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
GithubComparisonItem()
|
||||
..files = (json['files'] as List<dynamic>?)
|
||||
?.map((e) => GithubFilesItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..status = json['status'] as String?
|
||||
..aheadBy = json['ahead_by'] as int?
|
||||
..behindBy = json['behind_by'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GithubComparisonItemToJson(
|
||||
GithubComparisonItem instance) =>
|
||||
|
|
|
@ -4,6 +4,9 @@ part 'gitlab.g.dart';
|
|||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabUser {
|
||||
GitlabUser();
|
||||
factory GitlabUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabUserFromJson(json);
|
||||
int? id;
|
||||
String? username;
|
||||
String? name;
|
||||
|
@ -11,70 +14,70 @@ class GitlabUser {
|
|||
String? bio;
|
||||
DateTime? createdAt;
|
||||
int? accessLevel;
|
||||
GitlabUser();
|
||||
factory GitlabUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabUserFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabGroup {
|
||||
GitlabGroup();
|
||||
factory GitlabGroup.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabGroupFromJson(json);
|
||||
int? id;
|
||||
String? path;
|
||||
String? name;
|
||||
String? avatarUrl;
|
||||
String? description;
|
||||
List<GitlabProject>? projects;
|
||||
GitlabGroup();
|
||||
factory GitlabGroup.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabGroupFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabTodoProject {
|
||||
String? pathWithNamespace;
|
||||
GitlabTodoProject();
|
||||
factory GitlabTodoProject.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabTodoProjectFromJson(json);
|
||||
String? pathWithNamespace;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabTodo {
|
||||
GitlabTodo();
|
||||
factory GitlabTodo.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabTodoFromJson(json);
|
||||
GitlabUser? author;
|
||||
GitlabTodoProject? project;
|
||||
String? actionName;
|
||||
String? targetType;
|
||||
GitlabTodoTarget? target;
|
||||
GitlabTodo();
|
||||
factory GitlabTodo.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabTodoFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabTodoTarget {
|
||||
GitlabTodoTarget();
|
||||
factory GitlabTodoTarget.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabTodoTargetFromJson(json);
|
||||
int? iid;
|
||||
int? projectId;
|
||||
String? title;
|
||||
GitlabUser? author;
|
||||
String? description;
|
||||
DateTime? createdAt;
|
||||
GitlabTodoTarget();
|
||||
factory GitlabTodoTarget.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabTodoTargetFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabIssueNote {
|
||||
GitlabIssueNote();
|
||||
factory GitlabIssueNote.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabIssueNoteFromJson(json);
|
||||
GitlabUser? author;
|
||||
String? body;
|
||||
bool? system;
|
||||
DateTime? createdAt;
|
||||
GitlabIssueNote();
|
||||
factory GitlabIssueNote.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabIssueNoteFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabProject {
|
||||
GitlabProject();
|
||||
factory GitlabProject.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabProjectFromJson(json);
|
||||
int? id;
|
||||
String? name;
|
||||
String? avatarUrl;
|
||||
|
@ -93,103 +96,103 @@ class GitlabProject {
|
|||
DateTime? lastActivityAt;
|
||||
DateTime? createdAt;
|
||||
String? defaultBranch;
|
||||
GitlabProject();
|
||||
factory GitlabProject.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabProjectFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabProjectBadge {
|
||||
String? renderedImageUrl;
|
||||
GitlabProjectBadge();
|
||||
factory GitlabProjectBadge.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabProjectBadgeFromJson(json);
|
||||
String? renderedImageUrl;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabProjectStatistics {
|
||||
int? commitCount;
|
||||
int? repositorySize;
|
||||
GitlabProjectStatistics();
|
||||
factory GitlabProjectStatistics.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabProjectStatisticsFromJson(json);
|
||||
int? commitCount;
|
||||
int? repositorySize;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabProjectNamespace {
|
||||
GitlabProjectNamespace();
|
||||
factory GitlabProjectNamespace.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabProjectNamespaceFromJson(json);
|
||||
int? id;
|
||||
String? name;
|
||||
String? path;
|
||||
String? kind;
|
||||
GitlabProjectNamespace();
|
||||
factory GitlabProjectNamespace.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabProjectNamespaceFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabTreeItem {
|
||||
String type;
|
||||
String path;
|
||||
String name;
|
||||
GitlabTreeItem({required this.type, required this.path, required this.name});
|
||||
factory GitlabTreeItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabTreeItemFromJson(json);
|
||||
String type;
|
||||
String path;
|
||||
String name;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabBlob {
|
||||
String? content;
|
||||
GitlabBlob();
|
||||
factory GitlabBlob.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabBlobFromJson(json);
|
||||
String? content;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabEvent {
|
||||
GitlabEvent();
|
||||
factory GitlabEvent.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabEventFromJson(json);
|
||||
GitlabUser? author;
|
||||
String? actionName;
|
||||
String? targetType;
|
||||
GitlabEventNote? note;
|
||||
GitlabEvent();
|
||||
factory GitlabEvent.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabEventFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabEventNote {
|
||||
String? body;
|
||||
String? noteableType;
|
||||
int? noteableIid;
|
||||
GitlabEventNote();
|
||||
factory GitlabEventNote.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabEventNoteFromJson(json);
|
||||
String? body;
|
||||
String? noteableType;
|
||||
int? noteableIid;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabCommit {
|
||||
GitlabCommit();
|
||||
factory GitlabCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabCommitFromJson(json);
|
||||
String? id;
|
||||
String? shortId;
|
||||
String? title;
|
||||
DateTime? createdAt;
|
||||
String? authorName;
|
||||
String? message;
|
||||
GitlabCommit();
|
||||
factory GitlabCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabCommitFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabDiff {
|
||||
String? diff;
|
||||
String? newPath;
|
||||
String? oldPath;
|
||||
GitlabDiff();
|
||||
factory GitlabDiff.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabDiffFromJson(json);
|
||||
String? diff;
|
||||
String? newPath;
|
||||
String? oldPath;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabIssue {
|
||||
GitlabIssue();
|
||||
factory GitlabIssue.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabIssueFromJson(json);
|
||||
String? title;
|
||||
int? iid;
|
||||
int? projectId;
|
||||
|
@ -197,25 +200,22 @@ class GitlabIssue {
|
|||
int? userNotesCount;
|
||||
DateTime? updatedAt;
|
||||
List<String>? labels;
|
||||
GitlabIssue();
|
||||
factory GitlabIssue.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabIssueFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabStarrer {
|
||||
DateTime? starredSince;
|
||||
GitlabUser? user;
|
||||
GitlabStarrer();
|
||||
factory GitlabStarrer.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabStarrerFromJson(json);
|
||||
DateTime? starredSince;
|
||||
GitlabUser? user;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GitlabBranch {
|
||||
String? name;
|
||||
bool? merged;
|
||||
GitlabBranch();
|
||||
factory GitlabBranch.fromJson(Map<String, dynamic> json) =>
|
||||
_$GitlabBranchFromJson(json);
|
||||
String? name;
|
||||
bool? merged;
|
||||
}
|
||||
|
|
|
@ -6,18 +6,16 @@ part of 'gitlab.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
GitlabUser _$GitlabUserFromJson(Map<String, dynamic> json) {
|
||||
return GitlabUser()
|
||||
..id = json['id'] as int?
|
||||
..username = json['username'] as String?
|
||||
..name = json['name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..bio = json['bio'] as String?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..accessLevel = json['access_level'] as int?;
|
||||
}
|
||||
GitlabUser _$GitlabUserFromJson(Map<String, dynamic> json) => GitlabUser()
|
||||
..id = json['id'] as int?
|
||||
..username = json['username'] as String?
|
||||
..name = json['name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..bio = json['bio'] as String?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..accessLevel = json['access_level'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GitlabUserToJson(GitlabUser instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -30,17 +28,15 @@ Map<String, dynamic> _$GitlabUserToJson(GitlabUser instance) =>
|
|||
'access_level': instance.accessLevel,
|
||||
};
|
||||
|
||||
GitlabGroup _$GitlabGroupFromJson(Map<String, dynamic> json) {
|
||||
return GitlabGroup()
|
||||
..id = json['id'] as int?
|
||||
..path = json['path'] as String?
|
||||
..name = json['name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..projects = (json['projects'] as List<dynamic>?)
|
||||
?.map((e) => GitlabProject.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
}
|
||||
GitlabGroup _$GitlabGroupFromJson(Map<String, dynamic> json) => GitlabGroup()
|
||||
..id = json['id'] as int?
|
||||
..path = json['path'] as String?
|
||||
..name = json['name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..projects = (json['projects'] as List<dynamic>?)
|
||||
?.map((e) => GitlabProject.fromJson(e as Map<String, dynamic>))
|
||||
.toList();
|
||||
|
||||
Map<String, dynamic> _$GitlabGroupToJson(GitlabGroup instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -52,30 +48,27 @@ Map<String, dynamic> _$GitlabGroupToJson(GitlabGroup instance) =>
|
|||
'projects': instance.projects,
|
||||
};
|
||||
|
||||
GitlabTodoProject _$GitlabTodoProjectFromJson(Map<String, dynamic> json) {
|
||||
return GitlabTodoProject()
|
||||
..pathWithNamespace = json['path_with_namespace'] as String?;
|
||||
}
|
||||
GitlabTodoProject _$GitlabTodoProjectFromJson(Map<String, dynamic> json) =>
|
||||
GitlabTodoProject()
|
||||
..pathWithNamespace = json['path_with_namespace'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GitlabTodoProjectToJson(GitlabTodoProject instance) =>
|
||||
<String, dynamic>{
|
||||
'path_with_namespace': instance.pathWithNamespace,
|
||||
};
|
||||
|
||||
GitlabTodo _$GitlabTodoFromJson(Map<String, dynamic> json) {
|
||||
return GitlabTodo()
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..project = json['project'] == null
|
||||
? null
|
||||
: GitlabTodoProject.fromJson(json['project'] as Map<String, dynamic>)
|
||||
..actionName = json['action_name'] as String?
|
||||
..targetType = json['target_type'] as String?
|
||||
..target = json['target'] == null
|
||||
? null
|
||||
: GitlabTodoTarget.fromJson(json['target'] as Map<String, dynamic>);
|
||||
}
|
||||
GitlabTodo _$GitlabTodoFromJson(Map<String, dynamic> json) => GitlabTodo()
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..project = json['project'] == null
|
||||
? null
|
||||
: GitlabTodoProject.fromJson(json['project'] as Map<String, dynamic>)
|
||||
..actionName = json['action_name'] as String?
|
||||
..targetType = json['target_type'] as String?
|
||||
..target = json['target'] == null
|
||||
? null
|
||||
: GitlabTodoTarget.fromJson(json['target'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GitlabTodoToJson(GitlabTodo instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -86,19 +79,18 @@ Map<String, dynamic> _$GitlabTodoToJson(GitlabTodo instance) =>
|
|||
'target': instance.target,
|
||||
};
|
||||
|
||||
GitlabTodoTarget _$GitlabTodoTargetFromJson(Map<String, dynamic> json) {
|
||||
return GitlabTodoTarget()
|
||||
..iid = json['iid'] as int?
|
||||
..projectId = json['project_id'] as int?
|
||||
..title = json['title'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..description = json['description'] as String?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String);
|
||||
}
|
||||
GitlabTodoTarget _$GitlabTodoTargetFromJson(Map<String, dynamic> json) =>
|
||||
GitlabTodoTarget()
|
||||
..iid = json['iid'] as int?
|
||||
..projectId = json['project_id'] as int?
|
||||
..title = json['title'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..description = json['description'] as String?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String);
|
||||
|
||||
Map<String, dynamic> _$GitlabTodoTargetToJson(GitlabTodoTarget instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -110,17 +102,16 @@ Map<String, dynamic> _$GitlabTodoTargetToJson(GitlabTodoTarget instance) =>
|
|||
'created_at': instance.createdAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
GitlabIssueNote _$GitlabIssueNoteFromJson(Map<String, dynamic> json) {
|
||||
return GitlabIssueNote()
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..body = json['body'] as String?
|
||||
..system = json['system'] as bool?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String);
|
||||
}
|
||||
GitlabIssueNote _$GitlabIssueNoteFromJson(Map<String, dynamic> json) =>
|
||||
GitlabIssueNote()
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..body = json['body'] as String?
|
||||
..system = json['system'] as bool?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String);
|
||||
|
||||
Map<String, dynamic> _$GitlabIssueNoteToJson(GitlabIssueNote instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -130,39 +121,38 @@ Map<String, dynamic> _$GitlabIssueNoteToJson(GitlabIssueNote instance) =>
|
|||
'created_at': instance.createdAt?.toIso8601String(),
|
||||
};
|
||||
|
||||
GitlabProject _$GitlabProjectFromJson(Map<String, dynamic> json) {
|
||||
return GitlabProject()
|
||||
..id = json['id'] as int?
|
||||
..name = json['name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..starCount = json['star_count'] as int?
|
||||
..forksCount = json['forks_count'] as int?
|
||||
..visibility = json['visibility'] as String?
|
||||
..readmeUrl = json['readme_url'] as String?
|
||||
..webUrl = json['web_url'] as String?
|
||||
..namespace = json['namespace'] == null
|
||||
? null
|
||||
: GitlabProjectNamespace.fromJson(
|
||||
json['namespace'] as Map<String, dynamic>)
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..issuesEnabled = json['issues_enabled'] as bool?
|
||||
..openIssuesCount = json['open_issues_count'] as int?
|
||||
..mergeRequestsEnabled = json['merge_requests_enabled'] as bool?
|
||||
..statistics = json['statistics'] == null
|
||||
? null
|
||||
: GitlabProjectStatistics.fromJson(
|
||||
json['statistics'] as Map<String, dynamic>)
|
||||
..lastActivityAt = json['last_activity_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_activity_at'] as String)
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..defaultBranch = json['default_branch'] as String?;
|
||||
}
|
||||
GitlabProject _$GitlabProjectFromJson(Map<String, dynamic> json) =>
|
||||
GitlabProject()
|
||||
..id = json['id'] as int?
|
||||
..name = json['name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..starCount = json['star_count'] as int?
|
||||
..forksCount = json['forks_count'] as int?
|
||||
..visibility = json['visibility'] as String?
|
||||
..readmeUrl = json['readme_url'] as String?
|
||||
..webUrl = json['web_url'] as String?
|
||||
..namespace = json['namespace'] == null
|
||||
? null
|
||||
: GitlabProjectNamespace.fromJson(
|
||||
json['namespace'] as Map<String, dynamic>)
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..issuesEnabled = json['issues_enabled'] as bool?
|
||||
..openIssuesCount = json['open_issues_count'] as int?
|
||||
..mergeRequestsEnabled = json['merge_requests_enabled'] as bool?
|
||||
..statistics = json['statistics'] == null
|
||||
? null
|
||||
: GitlabProjectStatistics.fromJson(
|
||||
json['statistics'] as Map<String, dynamic>)
|
||||
..lastActivityAt = json['last_activity_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['last_activity_at'] as String)
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..defaultBranch = json['default_branch'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GitlabProjectToJson(GitlabProject instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -186,10 +176,9 @@ Map<String, dynamic> _$GitlabProjectToJson(GitlabProject instance) =>
|
|||
'default_branch': instance.defaultBranch,
|
||||
};
|
||||
|
||||
GitlabProjectBadge _$GitlabProjectBadgeFromJson(Map<String, dynamic> json) {
|
||||
return GitlabProjectBadge()
|
||||
..renderedImageUrl = json['rendered_image_url'] as String?;
|
||||
}
|
||||
GitlabProjectBadge _$GitlabProjectBadgeFromJson(Map<String, dynamic> json) =>
|
||||
GitlabProjectBadge()
|
||||
..renderedImageUrl = json['rendered_image_url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GitlabProjectBadgeToJson(GitlabProjectBadge instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -197,11 +186,10 @@ Map<String, dynamic> _$GitlabProjectBadgeToJson(GitlabProjectBadge instance) =>
|
|||
};
|
||||
|
||||
GitlabProjectStatistics _$GitlabProjectStatisticsFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return GitlabProjectStatistics()
|
||||
..commitCount = json['commit_count'] as int?
|
||||
..repositorySize = json['repository_size'] as int?;
|
||||
}
|
||||
Map<String, dynamic> json) =>
|
||||
GitlabProjectStatistics()
|
||||
..commitCount = json['commit_count'] as int?
|
||||
..repositorySize = json['repository_size'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GitlabProjectStatisticsToJson(
|
||||
GitlabProjectStatistics instance) =>
|
||||
|
@ -211,13 +199,12 @@ Map<String, dynamic> _$GitlabProjectStatisticsToJson(
|
|||
};
|
||||
|
||||
GitlabProjectNamespace _$GitlabProjectNamespaceFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return GitlabProjectNamespace()
|
||||
..id = json['id'] as int?
|
||||
..name = json['name'] as String?
|
||||
..path = json['path'] as String?
|
||||
..kind = json['kind'] as String?;
|
||||
}
|
||||
Map<String, dynamic> json) =>
|
||||
GitlabProjectNamespace()
|
||||
..id = json['id'] as int?
|
||||
..name = json['name'] as String?
|
||||
..path = json['path'] as String?
|
||||
..kind = json['kind'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GitlabProjectNamespaceToJson(
|
||||
GitlabProjectNamespace instance) =>
|
||||
|
@ -228,13 +215,12 @@ Map<String, dynamic> _$GitlabProjectNamespaceToJson(
|
|||
'kind': instance.kind,
|
||||
};
|
||||
|
||||
GitlabTreeItem _$GitlabTreeItemFromJson(Map<String, dynamic> json) {
|
||||
return GitlabTreeItem(
|
||||
type: json['type'] as String,
|
||||
path: json['path'] as String,
|
||||
name: json['name'] as String,
|
||||
);
|
||||
}
|
||||
GitlabTreeItem _$GitlabTreeItemFromJson(Map<String, dynamic> json) =>
|
||||
GitlabTreeItem(
|
||||
type: json['type'] as String,
|
||||
path: json['path'] as String,
|
||||
name: json['name'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GitlabTreeItemToJson(GitlabTreeItem instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -243,26 +229,23 @@ Map<String, dynamic> _$GitlabTreeItemToJson(GitlabTreeItem instance) =>
|
|||
'name': instance.name,
|
||||
};
|
||||
|
||||
GitlabBlob _$GitlabBlobFromJson(Map<String, dynamic> json) {
|
||||
return GitlabBlob()..content = json['content'] as String?;
|
||||
}
|
||||
GitlabBlob _$GitlabBlobFromJson(Map<String, dynamic> json) =>
|
||||
GitlabBlob()..content = json['content'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GitlabBlobToJson(GitlabBlob instance) =>
|
||||
<String, dynamic>{
|
||||
'content': instance.content,
|
||||
};
|
||||
|
||||
GitlabEvent _$GitlabEventFromJson(Map<String, dynamic> json) {
|
||||
return GitlabEvent()
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..actionName = json['action_name'] as String?
|
||||
..targetType = json['target_type'] as String?
|
||||
..note = json['note'] == null
|
||||
? null
|
||||
: GitlabEventNote.fromJson(json['note'] as Map<String, dynamic>);
|
||||
}
|
||||
GitlabEvent _$GitlabEventFromJson(Map<String, dynamic> json) => GitlabEvent()
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..actionName = json['action_name'] as String?
|
||||
..targetType = json['target_type'] as String?
|
||||
..note = json['note'] == null
|
||||
? null
|
||||
: GitlabEventNote.fromJson(json['note'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GitlabEventToJson(GitlabEvent instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -272,12 +255,11 @@ Map<String, dynamic> _$GitlabEventToJson(GitlabEvent instance) =>
|
|||
'note': instance.note,
|
||||
};
|
||||
|
||||
GitlabEventNote _$GitlabEventNoteFromJson(Map<String, dynamic> json) {
|
||||
return GitlabEventNote()
|
||||
..body = json['body'] as String?
|
||||
..noteableType = json['noteable_type'] as String?
|
||||
..noteableIid = json['noteable_iid'] as int?;
|
||||
}
|
||||
GitlabEventNote _$GitlabEventNoteFromJson(Map<String, dynamic> json) =>
|
||||
GitlabEventNote()
|
||||
..body = json['body'] as String?
|
||||
..noteableType = json['noteable_type'] as String?
|
||||
..noteableIid = json['noteable_iid'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GitlabEventNoteToJson(GitlabEventNote instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -286,17 +268,15 @@ Map<String, dynamic> _$GitlabEventNoteToJson(GitlabEventNote instance) =>
|
|||
'noteable_iid': instance.noteableIid,
|
||||
};
|
||||
|
||||
GitlabCommit _$GitlabCommitFromJson(Map<String, dynamic> json) {
|
||||
return GitlabCommit()
|
||||
..id = json['id'] as String?
|
||||
..shortId = json['short_id'] as String?
|
||||
..title = json['title'] as String?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..authorName = json['author_name'] as String?
|
||||
..message = json['message'] as String?;
|
||||
}
|
||||
GitlabCommit _$GitlabCommitFromJson(Map<String, dynamic> json) => GitlabCommit()
|
||||
..id = json['id'] as String?
|
||||
..shortId = json['short_id'] as String?
|
||||
..title = json['title'] as String?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..authorName = json['author_name'] as String?
|
||||
..message = json['message'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GitlabCommitToJson(GitlabCommit instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -308,12 +288,10 @@ Map<String, dynamic> _$GitlabCommitToJson(GitlabCommit instance) =>
|
|||
'message': instance.message,
|
||||
};
|
||||
|
||||
GitlabDiff _$GitlabDiffFromJson(Map<String, dynamic> json) {
|
||||
return GitlabDiff()
|
||||
..diff = json['diff'] as String?
|
||||
..newPath = json['new_path'] as String?
|
||||
..oldPath = json['old_path'] as String?;
|
||||
}
|
||||
GitlabDiff _$GitlabDiffFromJson(Map<String, dynamic> json) => GitlabDiff()
|
||||
..diff = json['diff'] as String?
|
||||
..newPath = json['new_path'] as String?
|
||||
..oldPath = json['old_path'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GitlabDiffToJson(GitlabDiff instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -322,21 +300,19 @@ Map<String, dynamic> _$GitlabDiffToJson(GitlabDiff instance) =>
|
|||
'old_path': instance.oldPath,
|
||||
};
|
||||
|
||||
GitlabIssue _$GitlabIssueFromJson(Map<String, dynamic> json) {
|
||||
return GitlabIssue()
|
||||
..title = json['title'] as String?
|
||||
..iid = json['iid'] as int?
|
||||
..projectId = json['project_id'] as int?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..userNotesCount = json['user_notes_count'] as int?
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..labels =
|
||||
(json['labels'] as List<dynamic>?)?.map((e) => e as String).toList();
|
||||
}
|
||||
GitlabIssue _$GitlabIssueFromJson(Map<String, dynamic> json) => GitlabIssue()
|
||||
..title = json['title'] as String?
|
||||
..iid = json['iid'] as int?
|
||||
..projectId = json['project_id'] as int?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..userNotesCount = json['user_notes_count'] as int?
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..labels =
|
||||
(json['labels'] as List<dynamic>?)?.map((e) => e as String).toList();
|
||||
|
||||
Map<String, dynamic> _$GitlabIssueToJson(GitlabIssue instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -349,15 +325,14 @@ Map<String, dynamic> _$GitlabIssueToJson(GitlabIssue instance) =>
|
|||
'labels': instance.labels,
|
||||
};
|
||||
|
||||
GitlabStarrer _$GitlabStarrerFromJson(Map<String, dynamic> json) {
|
||||
return GitlabStarrer()
|
||||
..starredSince = json['starred_since'] == null
|
||||
? null
|
||||
: DateTime.parse(json['starred_since'] as String)
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['user'] as Map<String, dynamic>);
|
||||
}
|
||||
GitlabStarrer _$GitlabStarrerFromJson(Map<String, dynamic> json) =>
|
||||
GitlabStarrer()
|
||||
..starredSince = json['starred_since'] == null
|
||||
? null
|
||||
: DateTime.parse(json['starred_since'] as String)
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GitlabUser.fromJson(json['user'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GitlabStarrerToJson(GitlabStarrer instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -365,11 +340,9 @@ Map<String, dynamic> _$GitlabStarrerToJson(GitlabStarrer instance) =>
|
|||
'user': instance.user,
|
||||
};
|
||||
|
||||
GitlabBranch _$GitlabBranchFromJson(Map<String, dynamic> json) {
|
||||
return GitlabBranch()
|
||||
..name = json['name'] as String?
|
||||
..merged = json['merged'] as bool?;
|
||||
}
|
||||
GitlabBranch _$GitlabBranchFromJson(Map<String, dynamic> json) => GitlabBranch()
|
||||
..name = json['name'] as String?
|
||||
..merged = json['merged'] as bool?;
|
||||
|
||||
Map<String, dynamic> _$GitlabBranchToJson(GitlabBranch instance) =>
|
||||
<String, dynamic>{
|
||||
|
|
|
@ -4,18 +4,21 @@ part 'gogs.g.dart';
|
|||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsUser {
|
||||
GogsUser();
|
||||
factory GogsUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsUserFromJson(json);
|
||||
int? id;
|
||||
String? username;
|
||||
String? fullName;
|
||||
String? avatarUrl;
|
||||
String? email;
|
||||
GogsUser();
|
||||
factory GogsUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsUserFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsRepository {
|
||||
GogsRepository();
|
||||
factory GogsRepository.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsRepositoryFromJson(json);
|
||||
int? id;
|
||||
String? fullName;
|
||||
bool? private;
|
||||
|
@ -29,13 +32,13 @@ class GogsRepository {
|
|||
int? forksCount;
|
||||
String? website;
|
||||
int? watchersCount;
|
||||
GogsRepository();
|
||||
factory GogsRepository.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsRepositoryFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsOrg {
|
||||
GogsOrg();
|
||||
factory GogsOrg.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsOrgFromJson(json);
|
||||
int? id;
|
||||
String? username;
|
||||
String? fullName;
|
||||
|
@ -43,73 +46,72 @@ class GogsOrg {
|
|||
String? description;
|
||||
String? location;
|
||||
String? website;
|
||||
GogsOrg();
|
||||
factory GogsOrg.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsOrgFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsTree {
|
||||
GogsTree({required this.type, required this.name});
|
||||
factory GogsTree.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsTreeFromJson(json);
|
||||
String type;
|
||||
String name;
|
||||
String? path;
|
||||
int? size;
|
||||
String? downloadUrl;
|
||||
GogsTree({required this.type, required this.name});
|
||||
factory GogsTree.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsTreeFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsBlob extends GogsTree {
|
||||
String? content;
|
||||
GogsBlob({required String type, required String name})
|
||||
: super(name: name, type: type);
|
||||
GogsBlob({required super.type, required super.name});
|
||||
factory GogsBlob.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsBlobFromJson(json);
|
||||
String? content;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsBranch {
|
||||
String? name;
|
||||
GogsBranch();
|
||||
factory GogsBranch.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsBranchFromJson(json);
|
||||
String? name;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsCommit {
|
||||
GogsCommit();
|
||||
factory GogsCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsCommitFromJson(json);
|
||||
GogsUser? author;
|
||||
GogsCommitDetail? commit;
|
||||
String? sha;
|
||||
String? htmlUrl;
|
||||
GogsCommit();
|
||||
factory GogsCommit.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsCommitFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsCommitDetail {
|
||||
String? message;
|
||||
GogsCommitAuthor? author;
|
||||
GogsCommitAuthor? committer;
|
||||
GogsCommitDetail();
|
||||
factory GogsCommitDetail.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsCommitDetailFromJson(json);
|
||||
String? message;
|
||||
GogsCommitAuthor? author;
|
||||
GogsCommitAuthor? committer;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsCommitAuthor {
|
||||
String? name;
|
||||
String? email;
|
||||
DateTime? date;
|
||||
GogsCommitAuthor();
|
||||
factory GogsCommitAuthor.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsCommitAuthorFromJson(json);
|
||||
String? name;
|
||||
String? email;
|
||||
DateTime? date;
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsIssue {
|
||||
GogsIssue();
|
||||
factory GogsIssue.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsIssueFromJson(json);
|
||||
int? number;
|
||||
String? state;
|
||||
String? title;
|
||||
|
@ -119,16 +121,13 @@ class GogsIssue {
|
|||
DateTime? createdAt;
|
||||
DateTime? updatedAt;
|
||||
int? comments;
|
||||
GogsIssue();
|
||||
factory GogsIssue.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsIssueFromJson(json);
|
||||
}
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class GogsLabel {
|
||||
String? name;
|
||||
String? color;
|
||||
GogsLabel();
|
||||
factory GogsLabel.fromJson(Map<String, dynamic> json) =>
|
||||
_$GogsLabelFromJson(json);
|
||||
String? name;
|
||||
String? color;
|
||||
}
|
||||
|
|
|
@ -6,14 +6,12 @@ part of 'gogs.dart';
|
|||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
GogsUser _$GogsUserFromJson(Map<String, dynamic> json) {
|
||||
return GogsUser()
|
||||
..id = json['id'] as int?
|
||||
..username = json['username'] as String?
|
||||
..fullName = json['full_name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..email = json['email'] as String?;
|
||||
}
|
||||
GogsUser _$GogsUserFromJson(Map<String, dynamic> json) => GogsUser()
|
||||
..id = json['id'] as int?
|
||||
..username = json['username'] as String?
|
||||
..fullName = json['full_name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..email = json['email'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GogsUserToJson(GogsUser instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
|
@ -23,28 +21,27 @@ Map<String, dynamic> _$GogsUserToJson(GogsUser instance) => <String, dynamic>{
|
|||
'email': instance.email,
|
||||
};
|
||||
|
||||
GogsRepository _$GogsRepositoryFromJson(Map<String, dynamic> json) {
|
||||
return GogsRepository()
|
||||
..id = json['id'] as int?
|
||||
..fullName = json['full_name'] as String?
|
||||
..private = json['private'] as bool?
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: GogsUser.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..defaultBranch = json['default_branch'] as String?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..starsCount = json['stars_count'] as int?
|
||||
..forksCount = json['forks_count'] as int?
|
||||
..website = json['website'] as String?
|
||||
..watchersCount = json['watchers_count'] as int?;
|
||||
}
|
||||
GogsRepository _$GogsRepositoryFromJson(Map<String, dynamic> json) =>
|
||||
GogsRepository()
|
||||
..id = json['id'] as int?
|
||||
..fullName = json['full_name'] as String?
|
||||
..private = json['private'] as bool?
|
||||
..owner = json['owner'] == null
|
||||
? null
|
||||
: GogsUser.fromJson(json['owner'] as Map<String, dynamic>)
|
||||
..htmlUrl = json['html_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..defaultBranch = json['default_branch'] as String?
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..starsCount = json['stars_count'] as int?
|
||||
..forksCount = json['forks_count'] as int?
|
||||
..website = json['website'] as String?
|
||||
..watchersCount = json['watchers_count'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GogsRepositoryToJson(GogsRepository instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -63,16 +60,14 @@ Map<String, dynamic> _$GogsRepositoryToJson(GogsRepository instance) =>
|
|||
'watchers_count': instance.watchersCount,
|
||||
};
|
||||
|
||||
GogsOrg _$GogsOrgFromJson(Map<String, dynamic> json) {
|
||||
return GogsOrg()
|
||||
..id = json['id'] as int?
|
||||
..username = json['username'] as String?
|
||||
..fullName = json['full_name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..location = json['location'] as String?
|
||||
..website = json['website'] as String?;
|
||||
}
|
||||
GogsOrg _$GogsOrgFromJson(Map<String, dynamic> json) => GogsOrg()
|
||||
..id = json['id'] as int?
|
||||
..username = json['username'] as String?
|
||||
..fullName = json['full_name'] as String?
|
||||
..avatarUrl = json['avatar_url'] as String?
|
||||
..description = json['description'] as String?
|
||||
..location = json['location'] as String?
|
||||
..website = json['website'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GogsOrgToJson(GogsOrg instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
|
@ -84,15 +79,13 @@ Map<String, dynamic> _$GogsOrgToJson(GogsOrg instance) => <String, dynamic>{
|
|||
'website': instance.website,
|
||||
};
|
||||
|
||||
GogsTree _$GogsTreeFromJson(Map<String, dynamic> json) {
|
||||
return GogsTree(
|
||||
type: json['type'] as String,
|
||||
name: json['name'] as String,
|
||||
)
|
||||
..path = json['path'] as String?
|
||||
..size = json['size'] as int?
|
||||
..downloadUrl = json['download_url'] as String?;
|
||||
}
|
||||
GogsTree _$GogsTreeFromJson(Map<String, dynamic> json) => GogsTree(
|
||||
type: json['type'] as String,
|
||||
name: json['name'] as String,
|
||||
)
|
||||
..path = json['path'] as String?
|
||||
..size = json['size'] as int?
|
||||
..downloadUrl = json['download_url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GogsTreeToJson(GogsTree instance) => <String, dynamic>{
|
||||
'type': instance.type,
|
||||
|
@ -102,16 +95,14 @@ Map<String, dynamic> _$GogsTreeToJson(GogsTree instance) => <String, dynamic>{
|
|||
'download_url': instance.downloadUrl,
|
||||
};
|
||||
|
||||
GogsBlob _$GogsBlobFromJson(Map<String, dynamic> json) {
|
||||
return GogsBlob(
|
||||
type: json['type'] as String,
|
||||
name: json['name'] as String,
|
||||
)
|
||||
..path = json['path'] as String?
|
||||
..size = json['size'] as int?
|
||||
..downloadUrl = json['download_url'] as String?
|
||||
..content = json['content'] as String?;
|
||||
}
|
||||
GogsBlob _$GogsBlobFromJson(Map<String, dynamic> json) => GogsBlob(
|
||||
type: json['type'] as String,
|
||||
name: json['name'] as String,
|
||||
)
|
||||
..path = json['path'] as String?
|
||||
..size = json['size'] as int?
|
||||
..downloadUrl = json['download_url'] as String?
|
||||
..content = json['content'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GogsBlobToJson(GogsBlob instance) => <String, dynamic>{
|
||||
'type': instance.type,
|
||||
|
@ -122,26 +113,23 @@ Map<String, dynamic> _$GogsBlobToJson(GogsBlob instance) => <String, dynamic>{
|
|||
'content': instance.content,
|
||||
};
|
||||
|
||||
GogsBranch _$GogsBranchFromJson(Map<String, dynamic> json) {
|
||||
return GogsBranch()..name = json['name'] as String?;
|
||||
}
|
||||
GogsBranch _$GogsBranchFromJson(Map<String, dynamic> json) =>
|
||||
GogsBranch()..name = json['name'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GogsBranchToJson(GogsBranch instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
GogsCommit _$GogsCommitFromJson(Map<String, dynamic> json) {
|
||||
return GogsCommit()
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GogsUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..commit = json['commit'] == null
|
||||
? null
|
||||
: GogsCommitDetail.fromJson(json['commit'] as Map<String, dynamic>)
|
||||
..sha = json['sha'] as String?
|
||||
..htmlUrl = json['html_url'] as String?;
|
||||
}
|
||||
GogsCommit _$GogsCommitFromJson(Map<String, dynamic> json) => GogsCommit()
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GogsUser.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..commit = json['commit'] == null
|
||||
? null
|
||||
: GogsCommitDetail.fromJson(json['commit'] as Map<String, dynamic>)
|
||||
..sha = json['sha'] as String?
|
||||
..htmlUrl = json['html_url'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GogsCommitToJson(GogsCommit instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -151,16 +139,16 @@ Map<String, dynamic> _$GogsCommitToJson(GogsCommit instance) =>
|
|||
'html_url': instance.htmlUrl,
|
||||
};
|
||||
|
||||
GogsCommitDetail _$GogsCommitDetailFromJson(Map<String, dynamic> json) {
|
||||
return GogsCommitDetail()
|
||||
..message = json['message'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GogsCommitAuthor.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..committer = json['committer'] == null
|
||||
? null
|
||||
: GogsCommitAuthor.fromJson(json['committer'] as Map<String, dynamic>);
|
||||
}
|
||||
GogsCommitDetail _$GogsCommitDetailFromJson(Map<String, dynamic> json) =>
|
||||
GogsCommitDetail()
|
||||
..message = json['message'] as String?
|
||||
..author = json['author'] == null
|
||||
? null
|
||||
: GogsCommitAuthor.fromJson(json['author'] as Map<String, dynamic>)
|
||||
..committer = json['committer'] == null
|
||||
? null
|
||||
: GogsCommitAuthor.fromJson(
|
||||
json['committer'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$GogsCommitDetailToJson(GogsCommitDetail instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -169,13 +157,12 @@ Map<String, dynamic> _$GogsCommitDetailToJson(GogsCommitDetail instance) =>
|
|||
'committer': instance.committer,
|
||||
};
|
||||
|
||||
GogsCommitAuthor _$GogsCommitAuthorFromJson(Map<String, dynamic> json) {
|
||||
return GogsCommitAuthor()
|
||||
..name = json['name'] as String?
|
||||
..email = json['email'] as String?
|
||||
..date =
|
||||
json['date'] == null ? null : DateTime.parse(json['date'] as String);
|
||||
}
|
||||
GogsCommitAuthor _$GogsCommitAuthorFromJson(Map<String, dynamic> json) =>
|
||||
GogsCommitAuthor()
|
||||
..name = json['name'] as String?
|
||||
..email = json['email'] as String?
|
||||
..date =
|
||||
json['date'] == null ? null : DateTime.parse(json['date'] as String);
|
||||
|
||||
Map<String, dynamic> _$GogsCommitAuthorToJson(GogsCommitAuthor instance) =>
|
||||
<String, dynamic>{
|
||||
|
@ -184,26 +171,24 @@ Map<String, dynamic> _$GogsCommitAuthorToJson(GogsCommitAuthor instance) =>
|
|||
'date': instance.date?.toIso8601String(),
|
||||
};
|
||||
|
||||
GogsIssue _$GogsIssueFromJson(Map<String, dynamic> json) {
|
||||
return GogsIssue()
|
||||
..number = json['number'] as int?
|
||||
..state = json['state'] as String?
|
||||
..title = json['title'] as String?
|
||||
..body = json['body'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GogsUser.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..labels = (json['labels'] as List<dynamic>?)
|
||||
?.map((e) => GogsLabel.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..comments = json['comments'] as int?;
|
||||
}
|
||||
GogsIssue _$GogsIssueFromJson(Map<String, dynamic> json) => GogsIssue()
|
||||
..number = json['number'] as int?
|
||||
..state = json['state'] as String?
|
||||
..title = json['title'] as String?
|
||||
..body = json['body'] as String?
|
||||
..user = json['user'] == null
|
||||
? null
|
||||
: GogsUser.fromJson(json['user'] as Map<String, dynamic>)
|
||||
..labels = (json['labels'] as List<dynamic>?)
|
||||
?.map((e) => GogsLabel.fromJson(e as Map<String, dynamic>))
|
||||
.toList()
|
||||
..createdAt = json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String)
|
||||
..updatedAt = json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String)
|
||||
..comments = json['comments'] as int?;
|
||||
|
||||
Map<String, dynamic> _$GogsIssueToJson(GogsIssue instance) => <String, dynamic>{
|
||||
'number': instance.number,
|
||||
|
@ -217,11 +202,9 @@ Map<String, dynamic> _$GogsIssueToJson(GogsIssue instance) => <String, dynamic>{
|
|||
'comments': instance.comments,
|
||||
};
|
||||
|
||||
GogsLabel _$GogsLabelFromJson(Map<String, dynamic> json) {
|
||||
return GogsLabel()
|
||||
..name = json['name'] as String?
|
||||
..color = json['color'] as String?;
|
||||
}
|
||||
GogsLabel _$GogsLabelFromJson(Map<String, dynamic> json) => GogsLabel()
|
||||
..name = json['name'] as String?
|
||||
..color = json['color'] as String?;
|
||||
|
||||
Map<String, dynamic> _$GogsLabelToJson(GogsLabel instance) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
|
|
|
@ -1,31 +1,25 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:git_touch/models/github.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
import '../utils/utils.dart';
|
||||
|
||||
class NotificationGroup {
|
||||
NotificationGroup(this.fullName);
|
||||
String? fullName;
|
||||
List<GithubNotificationItem> items = [];
|
||||
|
||||
Tuple2<String, String>? _repo;
|
||||
String get owner {
|
||||
if (_repo == null) {
|
||||
_repo = parseRepositoryFullName(fullName!);
|
||||
}
|
||||
_repo ??= parseRepositoryFullName(fullName!);
|
||||
return _repo!.item1;
|
||||
}
|
||||
|
||||
String get name {
|
||||
if (_repo == null) {
|
||||
_repo = parseRepositoryFullName(fullName!);
|
||||
}
|
||||
_repo ??= parseRepositoryFullName(fullName!);
|
||||
return _repo!.item2;
|
||||
}
|
||||
|
||||
String get key => '_$hashCode';
|
||||
|
||||
NotificationGroup(this.fullName);
|
||||
}
|
||||
|
||||
class NotificationModel with ChangeNotifier {
|
||||
|
|
|
@ -1,21 +1,14 @@
|
|||
import 'package:universal_io/io.dart';
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:antd_mobile/antd_mobile.dart';
|
||||
import 'package:fimber/fimber.dart';
|
||||
import 'package:fluro/fluro.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:git_touch/widgets/action_button.dart';
|
||||
import 'package:primer/primer.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class AppThemeType {
|
||||
static const material = 0;
|
||||
static const cupertino = 1;
|
||||
static const values = [AppThemeType.material, AppThemeType.cupertino];
|
||||
}
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:git_touch/widgets/action_button.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:universal_io/io.dart';
|
||||
|
||||
class AppBrightnessType {
|
||||
static const followSystem = 0;
|
||||
|
@ -35,77 +28,48 @@ class AppMarkdownType {
|
|||
}
|
||||
|
||||
class PickerItem<T> {
|
||||
PickerItem(this.value, {required this.text});
|
||||
final T value;
|
||||
final String? text;
|
||||
PickerItem(this.value, {required this.text});
|
||||
}
|
||||
|
||||
class PickerGroupItem<T> {
|
||||
final T value;
|
||||
final List<PickerItem<T>> items;
|
||||
final Function(T value)? onChange;
|
||||
final Function(T value)? onClose;
|
||||
|
||||
PickerGroupItem({
|
||||
required this.value,
|
||||
required this.items,
|
||||
this.onChange,
|
||||
this.onClose,
|
||||
});
|
||||
final T value;
|
||||
final List<PickerItem<T>> items;
|
||||
final Function(T value)? onChange;
|
||||
final Function(T value)? onClose;
|
||||
}
|
||||
|
||||
class SelectorItem<T> {
|
||||
SelectorItem({required this.value, required this.text});
|
||||
T value;
|
||||
String text;
|
||||
SelectorItem({required this.value, required this.text});
|
||||
}
|
||||
|
||||
// No animation. For replacing route
|
||||
// TODO: Go back
|
||||
class StaticRoute extends PageRouteBuilder {
|
||||
final WidgetBuilder? builder;
|
||||
StaticRoute({this.builder})
|
||||
: super(
|
||||
pageBuilder: (BuildContext context, Animation<double> animation,
|
||||
Animation<double> secondaryAnimation) {
|
||||
pageBuilder: (context, animation, secondaryAnimation) {
|
||||
return builder!(context);
|
||||
},
|
||||
transitionsBuilder: (BuildContext context,
|
||||
Animation<double> animation,
|
||||
Animation<double> secondaryAnimation,
|
||||
Widget child) {
|
||||
transitionsBuilder: (context, animation, secondaryAnimation, child) {
|
||||
return child;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
class Palette {
|
||||
final Color primary;
|
||||
final Color text;
|
||||
final Color secondaryText;
|
||||
final Color tertiaryText;
|
||||
final Color background;
|
||||
final Color grayBackground;
|
||||
final Color border;
|
||||
|
||||
const Palette({
|
||||
required this.primary,
|
||||
required this.text,
|
||||
required this.secondaryText,
|
||||
required this.tertiaryText,
|
||||
required this.background,
|
||||
required this.grayBackground,
|
||||
required this.border,
|
||||
});
|
||||
final WidgetBuilder? builder;
|
||||
}
|
||||
|
||||
class ThemeModel with ChangeNotifier {
|
||||
String? markdownCss;
|
||||
|
||||
int? _theme;
|
||||
int? get theme => _theme;
|
||||
bool get ready => _theme != null;
|
||||
|
||||
Brightness systemBrightness = Brightness.light;
|
||||
void setSystemBrightness(Brightness v) {
|
||||
if (v != systemBrightness) {
|
||||
|
@ -177,51 +141,11 @@ class ThemeModel with ChangeNotifier {
|
|||
notifyListeners();
|
||||
}
|
||||
|
||||
final router = FluroRouter();
|
||||
|
||||
final paletteLight = Palette(
|
||||
primary: PrimerColors.blue500,
|
||||
text: Colors.black,
|
||||
secondaryText: Colors.grey.shade800,
|
||||
tertiaryText: Colors.grey.shade600,
|
||||
background: Colors.white,
|
||||
grayBackground: Colors.grey.shade100,
|
||||
border: Colors.grey.shade300,
|
||||
);
|
||||
final paletteDark = Palette(
|
||||
primary: PrimerColors.blue500,
|
||||
text: Colors.grey.shade300,
|
||||
secondaryText: Colors.grey.shade400,
|
||||
tertiaryText: Colors.grey.shade500,
|
||||
background: Colors.black,
|
||||
grayBackground: Colors.grey.shade900,
|
||||
border: Colors.grey.shade700,
|
||||
);
|
||||
|
||||
Palette get palette {
|
||||
switch (brightness) {
|
||||
case Brightness.dark:
|
||||
return paletteDark;
|
||||
case Brightness.light:
|
||||
default:
|
||||
return paletteLight;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> init() async {
|
||||
markdownCss = await rootBundle.loadString('images/github-markdown.css');
|
||||
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
|
||||
final v = prefs.getInt(StorageKeys.iTheme);
|
||||
Fimber.d('read theme: $v');
|
||||
if (AppThemeType.values.contains(v)) {
|
||||
_theme = v;
|
||||
} else if (Platform.isIOS || Platform.isMacOS) {
|
||||
_theme = AppThemeType.cupertino;
|
||||
} else {
|
||||
_theme = AppThemeType.material;
|
||||
}
|
||||
final b = prefs.getInt(StorageKeys.iBrightness);
|
||||
Fimber.d('read brightness: $b');
|
||||
if (AppBrightnessType.values.contains(b)) {
|
||||
|
@ -239,49 +163,6 @@ class ThemeModel with ChangeNotifier {
|
|||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<void> setTheme(int v) async {
|
||||
_theme = v;
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setInt(StorageKeys.iTheme, v);
|
||||
Fimber.d('write theme: $v');
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
push(BuildContext context, String url, {bool replace = false}) {
|
||||
// Fimber.d(url);
|
||||
if (url.startsWith('/')) {
|
||||
return router.navigateTo(
|
||||
context,
|
||||
url,
|
||||
transition: theme == AppThemeType.cupertino
|
||||
? TransitionType.cupertino
|
||||
: TransitionType.material,
|
||||
replace: replace,
|
||||
);
|
||||
} else {
|
||||
launchUrl(url);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> showWarning(BuildContext context, String message) async {
|
||||
showCupertinoDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return CupertinoAlertDialog(
|
||||
title: Text(message),
|
||||
actions: <Widget>[
|
||||
CupertinoDialogAction(
|
||||
child: const Text('OK'),
|
||||
onPressed: () {
|
||||
Navigator.pop(context, true);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<bool?> showConfirm(BuildContext context, Widget content) {
|
||||
return showCupertinoDialog(
|
||||
context: context,
|
||||
|
@ -290,11 +171,11 @@ class ThemeModel with ChangeNotifier {
|
|||
title: content,
|
||||
actions: <Widget>[
|
||||
CupertinoDialogAction(
|
||||
child: const Text('cancel'),
|
||||
isDefaultAction: true,
|
||||
onPressed: () {
|
||||
Navigator.pop(context, false);
|
||||
},
|
||||
child: const Text('cancel'),
|
||||
),
|
||||
CupertinoDialogAction(
|
||||
child: const Text('OK'),
|
||||
|
@ -306,37 +187,15 @@ class ThemeModel with ChangeNotifier {
|
|||
);
|
||||
},
|
||||
);
|
||||
// default:
|
||||
// return showDialog(
|
||||
// context: context,
|
||||
// builder: (BuildContext context) {
|
||||
// return AlertDialog(
|
||||
// content: content,
|
||||
// actions: <Widget>[
|
||||
// FlatButton(
|
||||
// child: const Text('CANCEL'),
|
||||
// onPressed: () {
|
||||
// Navigator.pop(context, false);
|
||||
// },
|
||||
// ),
|
||||
// FlatButton(
|
||||
// child: const Text('OK'),
|
||||
// onPressed: () {
|
||||
// Navigator.pop(context, true);
|
||||
// },
|
||||
// )
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
}
|
||||
|
||||
static Timer? _debounce;
|
||||
String? _selectedItem;
|
||||
|
||||
showPicker(BuildContext context, PickerGroupItem<String?> groupItem) async {
|
||||
await showCupertinoModalPopup(
|
||||
await AntPopup.show(
|
||||
context: context,
|
||||
closeOnMaskClick: true,
|
||||
builder: (context) {
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
|
@ -344,10 +203,10 @@ class ThemeModel with ChangeNotifier {
|
|||
Container(
|
||||
alignment: Alignment.bottomCenter,
|
||||
decoration: BoxDecoration(
|
||||
color: palette.background,
|
||||
color: AntTheme.of(context).colorBackground,
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: palette.grayBackground,
|
||||
color: AntTheme.of(context).colorBox,
|
||||
width: 0.0,
|
||||
),
|
||||
),
|
||||
|
@ -356,7 +215,6 @@ class ThemeModel with ChangeNotifier {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
CupertinoButton(
|
||||
child: Text('Cancel'),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
_selectedItem = groupItem.value;
|
||||
|
@ -365,9 +223,9 @@ class ThemeModel with ChangeNotifier {
|
|||
horizontal: 16.0,
|
||||
vertical: 5.0,
|
||||
),
|
||||
child: const Text('Cancel'),
|
||||
),
|
||||
CupertinoButton(
|
||||
child: Text('Confirm'),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
groupItem.onClose!(_selectedItem);
|
||||
|
@ -376,18 +234,15 @@ class ThemeModel with ChangeNotifier {
|
|||
horizontal: 16.0,
|
||||
vertical: 5.0,
|
||||
),
|
||||
child: const Text('Confirm'),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
SizedBox(
|
||||
height: 216,
|
||||
child: CupertinoPicker(
|
||||
backgroundColor: palette.background,
|
||||
children: <Widget>[
|
||||
for (var v in groupItem.items)
|
||||
Text(v.text!, style: TextStyle(color: palette.text)),
|
||||
],
|
||||
backgroundColor: AntTheme.of(context).colorBackground,
|
||||
itemExtent: 40,
|
||||
scrollController: FixedExtentScrollController(
|
||||
initialItem: groupItem.items
|
||||
|
@ -406,6 +261,12 @@ class ThemeModel with ChangeNotifier {
|
|||
});
|
||||
}
|
||||
},
|
||||
children: <Widget>[
|
||||
for (var v in groupItem.items)
|
||||
Text(v.text!,
|
||||
style:
|
||||
TextStyle(color: AntTheme.of(context).colorText)),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
|
@ -415,33 +276,23 @@ class ThemeModel with ChangeNotifier {
|
|||
}
|
||||
|
||||
showActions(BuildContext context, List<ActionItem> actionItems) async {
|
||||
final value = await showCupertinoModalPopup<int>(
|
||||
await AntActionSheet.show(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return CupertinoActionSheet(
|
||||
title: Text('Actions'),
|
||||
actions: actionItems.asMap().entries.map((entry) {
|
||||
return CupertinoActionSheetAction(
|
||||
child: Text(entry.value.text!),
|
||||
isDestructiveAction: entry.value.isDestructiveAction,
|
||||
onPressed: () {
|
||||
Navigator.pop(context, entry.key);
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
cancelButton: CupertinoActionSheetAction(
|
||||
child: const Text('Cancel'),
|
||||
isDefaultAction: true,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
extra: const Text('Actions'),
|
||||
actions: [
|
||||
for (final item in actionItems)
|
||||
AntActionSheetAction(
|
||||
text: Text(
|
||||
item.text!,
|
||||
style: TextStyle(
|
||||
color: item.danger ? AntTheme.of(context).colorDanger : null),
|
||||
),
|
||||
onClick: () {
|
||||
item.onTap?.call(context);
|
||||
},
|
||||
key: null,
|
||||
),
|
||||
);
|
||||
},
|
||||
],
|
||||
);
|
||||
|
||||
if (value != null) {
|
||||
actionItems[value].onTap!(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
1495
lib/router.dart
1495
lib/router.dart
File diff suppressed because it is too large
Load Diff
|
@ -1,20 +1,16 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class CommonScaffold extends StatelessWidget {
|
||||
final Widget title;
|
||||
final Widget body;
|
||||
final Widget? action;
|
||||
final PreferredSizeWidget? bottom;
|
||||
|
||||
CommonScaffold({
|
||||
const CommonScaffold({
|
||||
required this.title,
|
||||
required this.body,
|
||||
this.action,
|
||||
this.bottom,
|
||||
});
|
||||
final Widget title;
|
||||
final Widget body;
|
||||
final Widget? action;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -22,26 +18,12 @@ class CommonScaffold extends StatelessWidget {
|
|||
// FIXME: A hack to get brightness before MaterialApp been built
|
||||
theme.setSystemBrightness(MediaQuery.of(context).platformBrightness);
|
||||
|
||||
switch (theme.theme) {
|
||||
case AppThemeType.cupertino:
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
middle: title,
|
||||
trailing: action,
|
||||
),
|
||||
child: SafeArea(child: body),
|
||||
);
|
||||
default:
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: title,
|
||||
actions: [
|
||||
if (action != null) action!,
|
||||
],
|
||||
bottom: bottom,
|
||||
),
|
||||
body: body,
|
||||
);
|
||||
}
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
middle: title,
|
||||
trailing: action,
|
||||
),
|
||||
child: SafeArea(child: body),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,31 +1,28 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:antd_mobile/antd_mobile.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:git_touch/widgets/empty.dart';
|
||||
import 'package:git_touch/widgets/error_reload.dart';
|
||||
import 'package:git_touch/widgets/loading.dart';
|
||||
import 'package:git_touch/widgets/empty.dart';
|
||||
|
||||
export 'package:git_touch/utils/utils.dart';
|
||||
|
||||
// This is a scaffold for infinite scroll screens
|
||||
class ListStatefulScaffold<T, K> extends StatefulWidget {
|
||||
final Widget title;
|
||||
final Widget Function()? actionBuilder;
|
||||
final Widget Function(T payload) itemBuilder;
|
||||
final Future<ListPayload<T, K>> Function(K? cursor) fetch;
|
||||
|
||||
ListStatefulScaffold({
|
||||
const ListStatefulScaffold({
|
||||
required this.title,
|
||||
required this.fetch,
|
||||
required this.itemBuilder,
|
||||
this.actionBuilder,
|
||||
});
|
||||
final Widget title;
|
||||
final Widget Function()? actionBuilder;
|
||||
final Widget Function(T payload) itemBuilder;
|
||||
final Future<ListPayload<T, K>> Function(K? cursor) fetch;
|
||||
|
||||
@override
|
||||
_ListStatefulScaffoldState<T, K> createState() =>
|
||||
State<ListStatefulScaffold<T, K>> createState() =>
|
||||
_ListStatefulScaffoldState();
|
||||
}
|
||||
|
||||
|
@ -39,7 +36,7 @@ class _ListStatefulScaffoldState<T, K>
|
|||
K? cursor;
|
||||
bool? hasMore;
|
||||
|
||||
ScrollController _controller = ScrollController();
|
||||
final ScrollController _controller = ScrollController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
@ -69,13 +66,13 @@ class _ListStatefulScaffoldState<T, K>
|
|||
loading = true;
|
||||
});
|
||||
try {
|
||||
final ListPayload<T, K> p = await widget.fetch(null);
|
||||
final p = await widget.fetch(null);
|
||||
items = p.items.toList();
|
||||
cursor = p.cursor;
|
||||
hasMore = p.hasMore;
|
||||
} catch (err) {
|
||||
error = err.toString();
|
||||
throw err;
|
||||
rethrow;
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
@ -91,13 +88,13 @@ class _ListStatefulScaffoldState<T, K>
|
|||
loadingMore = true;
|
||||
});
|
||||
try {
|
||||
ListPayload<T, K> p = await widget.fetch(cursor);
|
||||
final p = await widget.fetch(cursor);
|
||||
items.addAll(p.items);
|
||||
cursor = p.cursor;
|
||||
hasMore = p.hasMore;
|
||||
} catch (err) {
|
||||
error = err.toString();
|
||||
throw err;
|
||||
rethrow;
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
@ -107,82 +104,45 @@ class _ListStatefulScaffoldState<T, K>
|
|||
}
|
||||
}
|
||||
|
||||
Widget _buildItem(BuildContext context, int index) {
|
||||
if (index == 2 * items.length) {
|
||||
if (hasMore != false) {
|
||||
return Loading(more: true);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
} else if (index % 2 == 1) {
|
||||
return CommonStyle.border;
|
||||
} else {
|
||||
return widget.itemBuilder(items[index ~/ 2]);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildCupertinoSliver() {
|
||||
if (error.isNotEmpty) {
|
||||
return SliverToBoxAdapter(
|
||||
child: ErrorReload(text: error, onTap: _refresh),
|
||||
);
|
||||
} else if (loading && items.isEmpty) {
|
||||
return SliverToBoxAdapter(child: Loading(more: false));
|
||||
return const SliverToBoxAdapter(child: Loading(more: false));
|
||||
} else if (items.isEmpty) {
|
||||
return SliverToBoxAdapter(child: EmptyWidget());
|
||||
} else {
|
||||
return SliverList(
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
_buildItem,
|
||||
childCount: 2 * items.length + 1,
|
||||
),
|
||||
return AntSliverList(
|
||||
count: items.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
if (index == items.length) {
|
||||
if (hasMore != false) {
|
||||
return const Loading(more: true);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
}
|
||||
return widget.itemBuilder(items[index]);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildMaterial() {
|
||||
if (error.isNotEmpty) {
|
||||
return ErrorReload(text: error, onTap: _refresh);
|
||||
} else if (loading && items.isEmpty) {
|
||||
return Loading(more: false);
|
||||
} else if (items.isEmpty) {
|
||||
return EmptyWidget();
|
||||
} else {
|
||||
return Scrollbar(
|
||||
child: ListView.builder(
|
||||
controller: _controller,
|
||||
itemCount: 2 * items.length + 1,
|
||||
itemBuilder: _buildItem,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildBody() {
|
||||
switch (Provider.of<ThemeModel>(context).theme) {
|
||||
case AppThemeType.cupertino:
|
||||
return CupertinoScrollbar(
|
||||
child: CustomScrollView(
|
||||
controller: _controller,
|
||||
slivers: [
|
||||
CupertinoSliverRefreshControl(onRefresh: _refresh),
|
||||
_buildCupertinoSliver(),
|
||||
],
|
||||
),
|
||||
);
|
||||
default:
|
||||
return RefreshIndicator(
|
||||
onRefresh: _refresh,
|
||||
child: _buildMaterial(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CommonScaffold(
|
||||
title: widget.title,
|
||||
body: _buildBody(),
|
||||
body: CupertinoScrollbar(
|
||||
child: CustomScrollView(
|
||||
controller: _controller,
|
||||
slivers: [
|
||||
CupertinoSliverRefreshControl(onRefresh: _refresh),
|
||||
_buildCupertinoSliver(),
|
||||
],
|
||||
),
|
||||
),
|
||||
action: widget.actionBuilder?.call(),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:antd_mobile/antd_mobile.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../widgets/loading.dart';
|
||||
import '../widgets/link.dart';
|
||||
import '../widgets/error_reload.dart';
|
||||
import 'package:git_touch/widgets/error_reload.dart';
|
||||
import 'package:git_touch/widgets/link.dart';
|
||||
import 'package:git_touch/widgets/loading.dart';
|
||||
|
||||
class LongListPayload<T, K> {
|
||||
T header;
|
||||
int totalCount;
|
||||
String? cursor;
|
||||
List<K> leadingItems;
|
||||
List<K>? trailingItems;
|
||||
|
||||
LongListPayload({
|
||||
required this.header,
|
||||
required this.totalCount,
|
||||
|
@ -22,6 +13,11 @@ class LongListPayload<T, K> {
|
|||
required this.leadingItems,
|
||||
this.trailingItems,
|
||||
});
|
||||
T header;
|
||||
int totalCount;
|
||||
String? cursor;
|
||||
List<K> leadingItems;
|
||||
List<K>? trailingItems;
|
||||
}
|
||||
|
||||
// This is a scaffold for issue and pull request
|
||||
|
@ -29,14 +25,7 @@ class LongListPayload<T, K> {
|
|||
// We should load leading and trailing items at first fetching, and do load more in the middle
|
||||
// e.g. https://github.com/reactjs/rfcs/pull/68
|
||||
class LongListStatefulScaffold<T, K> extends StatefulWidget {
|
||||
final Widget title;
|
||||
final Widget Function(T t)? trailingBuilder;
|
||||
final Widget Function(T t) headerBuilder;
|
||||
final Widget Function(K k) itemBuilder;
|
||||
final Future<LongListPayload<T, K>> Function() onRefresh;
|
||||
final Future<LongListPayload<T, K>> Function(String? cursor) onLoadMore;
|
||||
|
||||
LongListStatefulScaffold({
|
||||
const LongListStatefulScaffold({
|
||||
required this.title,
|
||||
this.trailingBuilder,
|
||||
required this.headerBuilder,
|
||||
|
@ -44,9 +33,15 @@ class LongListStatefulScaffold<T, K> extends StatefulWidget {
|
|||
required this.onRefresh,
|
||||
required this.onLoadMore,
|
||||
});
|
||||
final Widget title;
|
||||
final Widget Function(T t)? trailingBuilder;
|
||||
final Widget Function(T t) headerBuilder;
|
||||
final Widget Function(K k) itemBuilder;
|
||||
final Future<LongListPayload<T, K>> Function() onRefresh;
|
||||
final Future<LongListPayload<T, K>> Function(String? cursor) onLoadMore;
|
||||
|
||||
@override
|
||||
_LongListStatefulScaffoldState<T, K> createState() =>
|
||||
State<LongListStatefulScaffold<T, K>> createState() =>
|
||||
_LongListStatefulScaffoldState();
|
||||
}
|
||||
|
||||
|
@ -74,7 +69,7 @@ class _LongListStatefulScaffoldState<T, K>
|
|||
payload = await widget.onRefresh();
|
||||
} catch (err) {
|
||||
error = err.toString();
|
||||
throw err;
|
||||
rethrow;
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
@ -90,11 +85,10 @@ class _LongListStatefulScaffoldState<T, K>
|
|||
loadingMore = true;
|
||||
});
|
||||
try {
|
||||
LongListPayload<T?, K> _payload =
|
||||
await widget.onLoadMore(payload!.cursor);
|
||||
payload!.totalCount = _payload.totalCount;
|
||||
payload!.cursor = _payload.cursor;
|
||||
payload!.leadingItems.addAll(_payload.leadingItems);
|
||||
final LongListPayload<T?, K> p = await widget.onLoadMore(payload!.cursor);
|
||||
payload!.totalCount = p.totalCount;
|
||||
payload!.cursor = p.cursor;
|
||||
payload!.leadingItems.addAll(p.leadingItems);
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
@ -105,18 +99,16 @@ class _LongListStatefulScaffoldState<T, K>
|
|||
}
|
||||
|
||||
Widget _buildItem(BuildContext context, int index) {
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
|
||||
if (index % 2 == 1) {
|
||||
return CommonStyle.border;
|
||||
}
|
||||
|
||||
int realIndex = index ~/ 2;
|
||||
final realIndex = index ~/ 2;
|
||||
|
||||
if (realIndex < payload!.leadingItems.length) {
|
||||
return widget.itemBuilder(payload!.leadingItems[realIndex]);
|
||||
} else if (realIndex == payload!.leadingItems.length) {
|
||||
var count = payload!.totalCount -
|
||||
final count = payload!.totalCount -
|
||||
payload!.leadingItems.length +
|
||||
payload!.trailingItems!.length;
|
||||
return Container(
|
||||
|
@ -127,20 +119,21 @@ class _LongListStatefulScaffoldState<T, K>
|
|||
child: Container(
|
||||
padding: CommonStyle.padding,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: theme.palette.text),
|
||||
border: Border.all(color: AntTheme.of(context).colorText),
|
||||
),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text('$count hidden items',
|
||||
style:
|
||||
TextStyle(color: theme.palette.text, fontSize: 15)),
|
||||
Padding(padding: EdgeInsets.only(top: 4)),
|
||||
style: TextStyle(
|
||||
color: AntTheme.of(context).colorText, fontSize: 15)),
|
||||
const Padding(padding: EdgeInsets.only(top: 4)),
|
||||
loadingMore
|
||||
? CupertinoActivityIndicator()
|
||||
? const CupertinoActivityIndicator()
|
||||
: Text(
|
||||
'Load more...',
|
||||
style: TextStyle(
|
||||
color: theme.palette.primary, fontSize: 16),
|
||||
color: AntTheme.of(context).colorPrimary,
|
||||
fontSize: 16),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -155,7 +148,7 @@ class _LongListStatefulScaffoldState<T, K>
|
|||
}
|
||||
|
||||
int get _itemCount {
|
||||
int count = payload!.leadingItems.length + payload!.trailingItems!.length;
|
||||
var count = payload!.leadingItems.length + payload!.trailingItems!.length;
|
||||
if (payload!.totalCount > count) {
|
||||
count++;
|
||||
}
|
||||
|
@ -168,7 +161,7 @@ class _LongListStatefulScaffoldState<T, K>
|
|||
child: ErrorReload(text: error, onTap: _refresh));
|
||||
} else if (loading) {
|
||||
// TODO:
|
||||
return SliverToBoxAdapter(child: Loading(more: false));
|
||||
return const SliverToBoxAdapter(child: Loading(more: false));
|
||||
} else {
|
||||
return SliverList(
|
||||
delegate:
|
||||
|
@ -179,51 +172,27 @@ class _LongListStatefulScaffoldState<T, K>
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
switch (Provider.of<ThemeModel>(context).theme) {
|
||||
case AppThemeType.cupertino:
|
||||
List<Widget> slivers = [
|
||||
CupertinoSliverRefreshControl(onRefresh: _refresh)
|
||||
];
|
||||
if (payload != null) {
|
||||
slivers.add(
|
||||
SliverToBoxAdapter(child: widget.headerBuilder(payload!.header)),
|
||||
);
|
||||
}
|
||||
slivers.add(_buildSliver());
|
||||
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
middle: widget.title,
|
||||
trailing: payload == null
|
||||
? null
|
||||
: widget.trailingBuilder!(payload!.header),
|
||||
),
|
||||
child: SafeArea(
|
||||
child: CupertinoScrollbar(
|
||||
child: CustomScrollView(slivers: slivers),
|
||||
),
|
||||
),
|
||||
);
|
||||
default:
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: widget.title,
|
||||
actions: payload == null
|
||||
? null
|
||||
: [widget.trailingBuilder!(payload!.header)],
|
||||
),
|
||||
body: RefreshIndicator(
|
||||
onRefresh: _refresh,
|
||||
child: Scrollbar(
|
||||
child: CustomScrollView(slivers: [
|
||||
if (payload != null)
|
||||
SliverToBoxAdapter(
|
||||
child: widget.headerBuilder(payload!.header)),
|
||||
_buildSliver(),
|
||||
]),
|
||||
),
|
||||
),
|
||||
);
|
||||
final slivers = <Widget>[
|
||||
CupertinoSliverRefreshControl(onRefresh: _refresh)
|
||||
];
|
||||
if (payload != null) {
|
||||
slivers.add(
|
||||
SliverToBoxAdapter(child: widget.headerBuilder(payload!.header)),
|
||||
);
|
||||
}
|
||||
slivers.add(_buildSliver());
|
||||
|
||||
return CupertinoPageScaffold(
|
||||
navigationBar: CupertinoNavigationBar(
|
||||
middle: widget.title,
|
||||
trailing:
|
||||
payload == null ? null : widget.trailingBuilder!(payload!.header),
|
||||
),
|
||||
child: SafeArea(
|
||||
child: CupertinoScrollbar(
|
||||
child: CustomScrollView(slivers: slivers),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/scaffolds/utils.dart';
|
||||
|
||||
class RefreshStatefulScaffold<T> extends StatefulWidget {
|
||||
final Widget title;
|
||||
final Widget? Function(T data, void Function(T newData) setData) bodyBuilder;
|
||||
final Future<T> Function() fetch;
|
||||
final Widget? Function(T data, void Function(T newData) setData)?
|
||||
actionBuilder;
|
||||
final Widget? action;
|
||||
final canRefresh;
|
||||
|
||||
RefreshStatefulScaffold({
|
||||
const RefreshStatefulScaffold({
|
||||
required this.title,
|
||||
required this.bodyBuilder,
|
||||
required this.fetch,
|
||||
|
@ -20,9 +12,16 @@ class RefreshStatefulScaffold<T> extends StatefulWidget {
|
|||
this.action,
|
||||
this.canRefresh = true,
|
||||
}) : assert(actionBuilder == null || action == null);
|
||||
final Widget title;
|
||||
final Widget? Function(T data, void Function(T newData) setData) bodyBuilder;
|
||||
final Future<T> Function() fetch;
|
||||
final Widget? Function(T data, void Function(T newData) setData)?
|
||||
actionBuilder;
|
||||
final Widget? action;
|
||||
final bool canRefresh;
|
||||
|
||||
@override
|
||||
_RefreshStatefulScaffoldState<T> createState() =>
|
||||
State<RefreshStatefulScaffold<T>> createState() =>
|
||||
_RefreshStatefulScaffoldState();
|
||||
}
|
||||
|
||||
|
@ -48,7 +47,7 @@ class _RefreshStatefulScaffoldState<T>
|
|||
_data = await widget.fetch();
|
||||
} catch (err) {
|
||||
_error = err.toString();
|
||||
throw err;
|
||||
rethrow;
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
@ -61,7 +60,7 @@ class _RefreshStatefulScaffoldState<T>
|
|||
Widget? get _action {
|
||||
if (widget.action != null) return widget.action;
|
||||
if (widget.actionBuilder == null || _data == null) return null;
|
||||
return widget.actionBuilder!(_data!, (v) {
|
||||
return widget.actionBuilder!(_data as T, (v) {
|
||||
setState(() {
|
||||
_data = v;
|
||||
});
|
||||
|
@ -71,7 +70,7 @@ class _RefreshStatefulScaffoldState<T>
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget child = ErrorLoadingWrapper(
|
||||
bodyBuilder: () => widget.bodyBuilder(_data!, (v) {
|
||||
bodyBuilder: () => widget.bodyBuilder(_data as T, (v) {
|
||||
setState(() {
|
||||
_data = v;
|
||||
});
|
||||
|
|
|
@ -1,22 +1,21 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
|
||||
class SingleScaffold extends StatelessWidget {
|
||||
final Widget title;
|
||||
final Widget body;
|
||||
final Widget? action;
|
||||
|
||||
SingleScaffold({
|
||||
const SingleScaffold({
|
||||
required this.title,
|
||||
required this.body,
|
||||
this.action,
|
||||
});
|
||||
final Widget title;
|
||||
final Widget body;
|
||||
final Widget? action;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CommonScaffold(
|
||||
title: title,
|
||||
body: Scrollbar(child: SingleChildScrollView(child: body)),
|
||||
body: CupertinoScrollbar(child: SingleChildScrollView(child: body)),
|
||||
action: action,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,20 +1,9 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/scaffolds/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class TabScaffold extends StatelessWidget {
|
||||
final Widget title;
|
||||
final Widget body;
|
||||
final Widget? action;
|
||||
final void Function() onRefresh;
|
||||
final List<String> tabs;
|
||||
final int activeTab;
|
||||
final Function(int index) onTabSwitch;
|
||||
|
||||
TabScaffold({
|
||||
const TabScaffold({
|
||||
required this.title,
|
||||
required this.body,
|
||||
this.action,
|
||||
|
@ -23,57 +12,41 @@ class TabScaffold extends StatelessWidget {
|
|||
required this.activeTab,
|
||||
required this.onTabSwitch,
|
||||
});
|
||||
|
||||
Widget _buildTitle(BuildContext context) {
|
||||
switch (Provider.of<ThemeModel>(context).theme) {
|
||||
case AppThemeType.cupertino:
|
||||
return DefaultTextStyle(
|
||||
style: DefaultTextStyle.of(context).style.copyWith(fontSize: 14),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CupertinoSlidingSegmentedControl<int>(
|
||||
groupValue: activeTab,
|
||||
onValueChanged: (v) {
|
||||
if (v == null) return;
|
||||
onTabSwitch(v);
|
||||
},
|
||||
children: tabs.asMap().map((key, text) => MapEntry(
|
||||
key,
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Text(text),
|
||||
))),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
default:
|
||||
return title;
|
||||
}
|
||||
}
|
||||
final Widget title;
|
||||
final Widget body;
|
||||
final Widget? action;
|
||||
final void Function() onRefresh;
|
||||
final List<String> tabs;
|
||||
final int activeTab;
|
||||
final Function(int index) onTabSwitch;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final scaffold = CommonScaffold(
|
||||
title: _buildTitle(context),
|
||||
return CommonScaffold(
|
||||
title: DefaultTextStyle(
|
||||
style: DefaultTextStyle.of(context).style.copyWith(fontSize: 14),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: CupertinoSlidingSegmentedControl<int>(
|
||||
groupValue: activeTab,
|
||||
onValueChanged: (v) {
|
||||
if (v == null) return;
|
||||
onTabSwitch(v);
|
||||
},
|
||||
children: tabs.asMap().map((key, text) => MapEntry(
|
||||
key,
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Text(text),
|
||||
))),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
body: RefreshWrapper(body: body, onRefresh: onRefresh),
|
||||
// action: action, // TODO:
|
||||
bottom: TabBar(
|
||||
onTap: onTabSwitch,
|
||||
tabs: tabs.map((text) => Tab(text: text.toUpperCase())).toList(),
|
||||
),
|
||||
);
|
||||
|
||||
switch (Provider.of<ThemeModel>(context).theme) {
|
||||
case AppThemeType.cupertino:
|
||||
return scaffold;
|
||||
default:
|
||||
return DefaultTabController(
|
||||
length: tabs.length,
|
||||
child: scaffold,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,25 +1,24 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:git_touch/scaffolds/tab.dart';
|
||||
import 'package:git_touch/scaffolds/utils.dart';
|
||||
|
||||
class TabStatefulScaffold<T> extends StatefulWidget {
|
||||
final Widget title;
|
||||
final Widget Function(T payload, int activeTab) bodyBuilder;
|
||||
final Future<T> Function(int activeTab) fetchData;
|
||||
final List<String> tabs;
|
||||
final Widget Function(T payload, void Function() refresh)? actionBuilder;
|
||||
|
||||
TabStatefulScaffold({
|
||||
const TabStatefulScaffold({
|
||||
required this.title,
|
||||
required this.bodyBuilder,
|
||||
required this.fetchData,
|
||||
required this.tabs,
|
||||
this.actionBuilder,
|
||||
});
|
||||
final Widget title;
|
||||
final Widget Function(T payload, int activeTab) bodyBuilder;
|
||||
final Future<T> Function(int activeTab) fetchData;
|
||||
final List<String> tabs;
|
||||
final Widget Function(T payload, void Function() refresh)? actionBuilder;
|
||||
|
||||
@override
|
||||
_TabStatefulScaffoldState<T> createState() => _TabStatefulScaffoldState();
|
||||
State<TabStatefulScaffold<T>> createState() => _TabStatefulScaffoldState();
|
||||
}
|
||||
|
||||
class _TabStatefulScaffoldState<T> extends State<TabStatefulScaffold<T>> {
|
||||
|
@ -74,7 +73,7 @@ class _TabStatefulScaffoldState<T> extends State<TabStatefulScaffold<T>> {
|
|||
_payload = await widget.fetchData(_activeTab);
|
||||
} catch (err) {
|
||||
_error = err.toString();
|
||||
throw err;
|
||||
rethrow;
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
@ -90,7 +89,7 @@ class _TabStatefulScaffoldState<T> extends State<TabStatefulScaffold<T>> {
|
|||
title: widget.title,
|
||||
action: widget.actionBuilder == null
|
||||
? null
|
||||
: widget.actionBuilder!(_payload!, _refresh),
|
||||
: widget.actionBuilder!(_payload as T, _refresh),
|
||||
tabs: widget.tabs,
|
||||
activeTab: _activeTab,
|
||||
onTabSwitch: (selected) async {
|
||||
|
@ -105,7 +104,7 @@ class _TabStatefulScaffoldState<T> extends State<TabStatefulScaffold<T>> {
|
|||
},
|
||||
onRefresh: _refresh,
|
||||
body: ErrorLoadingWrapper(
|
||||
bodyBuilder: () => widget.bodyBuilder(_payload!, _activeTab),
|
||||
bodyBuilder: () => widget.bodyBuilder(_payload as T, _activeTab),
|
||||
error: _error,
|
||||
loading: _payload == null,
|
||||
reload: _refresh,
|
||||
|
|
|
@ -1,55 +1,40 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/widgets/error_reload.dart';
|
||||
import 'package:git_touch/widgets/loading.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class RefreshWrapper extends StatelessWidget {
|
||||
final Widget body;
|
||||
final void Function() onRefresh;
|
||||
|
||||
RefreshWrapper({
|
||||
const RefreshWrapper({
|
||||
required this.onRefresh,
|
||||
required this.body,
|
||||
});
|
||||
final Widget body;
|
||||
final void Function() onRefresh;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
switch (Provider.of<ThemeModel>(context).theme) {
|
||||
case AppThemeType.cupertino:
|
||||
return CupertinoScrollbar(
|
||||
child: CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
CupertinoSliverRefreshControl(
|
||||
onRefresh: onRefresh as Future<void> Function()?),
|
||||
SliverToBoxAdapter(child: body),
|
||||
],
|
||||
),
|
||||
);
|
||||
default:
|
||||
return RefreshIndicator(
|
||||
onRefresh: onRefresh as Future<void> Function(),
|
||||
child: Scrollbar(
|
||||
child: SingleChildScrollView(child: body),
|
||||
),
|
||||
);
|
||||
}
|
||||
return CupertinoScrollbar(
|
||||
child: CustomScrollView(
|
||||
slivers: <Widget>[
|
||||
CupertinoSliverRefreshControl(
|
||||
onRefresh: onRefresh as Future<void> Function()?),
|
||||
SliverToBoxAdapter(child: body),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ErrorLoadingWrapper extends StatelessWidget {
|
||||
final String error;
|
||||
final bool loading;
|
||||
final void Function() reload;
|
||||
final Widget? Function() bodyBuilder;
|
||||
|
||||
ErrorLoadingWrapper({
|
||||
const ErrorLoadingWrapper({
|
||||
required this.error,
|
||||
required this.loading,
|
||||
required this.reload,
|
||||
required this.bodyBuilder,
|
||||
});
|
||||
final String error;
|
||||
final bool loading;
|
||||
final void Function() reload;
|
||||
final Widget? Function() bodyBuilder;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
@ -58,7 +43,7 @@ class ErrorLoadingWrapper extends StatelessWidget {
|
|||
}
|
||||
|
||||
if (loading) {
|
||||
return Loading();
|
||||
return const Loading();
|
||||
}
|
||||
|
||||
return bodyBuilder()!;
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
// import 'package:flutter/material.dart';
|
||||
// import 'package:git_touch/models/theme.dart';
|
||||
// import 'package:git_touch/scaffolds/single.dart';
|
||||
// import 'package:git_touch/widgets/app_bar_title.dart';
|
||||
// import 'package:git_touch/widgets/table_view.dart';
|
||||
// import 'package:launch_review/launch_review.dart';
|
||||
// import 'package:package_info/package_info.dart';
|
||||
// import 'package:provider/provider.dart';
|
||||
|
||||
// /// Unused
|
||||
// class AboutScreen extends StatefulWidget {
|
||||
// @override
|
||||
// _AboutScreenState createState() => _AboutScreenState();
|
||||
// }
|
||||
|
||||
// class _AboutScreenState extends State<AboutScreen> {
|
||||
// var _version = '';
|
||||
|
||||
// @override
|
||||
// void initState() {
|
||||
// super.initState();
|
||||
// PackageInfo.fromPlatform().then((info) {
|
||||
// setState(() {
|
||||
// _version = info.version;
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// final theme = Provider.of<ThemeModel>(context);
|
||||
// return SingleScaffold(
|
||||
// title: AppBarTitle('About'),
|
||||
// body: Column(
|
||||
// children: <Widget>[
|
||||
// SizedBox(height: 32),
|
||||
// ClipRRect(
|
||||
// borderRadius: BorderRadius.circular(24),
|
||||
// child: Image.asset(
|
||||
// 'images/icon.png',
|
||||
// width: 96,
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(height: 12),
|
||||
// Text(
|
||||
// 'GitTouch',
|
||||
// style: TextStyle(fontSize: 20, color: theme.palette.text),
|
||||
// ),
|
||||
// SizedBox(height: 48),
|
||||
// TableView(items: [
|
||||
// TableViewItem(text: Text('Version'), rightWidget: Text(_version)),
|
||||
// TableViewItem(text: Text('Source Code'), url: '/pd4d10/git-touch'),
|
||||
// TableViewItem(
|
||||
// text: Text('Feedback'), url: '/pd4d10/git-touch/issues/new'),
|
||||
// TableViewItem(
|
||||
// text: Text('Rate This App'),
|
||||
// onTap: () {
|
||||
// LaunchReview.launch(
|
||||
// androidAppId: 'io.github.pd4d10.gittouch',
|
||||
// iOSAppId: '1452042346',
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ]),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
|
@ -1,24 +1,22 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||
import 'package:git_touch/widgets/commit_item.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class BbCommitsScreen extends StatelessWidget {
|
||||
const BbCommitsScreen(this.owner, this.name, this.ref);
|
||||
final String owner;
|
||||
final String name;
|
||||
final String ref;
|
||||
BbCommitsScreen(this.owner, this.name, this.ref);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final auth = Provider.of<AuthModel>(context);
|
||||
return ListStatefulScaffold<BbCommit, String?>(
|
||||
title: AppBarTitle(AppLocalizations.of(context)!.commits),
|
||||
title: Text(AppLocalizations.of(context)!.commits),
|
||||
fetch: (nextUrl) async {
|
||||
final res = await context.read<AuthModel>().fetchBbWithPage(
|
||||
nextUrl ?? '/repositories/$owner/$name/commits/$ref');
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||
import 'package:git_touch/widgets/repository_item.dart';
|
||||
import 'package:git_touch/widgets/repo_item.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class BbExploreScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListStatefulScaffold<BbRepo, String?>(
|
||||
title: AppBarTitle(AppLocalizations.of(context)!.explore),
|
||||
title: Text(AppLocalizations.of(context)!.explore),
|
||||
fetch: (nextUrl) async {
|
||||
final res = await context.read<AuthModel>().fetchBbWithPage(
|
||||
nextUrl ?? '/repositories?role=member&sort=-updated_on');
|
||||
|
@ -25,7 +23,7 @@ class BbExploreScreen extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
itemBuilder: (v) {
|
||||
return RepositoryItem.bb(payload: v);
|
||||
return RepoItem.bb(payload: v);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:antd_mobile/antd_mobile.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/scaffolds/refresh_stateful.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:git_touch/widgets/action_entry.dart';
|
||||
import 'package:git_touch/widgets/avatar.dart';
|
||||
import 'package:git_touch/widgets/link.dart';
|
||||
import 'package:git_touch/widgets/comment_item.dart';
|
||||
import 'package:git_touch/widgets/link.dart';
|
||||
import 'package:primer/primer.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
class BbIssueScreen extends StatelessWidget {
|
||||
const BbIssueScreen(this.owner, this.name, this.number, {this.isPr = false});
|
||||
final String owner;
|
||||
final String name;
|
||||
final String number;
|
||||
final bool isPr;
|
||||
|
||||
BbIssueScreen(this.owner, this.name, this.number, {this.isPr: false});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return RefreshStatefulScaffold<Tuple2<BbIssues, Iterable<BbComment>>>(
|
||||
title: Text("Issue: #$number"),
|
||||
title: Text('Issue: #$number'),
|
||||
fetch: () async {
|
||||
final auth = context.read<AuthModel>();
|
||||
final res = await Future.wait([
|
||||
|
@ -45,7 +45,6 @@ class BbIssueScreen extends StatelessWidget {
|
|||
bodyBuilder: (data, _) {
|
||||
final issue = data.item1;
|
||||
final comments = data.item2;
|
||||
final theme = context.read<ThemeModel>();
|
||||
return Column(children: <Widget>[
|
||||
Container(
|
||||
padding: CommonStyle.padding,
|
||||
|
@ -60,43 +59,43 @@ class BbIssueScreen extends StatelessWidget {
|
|||
url: issue.reporter!.avatarUrl,
|
||||
size: AvatarSize.extraSmall,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
'$owner / $name',
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
color: theme.palette.secondaryText,
|
||||
color: AntTheme.of(context).colorTextSecondary,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
'#$number',
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
color: theme.palette.tertiaryText,
|
||||
color: AntTheme.of(context).colorWeak,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
issue.title!,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
const SizedBox(height: 8),
|
||||
StateLabel(StateLabelStatus.issueOpened),
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
CommonStyle.border,
|
||||
],
|
||||
)),
|
||||
Column(children: [
|
||||
for (var comment in comments) ...[
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 10),
|
||||
padding: const EdgeInsets.only(left: 10),
|
||||
child: CommentItem(
|
||||
avatar: Avatar(
|
||||
url: comment.user!.avatarUrl,
|
||||
|
@ -107,7 +106,7 @@ class BbIssueScreen extends StatelessWidget {
|
|||
login: comment.user!.displayName,
|
||||
prefix: 'bitbucket')),
|
||||
CommonStyle.border,
|
||||
SizedBox(height: 16),
|
||||
const SizedBox(height: 16),
|
||||
],
|
||||
]),
|
||||
]);
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import 'package:antd_mobile/antd_mobile.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class BbIssueCommentScreen extends StatefulWidget {
|
||||
const BbIssueCommentScreen(this.owner, this.name, this.number);
|
||||
final String owner;
|
||||
final String name;
|
||||
final String number;
|
||||
BbIssueCommentScreen(this.owner, this.name, this.number);
|
||||
|
||||
@override
|
||||
_BbIssueCommentScreenState createState() => _BbIssueCommentScreenState();
|
||||
State<BbIssueCommentScreen> createState() => _BbIssueCommentScreenState();
|
||||
}
|
||||
|
||||
class _BbIssueCommentScreenState extends State<BbIssueCommentScreen> {
|
||||
|
@ -21,17 +21,16 @@ class _BbIssueCommentScreenState extends State<BbIssueCommentScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
final auth = Provider.of<AuthModel>(context);
|
||||
return CommonScaffold(
|
||||
title: Text('New Comment'),
|
||||
title: const Text('New Comment'),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: CommonStyle.padding,
|
||||
child: CupertinoTextField(
|
||||
style: TextStyle(color: theme.palette.text),
|
||||
placeholder: 'Body',
|
||||
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||
placeholder: AppLocalizations.of(context)!.body,
|
||||
onChanged: (v) {
|
||||
setState(() {
|
||||
_body = v;
|
||||
|
@ -40,9 +39,10 @@ class _BbIssueCommentScreenState extends State<BbIssueCommentScreen> {
|
|||
maxLines: 10,
|
||||
),
|
||||
),
|
||||
CupertinoButton.filled(
|
||||
child: Text('Comment'),
|
||||
onPressed: () async {
|
||||
AntButton(
|
||||
color: AntTheme.of(context).colorPrimary,
|
||||
child: const Text('Comment'),
|
||||
onClick: () async {
|
||||
await auth.fetchBb(
|
||||
'/repositories/${widget.owner}/${widget.name}/issues/${widget.number}/comments',
|
||||
isPost: true,
|
||||
|
@ -51,8 +51,7 @@ class _BbIssueCommentScreenState extends State<BbIssueCommentScreen> {
|
|||
},
|
||||
);
|
||||
Navigator.pop(context, true);
|
||||
await theme.push(
|
||||
context,
|
||||
await context.pushUrl(
|
||||
'/bitbucket/${widget.owner}/${widget.name}/issues/${widget.number}',
|
||||
replace: true,
|
||||
);
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
import 'package:antd_mobile/antd_mobile.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/common.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class BbIssueFormScreen extends StatefulWidget {
|
||||
const BbIssueFormScreen(this.owner, this.name);
|
||||
final String owner;
|
||||
final String name;
|
||||
BbIssueFormScreen(this.owner, this.name);
|
||||
|
||||
@override
|
||||
_BbIssueFormScreenState createState() => _BbIssueFormScreenState();
|
||||
State<BbIssueFormScreen> createState() => _BbIssueFormScreenState();
|
||||
}
|
||||
|
||||
class _BbIssueFormScreenState extends State<BbIssueFormScreen> {
|
||||
|
@ -22,17 +22,16 @@ class _BbIssueFormScreenState extends State<BbIssueFormScreen> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Provider.of<ThemeModel>(context);
|
||||
final auth = Provider.of<AuthModel>(context);
|
||||
return CommonScaffold(
|
||||
title: Text('Submit an issue'),
|
||||
title: Text(AppLocalizations.of(context)!.submitAnIssue),
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: CommonStyle.padding,
|
||||
child: CupertinoTextField(
|
||||
style: TextStyle(color: theme.palette.text),
|
||||
placeholder: 'Title',
|
||||
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||
placeholder: AppLocalizations.of(context)!.title,
|
||||
onChanged: (v) {
|
||||
setState(() {
|
||||
_title = v;
|
||||
|
@ -43,8 +42,8 @@ class _BbIssueFormScreenState extends State<BbIssueFormScreen> {
|
|||
Padding(
|
||||
padding: CommonStyle.padding,
|
||||
child: CupertinoTextField(
|
||||
style: TextStyle(color: theme.palette.text),
|
||||
placeholder: 'Body',
|
||||
style: TextStyle(color: AntTheme.of(context).colorText),
|
||||
placeholder: AppLocalizations.of(context)!.body,
|
||||
onChanged: (v) {
|
||||
setState(() {
|
||||
_body = v;
|
||||
|
@ -53,9 +52,10 @@ class _BbIssueFormScreenState extends State<BbIssueFormScreen> {
|
|||
maxLines: 10,
|
||||
),
|
||||
),
|
||||
CupertinoButton.filled(
|
||||
child: Text('Submit'),
|
||||
onPressed: () async {
|
||||
AntButton(
|
||||
color: AntTheme.of(context).colorPrimary,
|
||||
child: Text(AppLocalizations.of(context)!.submit),
|
||||
onClick: () async {
|
||||
await auth.fetchBbJson(
|
||||
'/repositories/${widget.owner}/${widget.name}/issues',
|
||||
isPost: true,
|
||||
|
@ -64,8 +64,11 @@ class _BbIssueFormScreenState extends State<BbIssueFormScreen> {
|
|||
return BbIssues.fromJson(v);
|
||||
});
|
||||
Navigator.pop(context, true);
|
||||
await theme.push(
|
||||
await AntToast.show(
|
||||
context,
|
||||
content: const Text('Issue submitted'),
|
||||
);
|
||||
await context.pushUrl(
|
||||
'/bitbucket/${widget.owner}/${widget.name}/issues',
|
||||
replace: true,
|
||||
);
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:git_touch/widgets/action_entry.dart';
|
||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||
import 'package:git_touch/widgets/issue_item.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class BbIssuesScreen extends StatelessWidget {
|
||||
const BbIssuesScreen(this.owner, this.name);
|
||||
final String owner;
|
||||
final String name;
|
||||
BbIssuesScreen(this.owner, this.name);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListStatefulScaffold<BbIssues, String?>(
|
||||
title: AppBarTitle(AppLocalizations.of(context)!.issues),
|
||||
title: Text(AppLocalizations.of(context)!.issues),
|
||||
actionBuilder: () {
|
||||
return ActionEntry(
|
||||
iconData: Octicons.plus, url: '/bitbucket/$owner/$name/issues/new');
|
||||
|
@ -35,13 +34,13 @@ class BbIssuesScreen extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
itemBuilder: (v) {
|
||||
int issueNumber =
|
||||
final issueNumber =
|
||||
int.parse(v.issueLink!.replaceFirst(RegExp(r'.*\/'), ''));
|
||||
return IssueItem(
|
||||
avatarUrl: v.reporter!.avatarUrl,
|
||||
author: v.reporter!.displayName,
|
||||
title: v.title,
|
||||
subtitle: '#' + issueNumber.toString(),
|
||||
subtitle: '#$issueNumber',
|
||||
commentCount: 0,
|
||||
updatedAt: v.createdOn,
|
||||
url: '/bitbucket/$owner/$name/issues/$issueNumber',
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
import 'dart:convert';
|
||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||
import 'package:universal_io/io.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||
import 'package:git_touch/widgets/action_entry.dart';
|
||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||
import 'package:git_touch/widgets/blob_view.dart';
|
||||
import 'package:git_touch/widgets/object_tree.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:universal_io/io.dart';
|
||||
|
||||
class BbObjectScreen extends StatelessWidget {
|
||||
const BbObjectScreen(this.owner, this.name, this.ref, {this.path});
|
||||
final String owner;
|
||||
final String name;
|
||||
final String ref;
|
||||
final String? path;
|
||||
BbObjectScreen(this.owner, this.name, this.ref, {this.path});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final auth = Provider.of<AuthModel>(context);
|
||||
|
||||
return ListStatefulScaffold<dynamic, String?>(
|
||||
title: AppBarTitle(path ?? 'Files'),
|
||||
title: Text(path ?? 'Files'),
|
||||
fetch: (next) async {
|
||||
final res = await auth.fetchBb(
|
||||
next ?? '/repositories/$owner/$name/src/$ref/${path ?? ''}');
|
||||
|
@ -53,7 +53,7 @@ class BbObjectScreen extends StatelessWidget {
|
|||
if (pl is String) {
|
||||
return BlobView(path, text: pl);
|
||||
} else if (pl is BbTree) {
|
||||
return ObjectTreeItem(
|
||||
return createObjectTreeItem(
|
||||
name: p.basename(pl.path),
|
||||
type: pl.type,
|
||||
// size: v.type == 'commit_file' ? v.size : null,
|
||||
|
@ -66,7 +66,7 @@ class BbObjectScreen extends StatelessWidget {
|
|||
}
|
||||
},
|
||||
actionBuilder: () {
|
||||
return ActionEntry(
|
||||
return const ActionEntry(
|
||||
iconData: Ionicons.cog,
|
||||
url: '/choose-code-theme',
|
||||
);
|
||||
|
|
|
@ -1,23 +1,21 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||
import 'package:git_touch/widgets/issue_item.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class BbPullsScreen extends StatelessWidget {
|
||||
const BbPullsScreen(this.owner, this.name);
|
||||
final String owner;
|
||||
final String name;
|
||||
BbPullsScreen(this.owner, this.name);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final auth = Provider.of<AuthModel>(context);
|
||||
return ListStatefulScaffold<BbPulls, String?>(
|
||||
title: AppBarTitle(AppLocalizations.of(context)!.pullRequests),
|
||||
title: Text(AppLocalizations.of(context)!.pullRequests),
|
||||
fetch: (nextUrl) async {
|
||||
final res = await context.read<AuthModel>().fetchBbWithPage(
|
||||
nextUrl ?? '/repositories/$owner/$name/pullrequests');
|
||||
|
@ -30,13 +28,13 @@ class BbPullsScreen extends StatelessWidget {
|
|||
);
|
||||
},
|
||||
itemBuilder: (v) {
|
||||
int pullNumber =
|
||||
final pullNumber =
|
||||
int.parse(v.pullRequestLink!.replaceFirst(RegExp(r'.*\/'), ''));
|
||||
return IssueItem(
|
||||
avatarUrl: v.author!.avatarUrl,
|
||||
author: v.author!.displayName,
|
||||
title: v.title,
|
||||
subtitle: '#' + pullNumber.toString(),
|
||||
subtitle: '#$pullNumber',
|
||||
commentCount: 0,
|
||||
updatedAt: v.createdOn,
|
||||
url:
|
||||
|
|
|
@ -1,30 +1,31 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:antd_mobile/antd_mobile.dart';
|
||||
import 'package:filesize/filesize.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/models/theme.dart';
|
||||
import 'package:git_touch/scaffolds/refresh_stateful.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||
import 'package:git_touch/widgets/markdown_view.dart';
|
||||
import 'package:git_touch/widgets/repo_header.dart';
|
||||
import 'package:git_touch/widgets/table_view.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class BbRepoScreen extends StatelessWidget {
|
||||
const BbRepoScreen(this.owner, this.name, {this.branch});
|
||||
final String owner;
|
||||
final String name;
|
||||
final String? branch;
|
||||
BbRepoScreen(this.owner, this.name, {this.branch});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return RefreshStatefulScaffold<Tuple3<BbRepo, String?, List<BbBranch>>>(
|
||||
title: AppBarTitle(AppLocalizations.of(context)!.repository),
|
||||
title: Text(AppLocalizations.of(context)!.repository),
|
||||
fetch: () async {
|
||||
final auth = context.read<AuthModel>();
|
||||
final r = await auth.fetchBbJson('/repositories/$owner/$name');
|
||||
|
@ -56,38 +57,44 @@ class BbRepoScreen extends StatelessWidget {
|
|||
homepageUrl: p.website,
|
||||
),
|
||||
CommonStyle.border,
|
||||
TableView(
|
||||
items: [
|
||||
TableViewItem(
|
||||
leftIconData: Octicons.code,
|
||||
text: Text('Code'),
|
||||
rightWidget: Text(filesize(p.size)),
|
||||
url:
|
||||
'/bitbucket/$owner/$name/src/${branch ?? p.mainbranch!.name}',
|
||||
AntList(
|
||||
children: [
|
||||
AntListItem(
|
||||
prefix: const Icon(Octicons.code),
|
||||
extra: Text(filesize(p.size)),
|
||||
onClick: () {
|
||||
context.push(
|
||||
'/bitbucket/$owner/$name/src/${branch ?? p.mainbranch!.name}');
|
||||
},
|
||||
child: const Text('Code'),
|
||||
),
|
||||
TableViewItem(
|
||||
leftIconData: Octicons.issue_opened,
|
||||
text: Text('Issues'),
|
||||
url: '/bitbucket/$owner/$name/issues',
|
||||
AntListItem(
|
||||
prefix: const Icon(Octicons.issue_opened),
|
||||
child: const Text('Issues'),
|
||||
onClick: () {
|
||||
context.push('/bitbucket/$owner/$name/issues');
|
||||
},
|
||||
),
|
||||
TableViewItem(
|
||||
leftIconData: Octicons.git_pull_request,
|
||||
text: Text('Pull requests'),
|
||||
url: '/bitbucket/$owner/$name/pulls',
|
||||
AntListItem(
|
||||
prefix: const Icon(Octicons.git_pull_request),
|
||||
child: const Text('Pull requests'),
|
||||
onClick: () {
|
||||
context.push('/bitbucket/$owner/$name/pulls');
|
||||
},
|
||||
),
|
||||
TableViewItem(
|
||||
leftIconData: Octicons.history,
|
||||
text: Text('Commits'),
|
||||
url:
|
||||
'/bitbucket/$owner/$name/commits/${branch ?? p.mainbranch!.name}',
|
||||
AntListItem(
|
||||
prefix: const Icon(Octicons.history),
|
||||
child: const Text('Commits'),
|
||||
onClick: () {
|
||||
context.push(
|
||||
'/bitbucket/$owner/$name/commits/${branch ?? p.mainbranch!.name}');
|
||||
},
|
||||
),
|
||||
TableViewItem(
|
||||
leftIconData: Octicons.git_branch,
|
||||
text: Text(AppLocalizations.of(context)!.branches),
|
||||
rightWidget: Text((branch ?? p.mainbranch!.name)! +
|
||||
' • ' +
|
||||
branches.length.toString()),
|
||||
onTap: () async {
|
||||
AntListItem(
|
||||
prefix: const Icon(Octicons.git_branch),
|
||||
extra: Text(
|
||||
'${(branch ?? p.mainbranch!.name)!} • ${branches.length}'),
|
||||
onClick: () async {
|
||||
if (branches.length < 2) return;
|
||||
|
||||
await theme.showPicker(
|
||||
|
@ -99,14 +106,15 @@ class BbRepoScreen extends StatelessWidget {
|
|||
.toList(),
|
||||
onClose: (ref) {
|
||||
if (ref != branch) {
|
||||
theme.push(
|
||||
context, '/bitbucket/$owner/$name?branch=$ref',
|
||||
context.pushUrl(
|
||||
'/bitbucket/$owner/$name?branch=$ref',
|
||||
replace: true);
|
||||
}
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Text(AppLocalizations.of(context)!.branches),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/scaffolds/list_stateful.dart';
|
||||
import 'package:git_touch/widgets/app_bar_title.dart';
|
||||
import 'package:git_touch/widgets/user_item.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:timeago/timeago.dart' as timeago;
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:flutter_gen/gen_l10n/S.dart';
|
||||
|
||||
class BbTeamsScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListStatefulScaffold<BbUser, String?>(
|
||||
title: AppBarTitle(AppLocalizations.of(context)!.teams),
|
||||
title: Text(AppLocalizations.of(context)!.teams),
|
||||
fetch: (nextUrl) async {
|
||||
final res = await context
|
||||
.read<AuthModel>()
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
import 'package:git_touch/models/auth.dart';
|
||||
import 'package:git_touch/models/bitbucket.dart';
|
||||
import 'package:git_touch/scaffolds/refresh_stateful.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
import 'package:git_touch/widgets/action_entry.dart';
|
||||
import 'package:git_touch/widgets/repository_item.dart';
|
||||
import 'package:git_touch/widgets/repo_item.dart';
|
||||
import 'package:git_touch/widgets/user_header.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:git_touch/utils/utils.dart';
|
||||
|
||||
class BbUserScreen extends StatelessWidget {
|
||||
const BbUserScreen(this.login, {this.isTeam = false});
|
||||
final String? login;
|
||||
final bool isTeam;
|
||||
BbUserScreen(this.login, {this.isTeam = false});
|
||||
bool get isViewer => login == null;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final auth = Provider.of<AuthModel>(context);
|
||||
final _accountId = auth.activeAccount!.accountId;
|
||||
final _login = login ?? auth.activeAccount!.login;
|
||||
final accountId = auth.activeAccount!.accountId;
|
||||
final finalLogin = login ?? auth.activeAccount!.login;
|
||||
return RefreshStatefulScaffold<Tuple2<BbUser, Iterable<BbRepo>>>(
|
||||
title: Text(isViewer
|
||||
? 'Me'
|
||||
|
@ -30,16 +30,16 @@ class BbUserScreen extends StatelessWidget {
|
|||
fetch: () async {
|
||||
final res = await Future.wait([
|
||||
auth
|
||||
.fetchBbJson('/${isTeam ? 'teams' : 'users'}/$_accountId')
|
||||
.fetchBbJson('/${isTeam ? 'teams' : 'users'}/$accountId')
|
||||
.then((value) => BbUser.fromJson(value)),
|
||||
auth
|
||||
.fetchBbWithPage('/repositories/$_login')
|
||||
.fetchBbWithPage('/repositories/$finalLogin')
|
||||
.then((value) => [for (var v in value.items) BbRepo.fromJson(v)]),
|
||||
]);
|
||||
return Tuple2(res[0] as BbUser, res[1] as Iterable<BbRepo>);
|
||||
},
|
||||
action: isViewer
|
||||
? ActionEntry(
|
||||
? const ActionEntry(
|
||||
iconData: Ionicons.cog,
|
||||
url: '/settings',
|
||||
)
|
||||
|
@ -50,7 +50,7 @@ class BbUserScreen extends StatelessWidget {
|
|||
return Column(
|
||||
children: <Widget>[
|
||||
UserHeader(
|
||||
login: _login,
|
||||
login: finalLogin,
|
||||
avatarUrl: user.avatarUrl,
|
||||
name: user.displayName,
|
||||
createdAt: user.createdOn,
|
||||
|
@ -59,9 +59,7 @@ class BbUserScreen extends StatelessWidget {
|
|||
),
|
||||
CommonStyle.border,
|
||||
Column(
|
||||
children: <Widget>[
|
||||
for (var v in repos) RepositoryItem.bb(payload: v)
|
||||
],
|
||||
children: <Widget>[for (var v in repos) RepoItem.bb(payload: v)],
|
||||
)
|
||||
],
|
||||
);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue