Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9203df94a0
|
||
|
|
a7204f588f | ||
|
|
81367e5f3a
|
||
|
|
14cb3485e4
|
||
|
|
58d3b70bee
|
||
|
|
ea4a30ca00
|
||
|
|
9e9ec9ba9b
|
||
|
|
a98c41f461
|
||
|
|
9064d5bd34
|
||
|
|
de00c532c8
|
||
|
|
8892337b93
|
||
|
|
15b9f979a2 | ||
|
|
a146adfd16 | ||
|
|
4aed98ef04 | ||
|
|
7a89704c0b
|
||
|
|
d60ff3ee27
|
||
|
|
9ef37633cb
|
||
|
|
2ac2b4d2be
|
||
|
|
dffa91eb23 | ||
|
|
164877bb0b | ||
|
|
c787b065ad | ||
|
|
12f9cf6aa5 | ||
|
|
74db784973 | ||
|
|
fe5fa692f7 | ||
|
|
5ea5c510cb | ||
|
|
bb264b7362 | ||
|
|
17ae855ffb | ||
|
|
b38fea130f | ||
|
|
e3776259df | ||
|
|
371cc33e3a | ||
|
|
3cbc268dea | ||
|
|
99b6a0a335 | ||
|
|
88719576b7 | ||
|
|
d191afad33 | ||
|
|
7e433fc0dd | ||
|
|
27015b63d9 | ||
|
|
703e3deeaf | ||
|
|
b6b42f9366 |
@@ -3,6 +3,221 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## 2022-06-24
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`wyatt_http_client` - `v1.2.0`](#wyatt_http_client---v120)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `wyatt_http_client` - `v1.2.0`
|
||||||
|
|
||||||
|
- **FEAT**: add new middleware feature.
|
||||||
|
- **FEAT**: implements doublelinked list for middlewares.
|
||||||
|
- **FEAT**: [WIP] implements middleware system.
|
||||||
|
- **FEAT**: [WIP] work on middleware feature.
|
||||||
|
|
||||||
|
|
||||||
|
## 2022-05-23
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`wyatt_http_client` - `v1.1.0`](#wyatt_http_client---v110)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `wyatt_http_client` - `v1.1.0`
|
||||||
|
|
||||||
|
- **FEAT**: add oauth2 refresh token client.
|
||||||
|
|
||||||
|
|
||||||
|
## 2022-05-23
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`wyatt_analysis` - `v2.1.0`](#wyatt_analysis---v210)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `wyatt_analysis` - `v2.1.0`
|
||||||
|
|
||||||
|
- **FEAT**: add experimental rules in appropriate file.
|
||||||
|
|
||||||
|
|
||||||
|
## 2022-05-20
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`wyatt_authentication_bloc` - `v0.2.1`](#wyatt_authentication_bloc---v021)
|
||||||
|
- [`wyatt_bloc_helper` - `v1.1.0`](#wyatt_bloc_helper---v110)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `wyatt_authentication_bloc` - `v0.2.1`
|
||||||
|
|
||||||
|
- **FEAT**: add google, facebook, apple, twitter login.
|
||||||
|
|
||||||
|
#### `wyatt_bloc_helper` - `v1.1.0`
|
||||||
|
|
||||||
|
- **FEAT**: add provider, consumer and helpers.
|
||||||
|
|
||||||
|
|
||||||
|
## 2022-05-05
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`wyatt_medium_feeds` - `v1.0.1`](#wyatt_medium_feeds---v101)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `wyatt_medium_feeds` - `v1.0.1`
|
||||||
|
|
||||||
|
- **FIX**: remove useless example file.
|
||||||
|
|
||||||
|
|
||||||
|
## 2022-05-02
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`wyatt_form_bloc` - `v0.0.2`](#wyatt_form_bloc---v002)
|
||||||
|
- [`wyatt_authentication_bloc` - `v0.2.0+1`](#wyatt_authentication_bloc---v0201)
|
||||||
|
|
||||||
|
Packages with dependency updates only:
|
||||||
|
|
||||||
|
> Packages listed below depend on other packages in this workspace that have had changes. Their versions have been incremented to bump the minimum dependency versions of the packages they depend upon in this project.
|
||||||
|
|
||||||
|
- `wyatt_authentication_bloc` - `v0.2.0+1`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `wyatt_form_bloc` - `v0.0.2`
|
||||||
|
|
||||||
|
- **FEAT**: add list option validator.
|
||||||
|
|
||||||
|
|
||||||
|
## 2022-04-20
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`wyatt_crud_bloc` - `v0.0.2`](#wyatt_crud_bloc---v002)
|
||||||
|
- [`wyatt_analysis` - `v2.0.1`](#wyatt_analysis---v201)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `wyatt_crud_bloc` - `v0.0.2`
|
||||||
|
|
||||||
|
- Migrate crud_package in monorepo
|
||||||
|
|
||||||
|
- **DOCS**: add example app.
|
||||||
|
|
||||||
|
#### `wyatt_analysis` - `v2.0.1`
|
||||||
|
|
||||||
|
- **DOCS**: Update readme with new version.
|
||||||
|
|
||||||
|
|
||||||
|
## 2022-04-20
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`wyatt_authentication_bloc` - `v0.2.0`](#wyatt_authentication_bloc---v020)
|
||||||
|
|
||||||
|
Packages graduated to a stable release (see pre-releases prior to the stable version for changelog entries):
|
||||||
|
|
||||||
|
- `wyatt_authentication_bloc` - `v0.2.0`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `wyatt_authentication_bloc` - `v0.2.0`
|
||||||
|
|
||||||
|
|
||||||
|
## 2022-04-20
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Packages with breaking changes:
|
||||||
|
|
||||||
|
- There are no breaking changes in this release.
|
||||||
|
|
||||||
|
Packages with other changes:
|
||||||
|
|
||||||
|
- [`wyatt_form_bloc` - `v0.0.1`](#wyatt_form_bloc---v001)
|
||||||
|
|
||||||
|
Packages graduated to a stable release (see pre-releases prior to the stable version for changelog entries):
|
||||||
|
|
||||||
|
- `wyatt_form_bloc` - `v0.0.1`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### `wyatt_form_bloc` - `v0.0.1`
|
||||||
|
|
||||||
|
|
||||||
## 2022-04-20
|
## 2022-04-20
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|||||||
@@ -28,8 +28,8 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt_analysis">
|
<a href="https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis">
|
||||||
<img src="https://img.shields.io/badge/Style-Wyatt%20Analysis-blue.svg?style=flat-square"" alt="Style: Wyatt Analysis" />
|
<img src="https://img.shields.io/badge/Style-Wyatt%20Analysis-blue.svg?style=flat-square" alt="Style: Wyatt Analysis" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/invertase/melos">
|
<a href="https://github.com/invertase/melos">
|
||||||
<img src="https://img.shields.io/badge/Maintained%20with-melos-f700ff.svg?style=flat-square" alt="Maintained with Melos" />
|
<img src="https://img.shields.io/badge/Maintained%20with-melos-f700ff.svg?style=flat-square" alt="Maintained with Melos" />
|
||||||
@@ -63,22 +63,65 @@ dart pub global activate melos
|
|||||||
|
|
||||||
Then bootstrap with `melos bs`.
|
Then bootstrap with `melos bs`.
|
||||||
|
|
||||||
---
|
### Create a new package
|
||||||
|
|
||||||
## Usage
|
Create a new package in `packages/` folder.
|
||||||
|
|
||||||
You can add any package of the `packages/` sub directory in your project.
|
```shell
|
||||||
|
dart create -t package-simple wyatt_<name>
|
||||||
```yaml
|
|
||||||
dependencies:
|
|
||||||
wyatt_analysis:
|
|
||||||
git:
|
|
||||||
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
|
|
||||||
ref: wyatt_analysis-v2.0.0
|
|
||||||
path: packages/wyatt_analysis
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Here you can change `package name` and `package version`.
|
Remove any `example/` subfolder. Then create a new sample project.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
flutter create --platforms android --project-name <name>_example example
|
||||||
|
```
|
||||||
|
|
||||||
|
Then bootstrap project with `melos bs` command.
|
||||||
|
|
||||||
|
### Convention
|
||||||
|
|
||||||
|
#### Naming
|
||||||
|
|
||||||
|
In the previous instructions `<name>` variable is important.
|
||||||
|
It have to be clear and intelligible.
|
||||||
|
|
||||||
|
You **MUST** use underscores.
|
||||||
|
|
||||||
|
You **MUST** use `wyatt` prefix for package.
|
||||||
|
|
||||||
|
You **MUST** name example with specific name.
|
||||||
|
|
||||||
|
For example, if name is CRUD BLOC
|
||||||
|
- name will be crud_bloc
|
||||||
|
- so the package will be: `wyatt_crud_bloc`
|
||||||
|
- and the example will be: `crud_bloc_example`
|
||||||
|
|
||||||
|
#### Commits
|
||||||
|
|
||||||
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
tl;dr : `type(scope): description`.
|
||||||
|
Here allowed <type> values:
|
||||||
|
|
||||||
|
- **feat** for a new feature for the user, not a new feature for build script. Such commit will trigger a release bumping a MINOR version.
|
||||||
|
- **fix** for a bug fix for the user, not a fix to a build script. Such commit will trigger a release bumping a PATCH version.
|
||||||
|
- **perf** for performance improvements. Such commit will trigger a release bumping a PATCH version.
|
||||||
|
- **docs** for changes to the documentation.
|
||||||
|
- **style** for formatting changes, missing semicolons, etc.
|
||||||
|
- **refactor** for refactoring production code, e.g. renaming a variable.
|
||||||
|
- **test** for adding missing tests, refactoring tests; no production code change.
|
||||||
|
- **build** for updating build configuration, development tools or other changes irrelevant to the user.
|
||||||
|
|
||||||
|
Some examples :
|
||||||
|
|
||||||
|
- `feat(auth): add AWS support.` = add a feature in authentication_bloc package.
|
||||||
|
- `docs: update readme.` = update **this** readme file.
|
||||||
|
- `fix(crud)!: fix bug in awesome() function.` = fix a bug, `!` is important and indicate `BREAKING CHANGES`.
|
||||||
|
|
||||||
|
Conventional commits are important for `melos version` command !
|
||||||
|
|
||||||
|
#### Badging
|
||||||
|
|
||||||
In the package `readme.md` file, please specify the supported SDK:
|
In the package `readme.md` file, please specify the supported SDK:
|
||||||
|
|
||||||
@@ -97,6 +140,23 @@ or
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
You can add any package of the `packages/` sub directory in your project.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
dependencies:
|
||||||
|
wyatt_analysis:
|
||||||
|
git:
|
||||||
|
url: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages
|
||||||
|
ref: wyatt_analysis-v2.0.0
|
||||||
|
path: packages/wyatt_analysis
|
||||||
|
```
|
||||||
|
|
||||||
|
Here you can change `package name` and `package version`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2022 WYATT GROUP
|
||||||
|
* Please see the AUTHORS file for details.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"psioniq.psi-header",
|
||||||
|
"blaugold.melos-code"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
"psi-header.changes-tracking": {
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
"psi-header.config": {
|
||||||
|
"blankLinesAfter": 1,
|
||||||
|
"forceToTop": true
|
||||||
|
},
|
||||||
|
"psi-header.lang-config": [
|
||||||
|
{
|
||||||
|
"beforeHeader": [
|
||||||
|
"# -*- coding:utf-8 -*-",
|
||||||
|
"#!/usr/bin/env python3"
|
||||||
|
],
|
||||||
|
"begin": "###",
|
||||||
|
"end": "###",
|
||||||
|
"language": "python",
|
||||||
|
"prefix": "# "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beforeHeader": [
|
||||||
|
"#!/usr/bin/env sh",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"language": "shellscript",
|
||||||
|
"begin": "",
|
||||||
|
"end": "",
|
||||||
|
"prefix": "# "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"begin": "",
|
||||||
|
"end": "",
|
||||||
|
"language": "dart",
|
||||||
|
"prefix": "// "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"begin": "",
|
||||||
|
"end": "",
|
||||||
|
"language": "yaml",
|
||||||
|
"prefix": "# "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"begin": "<!--",
|
||||||
|
"end": "-->",
|
||||||
|
"language": "markdown",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"psi-header.templates": [
|
||||||
|
{
|
||||||
|
"language": "*",
|
||||||
|
"template": [
|
||||||
|
"Copyright (C) <<year>> WYATT GROUP",
|
||||||
|
"Please see the AUTHORS file for details.",
|
||||||
|
"",
|
||||||
|
"This program is free software: you can redistribute it and/or modify",
|
||||||
|
"it under the terms of the GNU General Public License as published by",
|
||||||
|
"the Free Software Foundation, either version 3 of the License, or",
|
||||||
|
"any later version.",
|
||||||
|
"",
|
||||||
|
"This program is distributed in the hope that it will be useful,",
|
||||||
|
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||||
|
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||||
|
"GNU General Public License for more details.",
|
||||||
|
"",
|
||||||
|
"You should have received a copy of the GNU General Public License",
|
||||||
|
"along with this program. If not, see <https://www.gnu.org/licenses/>."
|
||||||
|
],
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dart.runPubGetOnPubspecChanges": false,
|
||||||
|
}
|
||||||
@@ -1,3 +1,11 @@
|
|||||||
|
## 2.1.0
|
||||||
|
|
||||||
|
- **FEAT**: add experimental rules in appropriate file.
|
||||||
|
|
||||||
|
## 2.0.1
|
||||||
|
|
||||||
|
- **DOCS**: Update readme with new version.
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
> Note: This release has breaking changes.
|
> Note: This release has breaking changes.
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# Copyright (C) 2022 WYATT GROUP
|
||||||
|
# Please see the AUTHORS file for details.
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
include: package:wyatt_analysis/analysis_options.flutter.2.0.0.yaml
|
||||||
|
|
||||||
|
linter:
|
||||||
|
rules:
|
||||||
|
- use_super_parameters
|
||||||
|
- use_enums
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
name: wyatt_analysis
|
name: wyatt_analysis
|
||||||
description: Lint rules for Dart and Flutter used internally at Wyatt and Wyatt Studio.
|
description: Lint rules for Dart and Flutter used internally at Wyatt and Wyatt Studio.
|
||||||
repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis
|
repository: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis
|
||||||
version: 2.0.0
|
version: 2.1.0
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2022 WYATT GROUP
|
||||||
|
* Please see the AUTHORS file for details.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"psioniq.psi-header",
|
||||||
|
"blaugold.melos-code"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
{
|
||||||
|
"psi-header.changes-tracking": {
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
"psi-header.config": {
|
||||||
|
"blankLinesAfter": 1,
|
||||||
|
"forceToTop": true
|
||||||
|
},
|
||||||
|
"psi-header.lang-config": [
|
||||||
|
{
|
||||||
|
"beforeHeader": [
|
||||||
|
"# -*- coding:utf-8 -*-",
|
||||||
|
"#!/usr/bin/env python3"
|
||||||
|
],
|
||||||
|
"begin": "###",
|
||||||
|
"end": "###",
|
||||||
|
"language": "python",
|
||||||
|
"prefix": "# "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"beforeHeader": [
|
||||||
|
"#!/usr/bin/env sh",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"language": "shellscript",
|
||||||
|
"begin": "",
|
||||||
|
"end": "",
|
||||||
|
"prefix": "# "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"begin": "",
|
||||||
|
"end": "",
|
||||||
|
"language": "dart",
|
||||||
|
"prefix": "// "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"begin": "",
|
||||||
|
"end": "",
|
||||||
|
"language": "yaml",
|
||||||
|
"prefix": "# "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"begin": "<!--",
|
||||||
|
"end": "-->",
|
||||||
|
"language": "markdown",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"psi-header.templates": [
|
||||||
|
{
|
||||||
|
"language": "*",
|
||||||
|
"template": [
|
||||||
|
"Copyright (C) <<year>> WYATT GROUP",
|
||||||
|
"Please see the AUTHORS file for details.",
|
||||||
|
"",
|
||||||
|
"This program is free software: you can redistribute it and/or modify",
|
||||||
|
"it under the terms of the GNU General Public License as published by",
|
||||||
|
"the Free Software Foundation, either version 3 of the License, or",
|
||||||
|
"any later version.",
|
||||||
|
"",
|
||||||
|
"This program is distributed in the hope that it will be useful,",
|
||||||
|
"but WITHOUT ANY WARRANTY; without even the implied warranty of",
|
||||||
|
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
|
||||||
|
"GNU General Public License for more details.",
|
||||||
|
"",
|
||||||
|
"You should have received a copy of the GNU General Public License",
|
||||||
|
"along with this program. If not, see <https://www.gnu.org/licenses/>."
|
||||||
|
],
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dart.runPubGetOnPubspecChanges": false,
|
||||||
|
}
|
||||||
@@ -1,3 +1,15 @@
|
|||||||
|
## 0.2.1
|
||||||
|
|
||||||
|
- **FEAT**: add google, facebook, apple, twitter login.
|
||||||
|
|
||||||
|
## 0.2.0+1
|
||||||
|
|
||||||
|
- Update a dependency to the latest release.
|
||||||
|
|
||||||
|
## 0.2.0
|
||||||
|
|
||||||
|
- Graduate package to a stable release. See pre-releases prior to this version for changelog entries.
|
||||||
|
|
||||||
## 0.2.0-dev.0
|
## 0.2.0-dev.0
|
||||||
|
|
||||||
> Note: This release has breaking changes.
|
> Note: This release has breaking changes.
|
||||||
|
|||||||
@@ -18,7 +18,12 @@
|
|||||||
|
|
||||||
# Flutter - Authentication BLoC
|
# Flutter - Authentication BLoC
|
||||||
|
|
||||||
[](https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt_analysis)
|
<p align="left">
|
||||||
|
<a href="https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis">
|
||||||
|
<img src="https://img.shields.io/badge/Style-Wyatt%20Analysis-blue.svg?style=flat-square" alt="Style: Wyatt Analysis" />
|
||||||
|
</a>
|
||||||
|
<img src="https://img.shields.io/badge/SDK-Flutter-blue?style=flat-square" alt="SDK: Flutter" />
|
||||||
|
</p>
|
||||||
|
|
||||||
Authentication Bloc for Flutter.
|
Authentication Bloc for Flutter.
|
||||||
|
|
||||||
@@ -40,15 +45,10 @@ Authentication Bloc for Flutter.
|
|||||||
* Start/Stop listening on demand
|
* Start/Stop listening on demand
|
||||||
- `start()` to listen to user changes
|
- `start()` to listen to user changes
|
||||||
- `stop()` to cancel listener
|
- `stop()` to cancel listener
|
||||||
- Form
|
|
||||||
* FormInput: validation of one input
|
|
||||||
* Form: validation of all form inputs
|
|
||||||
* FormEntry: contains data of one input
|
|
||||||
* FormData: contains all entries
|
|
||||||
- SignUpCubit
|
- SignUpCubit
|
||||||
* Handles email/password validation and password confirmation
|
* Handles email/password validation and password confirmation
|
||||||
* Handles register with email/password
|
* Handles register with email/password
|
||||||
* Handles custom form fields
|
* Handles custom form fields thanks `wyatt_form_bloc`
|
||||||
- Use `entries` to pass a `FormData` object
|
- Use `entries` to pass a `FormData` object
|
||||||
- You can use several pre configured `FormInput` for validation
|
- You can use several pre configured `FormInput` for validation
|
||||||
- You can use `updateFormData()` to change FormData and validators during runtime (intersection, union, difference or replace)
|
- You can use `updateFormData()` to change FormData and validators during runtime (intersection, union, difference or replace)
|
||||||
|
|||||||
@@ -1,6 +1 @@
|
|||||||
include: package:wyatt_analysis/analysis_options.flutter.1.1.1.yaml
|
include: package:wyatt_analysis/analysis_options.flutter.yaml
|
||||||
|
|
||||||
linter:
|
|
||||||
rules:
|
|
||||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
|
||||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
|
||||||
@@ -44,3 +44,5 @@ app.*.map.json
|
|||||||
/android/app/debug
|
/android/app/debug
|
||||||
/android/app/profile
|
/android/app/profile
|
||||||
/android/app/release
|
/android/app/release
|
||||||
|
|
||||||
|
lib/firebase_options.dart
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
# This file should be version controlled and should not be manually edited.
|
# This file should be version controlled and should not be manually edited.
|
||||||
|
|
||||||
version:
|
version:
|
||||||
revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b
|
revision: 5464c5bac742001448fe4fc0597be939379f88ea
|
||||||
channel: stable
|
channel: stable
|
||||||
|
|
||||||
project_type: app
|
project_type: app
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# example
|
# authentication_bloc_example
|
||||||
|
|
||||||
A new Flutter project.
|
A new Flutter project.
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ if (flutterVersionName == null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
// START: FlutterFire Configuration
|
||||||
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
// END: FlutterFire Configuration
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
@@ -43,7 +46,7 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.example.example"
|
applicationId "com.example.authentication_bloc_example"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
|
|||||||
@@ -0,0 +1,135 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "136771801992",
|
||||||
|
"firebase_url": "https://tchat-beta.firebaseio.com",
|
||||||
|
"project_id": "tchat-beta",
|
||||||
|
"storage_bucket": "tchat-beta.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:136771801992:android:4ff419f07afdad6097203d",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.example.authentication_bloc_example"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyAYS14uXupkS158Q5QAFP1864UrUN_yDSk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-e585bm1n9b3lv89t4phrl9u0glsg52ua.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.example.example"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:136771801992:android:8482c9b90bc29de697203d",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.example.crud_bloc_example"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyAYS14uXupkS158Q5QAFP1864UrUN_yDSk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-e585bm1n9b3lv89t4phrl9u0glsg52ua.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.example.example"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:136771801992:android:d20e0361057e815197203d",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.example.example"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-n2pq8oqutvrqj58e05hbavvc7n1jdfjb.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.example.example",
|
||||||
|
"certificate_hash": "5d8790309e13b68c35e5d4d8437c35c6d15e6131"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-pj9s88ao7d99pnp4ace75nj1abtmoq7e.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.example.example",
|
||||||
|
"certificate_hash": "bc8faf31c0b0085dc358b2319684e10c93f42719"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyAYS14uXupkS158Q5QAFP1864UrUN_yDSk"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-ncuib3rbu7p4ro4eo5su4vaudn2u4qrv.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "136771801992-e585bm1n9b3lv89t4phrl9u0glsg52ua.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.example.example"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.example.example">
|
package="com.example.authentication_bloc_example">
|
||||||
<!-- Flutter needs it to communicate with the running application
|
<!-- Flutter needs it to communicate with the running application
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.example.example">
|
package="com.example.authentication_bloc_example">
|
||||||
<application
|
<application
|
||||||
android:label="example"
|
android:label="authentication_bloc_example"
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher">
|
android:icon="@mipmap/ic_launcher">
|
||||||
<activity
|
<activity
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.example.authentication_bloc_example
|
||||||
|
|
||||||
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
|
class MainActivity: FlutterActivity() {
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.example.example">
|
package="com.example.authentication_bloc_example">
|
||||||
<!-- Flutter needs it to communicate with the running application
|
<!-- Flutter needs it to communicate with the running application
|
||||||
to allow setting breakpoints, to provide hot reload, etc.
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ buildscript {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||||
|
// START: FlutterFire Configuration
|
||||||
|
classpath 'com.google.gms:google-services:4.3.10'
|
||||||
|
// END: FlutterFire Configuration
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
**/dgph
|
|
||||||
*.mode1v3
|
|
||||||
*.mode2v3
|
|
||||||
*.moved-aside
|
|
||||||
*.pbxuser
|
|
||||||
*.perspectivev3
|
|
||||||
**/*sync/
|
|
||||||
.sconsign.dblite
|
|
||||||
.tags*
|
|
||||||
**/.vagrant/
|
|
||||||
**/DerivedData/
|
|
||||||
Icon?
|
|
||||||
**/Pods/
|
|
||||||
**/.symlinks/
|
|
||||||
profile
|
|
||||||
xcuserdata
|
|
||||||
**/.generated/
|
|
||||||
Flutter/App.framework
|
|
||||||
Flutter/Flutter.framework
|
|
||||||
Flutter/Flutter.podspec
|
|
||||||
Flutter/Generated.xcconfig
|
|
||||||
Flutter/ephemeral/
|
|
||||||
Flutter/app.flx
|
|
||||||
Flutter/app.zip
|
|
||||||
Flutter/flutter_assets/
|
|
||||||
Flutter/flutter_export_environment.sh
|
|
||||||
ServiceDefinitions.json
|
|
||||||
Runner/GeneratedPluginRegistrant.*
|
|
||||||
|
|
||||||
# Exceptions to above rules.
|
|
||||||
!default.mode1v3
|
|
||||||
!default.mode2v3
|
|
||||||
!default.pbxuser
|
|
||||||
!default.perspectivev3
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
<?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>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>en</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>App</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>io.flutter.flutter.app</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>App</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>FMWK</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>MinimumOSVersion</key>
|
|
||||||
<string>9.0</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
|
||||||
#include "Generated.xcconfig"
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
|
||||||
#include "Generated.xcconfig"
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
# Uncomment this line to define a global platform for your project
|
|
||||||
platform :ios, '10.0'
|
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
|
||||||
|
|
||||||
project 'Runner', {
|
|
||||||
'Debug' => :debug,
|
|
||||||
'Profile' => :release,
|
|
||||||
'Release' => :release,
|
|
||||||
}
|
|
||||||
|
|
||||||
def flutter_root
|
|
||||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
|
||||||
unless File.exist?(generated_xcode_build_settings_path)
|
|
||||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
|
||||||
end
|
|
||||||
|
|
||||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
|
||||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
|
||||||
return matches[1].strip if matches
|
|
||||||
end
|
|
||||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
|
||||||
end
|
|
||||||
|
|
||||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
|
||||||
|
|
||||||
flutter_ios_podfile_setup
|
|
||||||
|
|
||||||
target 'Runner' do
|
|
||||||
use_frameworks!
|
|
||||||
use_modular_headers!
|
|
||||||
|
|
||||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
|
||||||
end
|
|
||||||
|
|
||||||
post_install do |installer|
|
|
||||||
installer.pods_project.targets.each do |target|
|
|
||||||
flutter_additional_ios_build_settings(target)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
PODS:
|
|
||||||
- Firebase/Auth (8.10.0):
|
|
||||||
- Firebase/CoreOnly
|
|
||||||
- FirebaseAuth (~> 8.10.0)
|
|
||||||
- Firebase/CoreOnly (8.10.0):
|
|
||||||
- FirebaseCore (= 8.10.0)
|
|
||||||
- firebase_auth (3.3.5):
|
|
||||||
- Firebase/Auth (= 8.10.0)
|
|
||||||
- firebase_core
|
|
||||||
- Flutter
|
|
||||||
- firebase_core (1.11.0):
|
|
||||||
- Firebase/CoreOnly (= 8.10.0)
|
|
||||||
- Flutter
|
|
||||||
- FirebaseAuth (8.10.0):
|
|
||||||
- FirebaseCore (~> 8.0)
|
|
||||||
- GoogleUtilities/AppDelegateSwizzler (~> 7.6)
|
|
||||||
- GoogleUtilities/Environment (~> 7.6)
|
|
||||||
- GTMSessionFetcher/Core (~> 1.5)
|
|
||||||
- FirebaseCore (8.10.0):
|
|
||||||
- FirebaseCoreDiagnostics (~> 8.0)
|
|
||||||
- GoogleUtilities/Environment (~> 7.6)
|
|
||||||
- GoogleUtilities/Logger (~> 7.6)
|
|
||||||
- FirebaseCoreDiagnostics (8.10.0):
|
|
||||||
- GoogleDataTransport (~> 9.1)
|
|
||||||
- GoogleUtilities/Environment (~> 7.6)
|
|
||||||
- GoogleUtilities/Logger (~> 7.6)
|
|
||||||
- nanopb (~> 2.30908.0)
|
|
||||||
- Flutter (1.0.0)
|
|
||||||
- GoogleDataTransport (9.1.2):
|
|
||||||
- GoogleUtilities/Environment (~> 7.2)
|
|
||||||
- nanopb (~> 2.30908.0)
|
|
||||||
- PromisesObjC (< 3.0, >= 1.2)
|
|
||||||
- GoogleUtilities/AppDelegateSwizzler (7.7.0):
|
|
||||||
- GoogleUtilities/Environment
|
|
||||||
- GoogleUtilities/Logger
|
|
||||||
- GoogleUtilities/Network
|
|
||||||
- GoogleUtilities/Environment (7.7.0):
|
|
||||||
- PromisesObjC (< 3.0, >= 1.2)
|
|
||||||
- GoogleUtilities/Logger (7.7.0):
|
|
||||||
- GoogleUtilities/Environment
|
|
||||||
- GoogleUtilities/Network (7.7.0):
|
|
||||||
- GoogleUtilities/Logger
|
|
||||||
- "GoogleUtilities/NSData+zlib"
|
|
||||||
- GoogleUtilities/Reachability
|
|
||||||
- "GoogleUtilities/NSData+zlib (7.7.0)"
|
|
||||||
- GoogleUtilities/Reachability (7.7.0):
|
|
||||||
- GoogleUtilities/Logger
|
|
||||||
- GTMSessionFetcher/Core (1.7.0)
|
|
||||||
- nanopb (2.30908.0):
|
|
||||||
- nanopb/decode (= 2.30908.0)
|
|
||||||
- nanopb/encode (= 2.30908.0)
|
|
||||||
- nanopb/decode (2.30908.0)
|
|
||||||
- nanopb/encode (2.30908.0)
|
|
||||||
- PromisesObjC (2.0.0)
|
|
||||||
|
|
||||||
DEPENDENCIES:
|
|
||||||
- firebase_auth (from `.symlinks/plugins/firebase_auth/ios`)
|
|
||||||
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
|
|
||||||
- Flutter (from `Flutter`)
|
|
||||||
|
|
||||||
SPEC REPOS:
|
|
||||||
trunk:
|
|
||||||
- Firebase
|
|
||||||
- FirebaseAuth
|
|
||||||
- FirebaseCore
|
|
||||||
- FirebaseCoreDiagnostics
|
|
||||||
- GoogleDataTransport
|
|
||||||
- GoogleUtilities
|
|
||||||
- GTMSessionFetcher
|
|
||||||
- nanopb
|
|
||||||
- PromisesObjC
|
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
|
||||||
firebase_auth:
|
|
||||||
:path: ".symlinks/plugins/firebase_auth/ios"
|
|
||||||
firebase_core:
|
|
||||||
:path: ".symlinks/plugins/firebase_core/ios"
|
|
||||||
Flutter:
|
|
||||||
:path: Flutter
|
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
|
||||||
Firebase: 44213362f1dcc52555b935dc925ed35ac55f1b20
|
|
||||||
firebase_auth: 9d959bddc3b255ddfb67cf630a5bbb6186964356
|
|
||||||
firebase_core: 2ca2d6cc8a11693e701b37126afae4800be5dbac
|
|
||||||
FirebaseAuth: 59a2d2b933b5b79e18fb1e6ad230c6abdaa73d26
|
|
||||||
FirebaseCore: 04186597c095da37d90ff9fd3e53bc61a1ff2440
|
|
||||||
FirebaseCoreDiagnostics: 56fb7216d87e0e6ec2feddefa9d8a392fe8b2c18
|
|
||||||
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
|
||||||
GoogleDataTransport: 629c20a4d363167143f30ea78320d5a7eb8bd940
|
|
||||||
GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1
|
|
||||||
GTMSessionFetcher: 43748f93435c2aa068b1cbe39655aaf600652e91
|
|
||||||
nanopb: a0ba3315591a9ae0a16a309ee504766e90db0c96
|
|
||||||
PromisesObjC: 68159ce6952d93e17b2dfe273b8c40907db5ba58
|
|
||||||
|
|
||||||
PODFILE CHECKSUM: fe0e1ee7f3d1f7d00b11b474b62dd62134535aea
|
|
||||||
|
|
||||||
COCOAPODS: 1.11.2
|
|
||||||
@@ -1,549 +0,0 @@
|
|||||||
// !$*UTF8*$!
|
|
||||||
{
|
|
||||||
archiveVersion = 1;
|
|
||||||
classes = {
|
|
||||||
};
|
|
||||||
objectVersion = 50;
|
|
||||||
objects = {
|
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
|
||||||
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 */; };
|
|
||||||
E0ACB97A2AC1EAE305AB816E /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17811D4CD54BBE5A5A617A67 /* Pods_Runner.framework */; };
|
|
||||||
/* End PBXBuildFile section */
|
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
|
||||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
|
||||||
isa = PBXCopyFilesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
dstPath = "";
|
|
||||||
dstSubfolderSpec = 10;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
name = "Embed Frameworks";
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXCopyFilesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
|
||||||
08CA0F9F86D48F857AE8F6A9 /* 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>"; };
|
|
||||||
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>"; };
|
|
||||||
17811D4CD54BBE5A5A617A67 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
|
||||||
5464F99483A75A45363198CF /* 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>"; };
|
|
||||||
60123E8F332B681F9E8E65D0 /* 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>"; };
|
|
||||||
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>"; };
|
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/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; };
|
|
||||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
|
||||||
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>"; };
|
|
||||||
/* End PBXFileReference section */
|
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
|
||||||
isa = PBXFrameworksBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
E0ACB97A2AC1EAE305AB816E /* Pods_Runner.framework in Frameworks */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXFrameworksBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
|
||||||
868018A8DFEB24F4BBF7C643 /* Pods */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
5464F99483A75A45363198CF /* Pods-Runner.debug.xcconfig */,
|
|
||||||
08CA0F9F86D48F857AE8F6A9 /* Pods-Runner.release.xcconfig */,
|
|
||||||
60123E8F332B681F9E8E65D0 /* Pods-Runner.profile.xcconfig */,
|
|
||||||
);
|
|
||||||
name = Pods;
|
|
||||||
path = Pods;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
|
||||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
|
||||||
);
|
|
||||||
name = Flutter;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146E51CF9000F007C117D = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
9740EEB11CF90186004384FC /* Flutter */,
|
|
||||||
97C146F01CF9000F007C117D /* Runner */,
|
|
||||||
97C146EF1CF9000F007C117D /* Products */,
|
|
||||||
868018A8DFEB24F4BBF7C643 /* Pods */,
|
|
||||||
A25D987A122B465AA7E625CC /* Frameworks */,
|
|
||||||
);
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146EF1CF9000F007C117D /* Products */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
|
||||||
);
|
|
||||||
name = Products;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146F01CF9000F007C117D /* Runner */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
|
||||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
|
||||||
97C147021CF9000F007C117D /* Info.plist */,
|
|
||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
|
||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
|
||||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
|
||||||
);
|
|
||||||
path = Runner;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
A25D987A122B465AA7E625CC /* Frameworks */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
17811D4CD54BBE5A5A617A67 /* Pods_Runner.framework */,
|
|
||||||
);
|
|
||||||
name = Frameworks;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXGroup section */
|
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
|
||||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
|
||||||
isa = PBXNativeTarget;
|
|
||||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
|
||||||
buildPhases = (
|
|
||||||
FDCB4921C84D1E40D80F2BC5 /* [CP] Check Pods Manifest.lock */,
|
|
||||||
9740EEB61CF901F6004384FC /* Run Script */,
|
|
||||||
97C146EA1CF9000F007C117D /* Sources */,
|
|
||||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
|
||||||
97C146EC1CF9000F007C117D /* Resources */,
|
|
||||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
|
||||||
EA7D75F2512D4CFC69FD736B /* [CP] Embed Pods Frameworks */,
|
|
||||||
);
|
|
||||||
buildRules = (
|
|
||||||
);
|
|
||||||
dependencies = (
|
|
||||||
);
|
|
||||||
name = Runner;
|
|
||||||
productName = Runner;
|
|
||||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
|
||||||
productType = "com.apple.product-type.application";
|
|
||||||
};
|
|
||||||
/* End PBXNativeTarget section */
|
|
||||||
|
|
||||||
/* Begin PBXProject section */
|
|
||||||
97C146E61CF9000F007C117D /* Project object */ = {
|
|
||||||
isa = PBXProject;
|
|
||||||
attributes = {
|
|
||||||
LastUpgradeCheck = 1300;
|
|
||||||
ORGANIZATIONNAME = "";
|
|
||||||
TargetAttributes = {
|
|
||||||
97C146ED1CF9000F007C117D = {
|
|
||||||
CreatedOnToolsVersion = 7.3.1;
|
|
||||||
LastSwiftMigration = 1100;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
|
||||||
compatibilityVersion = "Xcode 9.3";
|
|
||||||
developmentRegion = en;
|
|
||||||
hasScannedForEncodings = 0;
|
|
||||||
knownRegions = (
|
|
||||||
en,
|
|
||||||
Base,
|
|
||||||
);
|
|
||||||
mainGroup = 97C146E51CF9000F007C117D;
|
|
||||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
|
||||||
projectDirPath = "";
|
|
||||||
projectRoot = "";
|
|
||||||
targets = (
|
|
||||||
97C146ED1CF9000F007C117D /* Runner */,
|
|
||||||
);
|
|
||||||
};
|
|
||||||
/* End PBXProject section */
|
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
|
||||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
|
||||||
isa = PBXResourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* 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";
|
|
||||||
};
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
EA7D75F2512D4CFC69FD736B /* [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;
|
|
||||||
};
|
|
||||||
FDCB4921C84D1E40D80F2BC5 /* [CP] Check Pods Manifest.lock */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
|
||||||
"${PODS_ROOT}/Manifest.lock",
|
|
||||||
);
|
|
||||||
name = "[CP] Check Pods Manifest.lock";
|
|
||||||
outputFileListPaths = (
|
|
||||||
);
|
|
||||||
outputPaths = (
|
|
||||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
/* End PBXShellScriptBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
|
||||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
|
||||||
isa = PBXSourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXSourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXVariantGroup section */
|
|
||||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
97C146FB1CF9000F007C117D /* Base */,
|
|
||||||
);
|
|
||||||
name = Main.storyboard;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
|
||||||
isa = PBXVariantGroup;
|
|
||||||
children = (
|
|
||||||
97C147001CF9000F007C117D /* Base */,
|
|
||||||
);
|
|
||||||
name = LaunchScreen.storyboard;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXVariantGroup section */
|
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
|
||||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
|
||||||
SDKROOT = iphoneos;
|
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
|
||||||
VALIDATE_PRODUCT = YES;
|
|
||||||
};
|
|
||||||
name = Profile;
|
|
||||||
};
|
|
||||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
|
||||||
ENABLE_BITCODE = NO;
|
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/Frameworks",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
};
|
|
||||||
name = Profile;
|
|
||||||
};
|
|
||||||
97C147031CF9000F007C117D /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
ENABLE_TESTABILITY = YES;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
||||||
"DEBUG=1",
|
|
||||||
"$(inherited)",
|
|
||||||
);
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
SDKROOT = iphoneos;
|
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
97C147041CF9000F007C117D /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
|
||||||
CLANG_CXX_LIBRARY = "libc++";
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CLANG_ENABLE_OBJC_ARC = YES;
|
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_COMMA = YES;
|
|
||||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
||||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
||||||
CLANG_WARN_EMPTY_BODY = YES;
|
|
||||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
||||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
||||||
CLANG_WARN_INT_CONVERSION = YES;
|
|
||||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
|
||||||
COPY_PHASE_STRIP = NO;
|
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
||||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
|
||||||
SDKROOT = iphoneos;
|
|
||||||
SUPPORTED_PLATFORMS = iphoneos;
|
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
|
||||||
VALIDATE_PRODUCT = YES;
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
97C147061CF9000F007C117D /* Debug */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
|
||||||
ENABLE_BITCODE = NO;
|
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/Frameworks",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
};
|
|
||||||
name = Debug;
|
|
||||||
};
|
|
||||||
97C147071CF9000F007C117D /* Release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
|
||||||
buildSettings = {
|
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
|
||||||
CLANG_ENABLE_MODULES = YES;
|
|
||||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
|
||||||
ENABLE_BITCODE = NO;
|
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
|
||||||
"$(inherited)",
|
|
||||||
"@executable_path/Frameworks",
|
|
||||||
);
|
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
|
||||||
SWIFT_VERSION = 5.0;
|
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
|
||||||
};
|
|
||||||
name = Release;
|
|
||||||
};
|
|
||||||
/* End XCBuildConfiguration section */
|
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
|
||||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
97C147031CF9000F007C117D /* Debug */,
|
|
||||||
97C147041CF9000F007C117D /* Release */,
|
|
||||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
97C147061CF9000F007C117D /* Debug */,
|
|
||||||
97C147071CF9000F007C117D /* Release */,
|
|
||||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = Release;
|
|
||||||
};
|
|
||||||
/* End XCConfigurationList section */
|
|
||||||
};
|
|
||||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Workspace
|
|
||||||
version = "1.0">
|
|
||||||
<FileRef
|
|
||||||
location = "self:">
|
|
||||||
</FileRef>
|
|
||||||
</Workspace>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?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,87 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Scheme
|
|
||||||
LastUpgradeVersion = "1300"
|
|
||||||
version = "1.3">
|
|
||||||
<BuildAction
|
|
||||||
parallelizeBuildables = "YES"
|
|
||||||
buildImplicitDependencies = "YES">
|
|
||||||
<BuildActionEntries>
|
|
||||||
<BuildActionEntry
|
|
||||||
buildForTesting = "YES"
|
|
||||||
buildForRunning = "YES"
|
|
||||||
buildForProfiling = "YES"
|
|
||||||
buildForArchiving = "YES"
|
|
||||||
buildForAnalyzing = "YES">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildActionEntry>
|
|
||||||
</BuildActionEntries>
|
|
||||||
</BuildAction>
|
|
||||||
<TestAction
|
|
||||||
buildConfiguration = "Debug"
|
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
||||||
<MacroExpansion>
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</MacroExpansion>
|
|
||||||
<Testables>
|
|
||||||
</Testables>
|
|
||||||
</TestAction>
|
|
||||||
<LaunchAction
|
|
||||||
buildConfiguration = "Debug"
|
|
||||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
||||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
||||||
launchStyle = "0"
|
|
||||||
useCustomWorkingDirectory = "NO"
|
|
||||||
ignoresPersistentStateOnLaunch = "NO"
|
|
||||||
debugDocumentVersioning = "YES"
|
|
||||||
debugServiceExtension = "internal"
|
|
||||||
allowLocationSimulation = "YES">
|
|
||||||
<BuildableProductRunnable
|
|
||||||
runnableDebuggingMode = "0">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildableProductRunnable>
|
|
||||||
</LaunchAction>
|
|
||||||
<ProfileAction
|
|
||||||
buildConfiguration = "Profile"
|
|
||||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
||||||
savedToolIdentifier = ""
|
|
||||||
useCustomWorkingDirectory = "NO"
|
|
||||||
debugDocumentVersioning = "YES">
|
|
||||||
<BuildableProductRunnable
|
|
||||||
runnableDebuggingMode = "0">
|
|
||||||
<BuildableReference
|
|
||||||
BuildableIdentifier = "primary"
|
|
||||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
|
||||||
BuildableName = "Runner.app"
|
|
||||||
BlueprintName = "Runner"
|
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
|
||||||
</BuildableReference>
|
|
||||||
</BuildableProductRunnable>
|
|
||||||
</ProfileAction>
|
|
||||||
<AnalyzeAction
|
|
||||||
buildConfiguration = "Debug">
|
|
||||||
</AnalyzeAction>
|
|
||||||
<ArchiveAction
|
|
||||||
buildConfiguration = "Release"
|
|
||||||
revealArchiveInOrganizer = "YES">
|
|
||||||
</ArchiveAction>
|
|
||||||
</Scheme>
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Workspace
|
|
||||||
version = "1.0">
|
|
||||||
<FileRef
|
|
||||||
location = "group:Runner.xcodeproj">
|
|
||||||
</FileRef>
|
|
||||||
<FileRef
|
|
||||||
location = "group:Pods/Pods.xcodeproj">
|
|
||||||
</FileRef>
|
|
||||||
</Workspace>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?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,13 +0,0 @@
|
|||||||
import UIKit
|
|
||||||
import Flutter
|
|
||||||
|
|
||||||
@UIApplicationMain
|
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
|
||||||
override func application(
|
|
||||||
_ application: UIApplication,
|
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
||||||
) -> Bool {
|
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
|
||||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,122 +0,0 @@
|
|||||||
{
|
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-20x20@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-29x29@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-40x40@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "60x60",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-60x60@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "60x60",
|
|
||||||
"idiom" : "iphone",
|
|
||||||
"filename" : "Icon-App-60x60@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-20x20@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "20x20",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-20x20@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "29x29",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-29x29@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "40x40",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-40x40@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "76x76",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-76x76@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "83.5x83.5",
|
|
||||||
"idiom" : "ipad",
|
|
||||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"size" : "1024x1024",
|
|
||||||
"idiom" : "ios-marketing",
|
|
||||||
"filename" : "Icon-App-1024x1024@1x.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"version" : 1,
|
|
||||||
"author" : "xcode"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 564 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
@@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"images" : [
|
|
||||||
{
|
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage@2x.png",
|
|
||||||
"scale" : "2x"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"idiom" : "universal",
|
|
||||||
"filename" : "LaunchImage@3x.png",
|
|
||||||
"scale" : "3x"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"version" : 1,
|
|
||||||
"author" : "xcode"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B |
@@ -1,5 +0,0 @@
|
|||||||
# Launch Screen Assets
|
|
||||||
|
|
||||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
|
||||||
|
|
||||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
|
||||||
<dependencies>
|
|
||||||
<deployment identifier="iOS"/>
|
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
|
||||||
</dependencies>
|
|
||||||
<scenes>
|
|
||||||
<!--View Controller-->
|
|
||||||
<scene sceneID="EHf-IW-A2E">
|
|
||||||
<objects>
|
|
||||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
|
||||||
<layoutGuides>
|
|
||||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
|
||||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
|
||||||
</layoutGuides>
|
|
||||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<subviews>
|
|
||||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
|
||||||
</imageView>
|
|
||||||
</subviews>
|
|
||||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
||||||
<constraints>
|
|
||||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
|
||||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
|
||||||
</constraints>
|
|
||||||
</view>
|
|
||||||
</viewController>
|
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
|
||||||
<point key="canvasLocation" x="53" y="375"/>
|
|
||||||
</scene>
|
|
||||||
</scenes>
|
|
||||||
<resources>
|
|
||||||
<image name="LaunchImage" width="168" height="185"/>
|
|
||||||
</resources>
|
|
||||||
</document>
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
|
||||||
<dependencies>
|
|
||||||
<deployment identifier="iOS"/>
|
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
|
||||||
</dependencies>
|
|
||||||
<scenes>
|
|
||||||
<!--Flutter View Controller-->
|
|
||||||
<scene sceneID="tne-QT-ifu">
|
|
||||||
<objects>
|
|
||||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
|
||||||
<layoutGuides>
|
|
||||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
|
||||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
|
||||||
</layoutGuides>
|
|
||||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
|
||||||
</view>
|
|
||||||
</viewController>
|
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
|
||||||
</objects>
|
|
||||||
</scene>
|
|
||||||
</scenes>
|
|
||||||
</document>
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
<?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>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
||||||
<key>CFBundleDisplayName</key>
|
|
||||||
<string>Example</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>example</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
|
||||||
<key>LSRequiresIPhoneOS</key>
|
|
||||||
<true/>
|
|
||||||
<key>UILaunchStoryboardName</key>
|
|
||||||
<string>LaunchScreen</string>
|
|
||||||
<key>UIMainStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
<key>UISupportedInterfaceOrientations</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
||||||
<array>
|
|
||||||
<string>UIInterfaceOrientationPortrait</string>
|
|
||||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
||||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
||||||
</array>
|
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
#import "GeneratedPluginRegistrant.h"
|
|
||||||
@@ -14,14 +14,17 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
|
import 'package:authentication_bloc_example/constants.dart';
|
||||||
|
import 'package:authentication_bloc_example/home/home_page.dart';
|
||||||
|
import 'package:authentication_bloc_example/login/login_page.dart';
|
||||||
|
import 'package:authentication_bloc_example/model.dart';
|
||||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||||
import 'package:example/constants.dart';
|
|
||||||
import 'package:example/home/home_page.dart';
|
|
||||||
import 'package:example/login/login_page.dart';
|
|
||||||
import 'package:example/model.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
||||||
|
import 'package:wyatt_form_bloc/wyatt_form_bloc.dart';
|
||||||
|
|
||||||
class App extends StatelessWidget {
|
class App extends StatelessWidget {
|
||||||
const App({Key? key}) : super(key: key);
|
const App({Key? key}) : super(key: key);
|
||||||
@@ -31,7 +34,8 @@ class App extends StatelessWidget {
|
|||||||
FormEntry(formFieldName, Name.pure()),
|
FormEntry(formFieldName, Name.pure()),
|
||||||
FormEntry(formFieldPhone, Phone.pure()),
|
FormEntry(formFieldPhone, Phone.pure()),
|
||||||
FormEntry(formFieldPro, Boolean.pure()),
|
FormEntry(formFieldPro, Boolean.pure()),
|
||||||
FormEntry(formFieldConfirmedPassword, ConfirmedPassword.pure(), export: false),
|
FormEntry(formFieldConfirmedPassword, ConfirmedPassword.pure(),
|
||||||
|
export: false),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +46,8 @@ class App extends StatelessWidget {
|
|||||||
FormEntry(formFieldPro, Boolean.pure()),
|
FormEntry(formFieldPro, Boolean.pure()),
|
||||||
FormEntry(formFieldSiren, Siren.pure()),
|
FormEntry(formFieldSiren, Siren.pure()),
|
||||||
FormEntry(formFieldIban, Iban.pure()),
|
FormEntry(formFieldIban, Iban.pure()),
|
||||||
FormEntry(formFieldConfirmedPassword, ConfirmedPassword.pure(), export: false),
|
FormEntry(formFieldConfirmedPassword, ConfirmedPassword.pure(),
|
||||||
|
export: false),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,14 +57,32 @@ class App extends StatelessWidget {
|
|||||||
if (user.isNotEmpty && !user.isAnonymous) {
|
if (user.isNotEmpty && !user.isAnonymous) {
|
||||||
// Check if user is register in Firesore.
|
// Check if user is register in Firesore.
|
||||||
DocumentSnapshot firestoreUser = await FirebaseFirestore.instance
|
DocumentSnapshot firestoreUser = await FirebaseFirestore.instance
|
||||||
.collection('users')
|
.collection(firestoreCollectionUsers)
|
||||||
.doc(user.uid)
|
.doc(user.uid)
|
||||||
.get();
|
.get();
|
||||||
return {
|
|
||||||
'user':
|
if (!firestoreUser.exists) {
|
||||||
UserFirestore.fromMap(firestoreUser.data() as Map<String, dynamic>),
|
// Register user in Firestore when sign in with social account.
|
||||||
...firestoreUser.data() as Map<String, dynamic>? ?? {}
|
final uid = user.uid;
|
||||||
};
|
final u = {'uid': uid, 'email': user.email};
|
||||||
|
await FirebaseFirestore.instance
|
||||||
|
.collection(firestoreCollectionUsers)
|
||||||
|
.doc(uid)
|
||||||
|
.set(u);
|
||||||
|
return {
|
||||||
|
'user': UserFirestore(
|
||||||
|
uid: uid,
|
||||||
|
email: user.email ?? '',
|
||||||
|
name: user.displayName ?? '',
|
||||||
|
phone: user.phoneNumber ?? ''),
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
'user': UserFirestore.fromMap(
|
||||||
|
firestoreUser.data() as Map<String, dynamic>),
|
||||||
|
...firestoreUser.data() as Map<String, dynamic>? ?? {}
|
||||||
|
};
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@@ -70,7 +93,11 @@ class App extends StatelessWidget {
|
|||||||
if (uid != null) {
|
if (uid != null) {
|
||||||
final data = state.data.toMap();
|
final data = state.data.toMap();
|
||||||
final user = {'uid': uid, 'email': state.email.value, ...data};
|
final user = {'uid': uid, 'email': state.email.value, ...data};
|
||||||
await FirebaseFirestore.instance.collection('users').doc(uid).set(user);
|
log('onSignUpSuccess: $user');
|
||||||
|
await FirebaseFirestore.instance
|
||||||
|
.collection(firestoreCollectionUsers)
|
||||||
|
.doc(uid)
|
||||||
|
.set(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,4 +19,6 @@ const String formFieldPhone = 'phone';
|
|||||||
const String formFieldPro = 'isPro';
|
const String formFieldPro = 'isPro';
|
||||||
const String formFieldConfirmedPassword = 'confirmedPassword';
|
const String formFieldConfirmedPassword = 'confirmedPassword';
|
||||||
const String formFieldSiren = 'siren';
|
const String formFieldSiren = 'siren';
|
||||||
const String formFieldIban = 'iban';
|
const String formFieldIban = 'iban';
|
||||||
|
|
||||||
|
const String firestoreCollectionUsers = 'authentication_bloc_users';
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
// File generated by FlutterFire CLI.
|
|
||||||
// ignore_for_file: lines_longer_than_80_chars
|
|
||||||
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
|
||||||
import 'package:flutter/foundation.dart'
|
|
||||||
show defaultTargetPlatform, kIsWeb, TargetPlatform;
|
|
||||||
|
|
||||||
/// Default [FirebaseOptions] for use with your Firebase apps.
|
|
||||||
///
|
|
||||||
/// Example:
|
|
||||||
/// ```dart
|
|
||||||
/// import 'firebase_options.dart';
|
|
||||||
/// // ...
|
|
||||||
/// await Firebase.initializeApp(
|
|
||||||
/// options: DefaultFirebaseOptions.currentPlatform,
|
|
||||||
/// );
|
|
||||||
/// ```
|
|
||||||
class DefaultFirebaseOptions {
|
|
||||||
static FirebaseOptions get currentPlatform {
|
|
||||||
if (kIsWeb) {
|
|
||||||
return web;
|
|
||||||
}
|
|
||||||
// ignore: missing_enum_constant_in_switch
|
|
||||||
switch (defaultTargetPlatform) {
|
|
||||||
case TargetPlatform.android:
|
|
||||||
return android;
|
|
||||||
case TargetPlatform.iOS:
|
|
||||||
return ios;
|
|
||||||
case TargetPlatform.macOS:
|
|
||||||
throw UnsupportedError(
|
|
||||||
'DefaultFirebaseOptions have not been configured for macos - '
|
|
||||||
'you can reconfigure this by running the FlutterFire CLI again.',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
throw UnsupportedError(
|
|
||||||
'DefaultFirebaseOptions are not supported for this platform.',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const FirebaseOptions web = FirebaseOptions(
|
|
||||||
apiKey: 'AIzaSyCxdDUpkpW7onOicIcIDcIVvPC8ll1twCQ',
|
|
||||||
appId: '1:136771801992:web:e757595ae62e646297203d',
|
|
||||||
messagingSenderId: '136771801992',
|
|
||||||
projectId: 'tchat-beta',
|
|
||||||
authDomain: 'tchat-beta.firebaseapp.com',
|
|
||||||
databaseURL: 'https://tchat-beta.firebaseio.com',
|
|
||||||
storageBucket: 'tchat-beta.appspot.com',
|
|
||||||
);
|
|
||||||
|
|
||||||
static const FirebaseOptions android = FirebaseOptions(
|
|
||||||
apiKey: 'AIzaSyAYS14uXupkS158Q5QAFP1864UrUN_yDSk',
|
|
||||||
appId: '1:136771801992:android:d20e0361057e815197203d',
|
|
||||||
messagingSenderId: '136771801992',
|
|
||||||
projectId: 'tchat-beta',
|
|
||||||
databaseURL: 'https://tchat-beta.firebaseio.com',
|
|
||||||
storageBucket: 'tchat-beta.appspot.com',
|
|
||||||
);
|
|
||||||
|
|
||||||
static const FirebaseOptions ios = FirebaseOptions(
|
|
||||||
apiKey: 'AIzaSyCDbbhjbFrQwLXuIANdJzjkDk8uOETnn7w',
|
|
||||||
appId: '1:136771801992:ios:6fe69c0bea08b7b397203d',
|
|
||||||
messagingSenderId: '136771801992',
|
|
||||||
projectId: 'tchat-beta',
|
|
||||||
databaseURL: 'https://tchat-beta.firebaseio.com',
|
|
||||||
storageBucket: 'tchat-beta.appspot.com',
|
|
||||||
iosClientId:
|
|
||||||
'136771801992-e585bm1n9b3lv89t4phrl9u0glsg52ua.apps.googleusercontent.com',
|
|
||||||
iosBundleId: 'com.example.example',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:example/forgot_password/widgets/forgot_password_form.dart';
|
import 'package:authentication_bloc_example/forgot_password/widgets/forgot_password_form.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|||||||
@@ -15,8 +15,9 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
||||||
|
import 'package:wyatt_form_bloc/wyatt_form_bloc.dart';
|
||||||
|
|
||||||
class _EmailInput extends StatelessWidget {
|
class _EmailInput extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:example/home/widgets/infos.dart';
|
import 'package:authentication_bloc_example/home/widgets/infos.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
||||||
import 'package:example/home/widgets/email_verification.dart';
|
import 'package:authentication_bloc_example/home/widgets/email_verification.dart';
|
||||||
|
|
||||||
class HomePage extends StatelessWidget {
|
class HomePage extends StatelessWidget {
|
||||||
const HomePage({Key? key}) : super(key: key);
|
const HomePage({Key? key}) : super(key: key);
|
||||||
|
|||||||
@@ -14,11 +14,11 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:example/home/widgets/avatar.dart';
|
import 'package:authentication_bloc_example/home/widgets/avatar.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:example/constants.dart';
|
import 'package:authentication_bloc_example/constants.dart';
|
||||||
|
|
||||||
class UserInfo extends StatelessWidget {
|
class UserInfo extends StatelessWidget {
|
||||||
const UserInfo({Key? key}) : super(key: key);
|
const UserInfo({Key? key}) : super(key: key);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:example/login/widgets/login_form.dart';
|
import 'package:authentication_bloc_example/login/widgets/login_form.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class LoginPage extends StatelessWidget {
|
class LoginPage extends StatelessWidget {
|
||||||
|
|||||||
@@ -14,13 +14,14 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:example/app/app.dart';
|
import 'package:authentication_bloc_example/app/app.dart';
|
||||||
import 'package:example/constants.dart';
|
import 'package:authentication_bloc_example/constants.dart';
|
||||||
import 'package:example/forgot_password/forgot_password_page.dart';
|
import 'package:authentication_bloc_example/forgot_password/forgot_password_page.dart';
|
||||||
import 'package:example/sign_up/sign_up_page.dart';
|
import 'package:authentication_bloc_example/sign_up/sign_up_page.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
||||||
|
import 'package:wyatt_form_bloc/wyatt_form_bloc.dart';
|
||||||
|
|
||||||
class _EmailInput extends StatelessWidget {
|
class _EmailInput extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
@@ -101,6 +102,24 @@ class _LoginWithPasswordButton extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class _LoginWithGoogleButton extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return BlocBuilder<SignInCubit, SignInState>(
|
||||||
|
buildWhen: (previous, current) => previous.status != current.status,
|
||||||
|
builder: (context, state) {
|
||||||
|
return state.status.isSubmissionInProgress
|
||||||
|
? const CircularProgressIndicator()
|
||||||
|
: ElevatedButton(
|
||||||
|
onPressed: () =>
|
||||||
|
context.read<SignInCubit>().signInWithGoogle(),
|
||||||
|
child: const Text('LOGIN GOOGLE'),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class _SignUpButton extends StatelessWidget {
|
class _SignUpButton extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -181,6 +200,8 @@ class LoginForm extends StatelessWidget {
|
|||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
_LoginAnonButton(),
|
_LoginAnonButton(),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
|
_LoginWithGoogleButton(),
|
||||||
|
const SizedBox(height: 8),
|
||||||
_SignUpButton(),
|
_SignUpButton(),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
_SignUpAsProButton(),
|
_SignUpAsProButton(),
|
||||||
|
|||||||
@@ -14,9 +14,9 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:example/app/app.dart';
|
import 'package:authentication_bloc_example/app/app.dart';
|
||||||
import 'package:example/app/bloc_observer.dart';
|
import 'package:authentication_bloc_example/app/bloc_observer.dart';
|
||||||
import 'package:example/firebase_options.dart';
|
import 'package:authentication_bloc_example/firebase_options.dart';
|
||||||
import 'package:firebase_core/firebase_core.dart';
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:example/sign_up/widgets/sign_up_form.dart';
|
import 'package:authentication_bloc_example/sign_up/widgets/sign_up_form.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SignUpPage extends StatelessWidget {
|
class SignUpPage extends StatelessWidget {
|
||||||
|
|||||||
@@ -16,11 +16,12 @@
|
|||||||
|
|
||||||
import 'dart:developer';
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'package:example/app/app.dart';
|
import 'package:authentication_bloc_example/app/app.dart';
|
||||||
import 'package:example/constants.dart';
|
import 'package:authentication_bloc_example/constants.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:wyatt_authentication_bloc/wyatt_authentication_bloc.dart';
|
||||||
|
import 'package:wyatt_form_bloc/wyatt_form_bloc.dart';
|
||||||
|
|
||||||
class _NameInput extends StatelessWidget {
|
class _NameInput extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
@@ -253,11 +254,12 @@ class _DebugButton extends StatelessWidget {
|
|||||||
return BlocBuilder<SignUpCubit, SignUpState>(
|
return BlocBuilder<SignUpCubit, SignUpState>(
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
return ElevatedButton(
|
return ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
log(state.toString());
|
// log(state.toString());
|
||||||
} ,
|
log(state.data.toMap().toString());
|
||||||
child: const Text('DEBUG'),
|
},
|
||||||
);
|
child: const Text('DEBUG'),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: example
|
name: authentication_bloc_example
|
||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
|
|
||||||
# The following line prevents the package from being accidentally published to
|
# The following line prevents the package from being accidentally published to
|
||||||
@@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
version: 1.0.0+1
|
version: 1.0.0+1
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.15.1 <3.0.0"
|
sdk: ">=2.16.2 <3.0.0"
|
||||||
|
|
||||||
# Dependencies specify other packages that your package needs in order to work.
|
# Dependencies specify other packages that your package needs in order to work.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
@@ -30,15 +30,21 @@ dependencies:
|
|||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
firebase_core: ^1.13.1
|
firebase_core: ^1.14.1
|
||||||
flutter_bloc: ^8.0.1
|
flutter_bloc: ^8.0.1
|
||||||
wyatt_authentication_bloc:
|
wyatt_authentication_bloc:
|
||||||
path: "../"
|
path: "../"
|
||||||
|
|
||||||
|
wyatt_form_bloc:
|
||||||
|
git:
|
||||||
|
url: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages
|
||||||
|
ref: wyatt_form_bloc-v0.0.2
|
||||||
|
path: packages/wyatt_form_bloc
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.4
|
cupertino_icons: ^1.0.4
|
||||||
cloud_firestore: ^3.1.10
|
cloud_firestore: ^3.1.12
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
@@ -49,7 +55,7 @@ dev_dependencies:
|
|||||||
# activated in the `analysis_options.yaml` file located at the root of your
|
# activated in the `analysis_options.yaml` file located at the root of your
|
||||||
# package. See that file for information about deactivating specific lint
|
# package. See that file for information about deactivating specific lint
|
||||||
# rules and activating additional ones.
|
# rules and activating additional ones.
|
||||||
flutter_lints: ^1.0.4
|
flutter_lints: ^1.0.0
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/authentication/cubit/authentication_cubit.dart';
|
import 'package:wyatt_authentication_bloc/src/authentication/cubit/authentication_cubit.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/models/user/user_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/models/user/user_interface.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
||||||
|
|
||||||
class AuthenticationBuilder extends StatelessWidget {
|
class AuthenticationBuilder extends StatelessWidget {
|
||||||
const AuthenticationBuilder({
|
const AuthenticationBuilder({
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_status.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/exceptions/exceptions_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/models/exceptions/exceptions_interface.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/repositories/authentication_repository_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/repositories/authentication_repository_interface.dart';
|
||||||
|
import 'package:wyatt_form_bloc/wyatt_form_bloc.dart' show FormStatus;
|
||||||
|
|
||||||
part 'email_verification_state.dart';
|
part 'email_verification_state.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -1,137 +0,0 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
|
||||||
// Please see the AUTHORS file for details.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_entry.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/validation_error.dart';
|
|
||||||
|
|
||||||
@immutable
|
|
||||||
class FormData {
|
|
||||||
const FormData(this._entries);
|
|
||||||
|
|
||||||
FormData.empty() : this(<FormEntry>[]);
|
|
||||||
|
|
||||||
final List<FormEntry> _entries;
|
|
||||||
|
|
||||||
List<FormEntry> get entries => _entries;
|
|
||||||
|
|
||||||
List<FormInput<T, ValidationError>> inputs<T>() {
|
|
||||||
return _entries
|
|
||||||
.map((FormEntry entry) => entry.input as FormInput<T, ValidationError>)
|
|
||||||
.toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
FormInput<T, ValidationError> input<T>(String field) {
|
|
||||||
if (contains(field)) {
|
|
||||||
return _entries
|
|
||||||
.firstWhere((FormEntry entry) => entry.field == field)
|
|
||||||
.input as FormInput<T, ValidationError>;
|
|
||||||
} else {
|
|
||||||
throw Exception('Field $field does not exist in form');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool contains(String field) {
|
|
||||||
return _entries.any((FormEntry entry) => entry.field == field);
|
|
||||||
}
|
|
||||||
|
|
||||||
FormData intersection(FormData other) {
|
|
||||||
final List<FormEntry> entries = <FormEntry>[];
|
|
||||||
|
|
||||||
for (final FormEntry entry in _entries) {
|
|
||||||
if (other.contains(entry.field)) {
|
|
||||||
entries.add(entry);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return FormData(entries);
|
|
||||||
}
|
|
||||||
|
|
||||||
FormData difference(FormData other) {
|
|
||||||
final List<FormEntry> entries = <FormEntry>[];
|
|
||||||
|
|
||||||
for (final FormEntry otherEntry in other._entries) {
|
|
||||||
if (!contains(otherEntry.field)) {
|
|
||||||
entries.add(otherEntry);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (final FormEntry entry in _entries) {
|
|
||||||
if (!other.contains(entry.field)) {
|
|
||||||
entries.add(entry);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return FormData(entries);
|
|
||||||
}
|
|
||||||
|
|
||||||
FormData union(FormData other) {
|
|
||||||
final List<FormEntry> entries = <FormEntry>[];
|
|
||||||
|
|
||||||
for (final FormEntry entry in _entries) {
|
|
||||||
entries.add(entry);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (final FormEntry otherEntry in other._entries) {
|
|
||||||
if (!contains(otherEntry.field)) {
|
|
||||||
entries.add(otherEntry);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return FormData(entries);
|
|
||||||
}
|
|
||||||
|
|
||||||
void update(String field, FormInput input) {
|
|
||||||
if (contains(field)) {
|
|
||||||
final index = _entries.indexOf(
|
|
||||||
_entries.firstWhere((FormEntry entry) => entry.field == field),
|
|
||||||
);
|
|
||||||
_entries[index] = _entries[index].copyWith(input: input);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FormData clone() {
|
|
||||||
return FormData(
|
|
||||||
_entries
|
|
||||||
.map((FormEntry entry) => entry.clone())
|
|
||||||
.toList(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
|
||||||
final map = <String, dynamic>{};
|
|
||||||
for (final entry in _entries) {
|
|
||||||
if (entry.export) {
|
|
||||||
map[entry.fieldName ?? entry.field] = entry.input.value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
if (identical(this, other)) return true;
|
|
||||||
|
|
||||||
return other is FormData && listEquals(other._entries, _entries);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode => _entries.hashCode;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() => 'FormData(entries: $_entries)';
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
|
||||||
// Please see the AUTHORS file for details.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input.dart';
|
|
||||||
|
|
||||||
@immutable
|
|
||||||
class FormEntry {
|
|
||||||
const FormEntry(this.field, this.input, {this.export = true, this.fieldName});
|
|
||||||
|
|
||||||
final String field;
|
|
||||||
final FormInput input;
|
|
||||||
final bool export;
|
|
||||||
final String? fieldName;
|
|
||||||
|
|
||||||
FormEntry copyWith({
|
|
||||||
String? field,
|
|
||||||
FormInput? input,
|
|
||||||
bool? export,
|
|
||||||
String? fieldName,
|
|
||||||
}) {
|
|
||||||
return FormEntry(
|
|
||||||
field ?? this.field,
|
|
||||||
input ?? this.input,
|
|
||||||
export: export ?? this.export,
|
|
||||||
fieldName: fieldName ?? this.fieldName,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
FormEntry clone() {
|
|
||||||
return FormEntry(
|
|
||||||
field,
|
|
||||||
input,
|
|
||||||
export: export,
|
|
||||||
fieldName: fieldName,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
if (identical(this, other)) return true;
|
|
||||||
|
|
||||||
return other is FormEntry &&
|
|
||||||
other.field == field &&
|
|
||||||
other.input == input &&
|
|
||||||
other.export == export &&
|
|
||||||
other.fieldName == fieldName;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode {
|
|
||||||
return field.hashCode ^
|
|
||||||
input.hashCode ^
|
|
||||||
export.hashCode ^
|
|
||||||
fieldName.hashCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
// ignore: lines_longer_than_80_chars
|
|
||||||
return 'FormEntry(field: $field, input: $input, export: $export, fieldName: $fieldName)';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,111 +0,0 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
|
||||||
// Please see the AUTHORS file for details.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input_status.dart';
|
|
||||||
|
|
||||||
/// {@template form_input}
|
|
||||||
/// A [FormInput] represents the value of a single form input field.
|
|
||||||
/// It contains information about the [FormInputStatus], [value], as well
|
|
||||||
/// as validation status.
|
|
||||||
///
|
|
||||||
/// [FormInput] should be extended to define custom [FormInput] instances.
|
|
||||||
///
|
|
||||||
/// ```dart
|
|
||||||
/// enum FirstNameError { empty }
|
|
||||||
/// class FirstName extends FormInput<String, FirstNameError> {
|
|
||||||
/// const FirstName.pure({String value = ''}) : super.pure(value);
|
|
||||||
/// const FirstName.dirty({String value = ''}) : super.dirty(value);
|
|
||||||
///
|
|
||||||
/// @override
|
|
||||||
/// FirstNameError? validator(String value) {
|
|
||||||
/// return value.isEmpty ? FirstNameError.empty : null;
|
|
||||||
/// }
|
|
||||||
/// }
|
|
||||||
/// ```
|
|
||||||
/// {@endtemplate}
|
|
||||||
@immutable
|
|
||||||
abstract class FormInput<T, E> {
|
|
||||||
const FormInput._(this.value, [this.pure = true]);
|
|
||||||
|
|
||||||
/// Constructor which create a `pure` [FormInput] with a given value.
|
|
||||||
const FormInput.pure(T value) : this._(value);
|
|
||||||
|
|
||||||
/// Constructor which create a `dirty` [FormInput] with a given value.
|
|
||||||
const FormInput.dirty(T value) : this._(value, false);
|
|
||||||
|
|
||||||
/// The value of the given [FormInput].
|
|
||||||
/// For example, if you have a `FormInput` for `FirstName`,
|
|
||||||
/// the value could be 'Joe'.
|
|
||||||
final T value;
|
|
||||||
|
|
||||||
/// If the [FormInput] is pure (has been touched/modified).
|
|
||||||
/// Typically when the `FormInput` is initially created,
|
|
||||||
/// it is created using the `FormInput.pure` constructor to
|
|
||||||
/// signify that the user has not modified it.
|
|
||||||
///
|
|
||||||
/// For subsequent changes (in response to user input), the
|
|
||||||
/// `FormInput.dirty` constructor should be used to signify that
|
|
||||||
/// the `FormInput` has been manipulated.
|
|
||||||
final bool pure;
|
|
||||||
|
|
||||||
/// The [FormInputStatus] which can be one of the following:
|
|
||||||
/// * [FormInputStatus.pure]
|
|
||||||
/// - if the input has not been modified.
|
|
||||||
/// * [FormInputStatus.invalid]
|
|
||||||
/// - if the input has been modified and validation failed.
|
|
||||||
/// * [FormInputStatus.valid]
|
|
||||||
/// - if the input has been modified and validation succeeded.
|
|
||||||
FormInputStatus get status => pure
|
|
||||||
? FormInputStatus.pure
|
|
||||||
: valid
|
|
||||||
? FormInputStatus.valid
|
|
||||||
: FormInputStatus.invalid;
|
|
||||||
|
|
||||||
/// Returns a validation error if the [FormInput] is invalid.
|
|
||||||
/// Returns `null` if the [FormInput] is valid.
|
|
||||||
E? get error => validator(value);
|
|
||||||
|
|
||||||
/// Whether the [FormInput] value is valid according to the
|
|
||||||
/// overridden `validator`.
|
|
||||||
///
|
|
||||||
/// Returns `true` if `validator` returns `null` for the
|
|
||||||
/// current [FormInput] value and `false` otherwise.
|
|
||||||
bool get valid => validator(value) == null;
|
|
||||||
|
|
||||||
/// Whether the [FormInput] value is not valid.
|
|
||||||
/// A value is invalid when the overridden `validator`
|
|
||||||
/// returns an error (non-null value).
|
|
||||||
bool get invalid => status == FormInputStatus.invalid;
|
|
||||||
|
|
||||||
/// A function that must return a validation error if the provided
|
|
||||||
/// [value] is invalid and `null` otherwise.
|
|
||||||
E? validator(T value);
|
|
||||||
|
|
||||||
@override
|
|
||||||
int get hashCode => value.hashCode ^ pure.hashCode;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
if (other.runtimeType != runtimeType) return false;
|
|
||||||
return other is FormInput<T, E> &&
|
|
||||||
other.value == value &&
|
|
||||||
other.pure == pure;
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() => '$runtimeType($value, $pure)';
|
|
||||||
}
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
|
||||||
// Please see the AUTHORS file for details.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
/// Enum representing the status of a form at any given point in time.
|
|
||||||
enum FormStatus {
|
|
||||||
/// The form has not been touched.
|
|
||||||
pure,
|
|
||||||
|
|
||||||
/// The form has been completely validated.
|
|
||||||
valid,
|
|
||||||
|
|
||||||
/// The form contains one or more invalid inputs.
|
|
||||||
invalid,
|
|
||||||
|
|
||||||
/// The form is in the process of being submitted.
|
|
||||||
submissionInProgress,
|
|
||||||
|
|
||||||
/// The form has been submitted successfully.
|
|
||||||
submissionSuccess,
|
|
||||||
|
|
||||||
/// The form submission failed.
|
|
||||||
submissionFailure,
|
|
||||||
|
|
||||||
/// The form submission has been canceled.
|
|
||||||
submissionCanceled
|
|
||||||
}
|
|
||||||
|
|
||||||
const Set<FormStatus> _validatedFormStatuses = <FormStatus>{
|
|
||||||
FormStatus.valid,
|
|
||||||
FormStatus.submissionInProgress,
|
|
||||||
FormStatus.submissionSuccess,
|
|
||||||
FormStatus.submissionFailure,
|
|
||||||
FormStatus.submissionCanceled,
|
|
||||||
};
|
|
||||||
|
|
||||||
/// Useful extensions on [FormStatus]
|
|
||||||
extension FormStatusX on FormStatus {
|
|
||||||
/// Indicates whether the form is untouched.
|
|
||||||
bool get isPure => this == FormStatus.pure;
|
|
||||||
|
|
||||||
/// Indicates whether the form is completely validated.
|
|
||||||
bool get isValid => this == FormStatus.valid;
|
|
||||||
|
|
||||||
/// Indicates whether the form has been validated successfully.
|
|
||||||
/// This means the [FormStatus] is either:
|
|
||||||
/// * `FormStatus.valid`
|
|
||||||
/// * `FormStatus.submissionInProgress`
|
|
||||||
/// * `FormStatus.submissionSuccess`
|
|
||||||
/// * `FormStatus.submissionFailure`
|
|
||||||
bool get isValidated => _validatedFormStatuses.contains(this);
|
|
||||||
|
|
||||||
/// Indicates whether the form contains one or more invalid inputs.
|
|
||||||
bool get isInvalid => this == FormStatus.invalid;
|
|
||||||
|
|
||||||
/// Indicates whether the form is in the process of being submitted.
|
|
||||||
bool get isSubmissionInProgress => this == FormStatus.submissionInProgress;
|
|
||||||
|
|
||||||
/// Indicates whether the form has been submitted successfully.
|
|
||||||
bool get isSubmissionSuccess => this == FormStatus.submissionSuccess;
|
|
||||||
|
|
||||||
/// Indicates whether the form submission failed.
|
|
||||||
bool get isSubmissionFailure => this == FormStatus.submissionFailure;
|
|
||||||
|
|
||||||
/// Indicates whether the form submission has been canceled.
|
|
||||||
bool get isSubmissionCanceled => this == FormStatus.submissionCanceled;
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
|
||||||
// Please see the AUTHORS file for details.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input_status.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_status.dart';
|
|
||||||
|
|
||||||
/// Class which contains methods that help manipulate and manage
|
|
||||||
/// [FormStatus] and [FormInputStatus] instances.
|
|
||||||
class FormValidator {
|
|
||||||
/// Returns a [FormStatus] given a list of [FormInput].
|
|
||||||
static FormStatus validate(List<FormInput> inputs) {
|
|
||||||
return inputs.every((FormInput element) => element.pure)
|
|
||||||
? FormStatus.pure
|
|
||||||
: inputs.any((FormInput input) => input.valid == false)
|
|
||||||
? FormStatus.invalid
|
|
||||||
: FormStatus.valid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
|
||||||
// Please see the AUTHORS file for details.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/validation_error.dart';
|
|
||||||
|
|
||||||
/// {@template confirmed_password}
|
|
||||||
/// Form input for a confirmed password input.
|
|
||||||
/// {@endtemplate}
|
|
||||||
class ConfirmedPassword
|
|
||||||
extends FormInput<String, ValidationError> {
|
|
||||||
/// {@macro confirmed_password}
|
|
||||||
const ConfirmedPassword.pure({this.password = ''}) : super.pure('');
|
|
||||||
|
|
||||||
/// {@macro confirmed_password}
|
|
||||||
const ConfirmedPassword.dirty({required this.password, String value = ''})
|
|
||||||
: super.dirty(value);
|
|
||||||
|
|
||||||
/// The original password.
|
|
||||||
final String password;
|
|
||||||
|
|
||||||
@override
|
|
||||||
ValidationError? validator(String? value) {
|
|
||||||
return password == value ? null : ValidationError.invalid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
|
||||||
// Please see the AUTHORS file for details.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/validation_error.dart';
|
|
||||||
|
|
||||||
/// {@template email}
|
|
||||||
/// Form input for an email input.
|
|
||||||
/// {@endtemplate}
|
|
||||||
class Email extends FormInput<String, ValidationError> {
|
|
||||||
/// {@macro email}
|
|
||||||
const Email.pure() : super.pure('');
|
|
||||||
|
|
||||||
/// {@macro email}
|
|
||||||
const Email.dirty([String value = '']) : super.dirty(value);
|
|
||||||
|
|
||||||
static final RegExp _emailRegExp = RegExp(
|
|
||||||
r'^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$',
|
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
|
||||||
ValidationError? validator(String? value) {
|
|
||||||
return _emailRegExp.hasMatch(value ?? '')
|
|
||||||
? null
|
|
||||||
: ValidationError.invalid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -106,10 +106,12 @@ class SignInAnonymouslyFailureFirebase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SignInWithGoogleFailureFirebase extends SignInWithGoogleFailureInterface {
|
class SignInWithCredentialFailureFirebase
|
||||||
SignInWithGoogleFailureFirebase([String? code, String? message])
|
extends SignInWithCredentialFailureInterface {
|
||||||
|
SignInWithCredentialFailureFirebase([String? code, String? message])
|
||||||
: super(code ?? 'unknown', message ?? 'An unknown error occurred.');
|
: super(code ?? 'unknown', message ?? 'An unknown error occurred.');
|
||||||
SignInWithGoogleFailureFirebase.fromCode(String code) : super.fromCode(code) {
|
SignInWithCredentialFailureFirebase.fromCode(String code)
|
||||||
|
: super.fromCode(code) {
|
||||||
switch (code) {
|
switch (code) {
|
||||||
case 'account-exists-with-different-credential':
|
case 'account-exists-with-different-credential':
|
||||||
message = 'Account exists with different credentials.';
|
message = 'Account exists with different credentials.';
|
||||||
@@ -143,6 +145,38 @@ class SignInWithGoogleFailureFirebase extends SignInWithGoogleFailureInterface {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class SignInWithGoogleFailureFirebase
|
||||||
|
extends SignInWithCredentialFailureFirebase
|
||||||
|
implements SignInWithGoogleFailureInterface {
|
||||||
|
SignInWithGoogleFailureFirebase([String? code, String? message])
|
||||||
|
: super(code, message);
|
||||||
|
SignInWithGoogleFailureFirebase.fromCode(String code) : super.fromCode(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
class SignInWithFacebookFailureFirebase
|
||||||
|
extends SignInWithCredentialFailureFirebase
|
||||||
|
implements SignInWithFacebookFailureInterface {
|
||||||
|
SignInWithFacebookFailureFirebase([String? code, String? message])
|
||||||
|
: super(code, message);
|
||||||
|
SignInWithFacebookFailureFirebase.fromCode(String code)
|
||||||
|
: super.fromCode(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
class SignInWithAppleFailureFirebase extends SignInWithCredentialFailureFirebase
|
||||||
|
implements SignInWithAppleFailureInterface {
|
||||||
|
SignInWithAppleFailureFirebase([String? code, String? message])
|
||||||
|
: super(code, message);
|
||||||
|
SignInWithAppleFailureFirebase.fromCode(String code) : super.fromCode(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
class SignInWithTwitterFailureFirebase extends SignInWithCredentialFailureFirebase
|
||||||
|
implements SignInWithAppleFailureInterface {
|
||||||
|
SignInWithTwitterFailureFirebase([String? code, String? message])
|
||||||
|
: super(code, message);
|
||||||
|
SignInWithTwitterFailureFirebase.fromCode(String code) : super.fromCode(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class SignInWithEmailLinkFailureFirebase
|
class SignInWithEmailLinkFailureFirebase
|
||||||
extends SignInWithEmailLinkFailureInterface {
|
extends SignInWithEmailLinkFailureInterface {
|
||||||
SignInWithEmailLinkFailureFirebase([String? code, String? message])
|
SignInWithEmailLinkFailureFirebase([String? code, String? message])
|
||||||
|
|||||||
@@ -64,6 +64,20 @@ abstract class FetchSignInMethodsForEmailFailureInterface
|
|||||||
: super.fromCode(code);
|
: super.fromCode(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// {@template sign_in_with_credential_failure}
|
||||||
|
/// Thrown during the sign in process if a failure occurs.
|
||||||
|
/// {@endtemplate}
|
||||||
|
abstract class SignInWithCredentialFailureInterface
|
||||||
|
extends AuthenticationFailureInterface {
|
||||||
|
/// {@macro sign_in_with_credential_failure}
|
||||||
|
SignInWithCredentialFailureInterface(String code, String message)
|
||||||
|
: super(code, message);
|
||||||
|
|
||||||
|
/// {@macro sign_in_with_credential_failure}
|
||||||
|
SignInWithCredentialFailureInterface.fromCode(String code)
|
||||||
|
: super.fromCode(code);
|
||||||
|
}
|
||||||
|
|
||||||
/// {@template sign_in_anonymously_failure}
|
/// {@template sign_in_anonymously_failure}
|
||||||
/// Thrown during the sign in process if a failure occurs.
|
/// Thrown during the sign in process if a failure occurs.
|
||||||
/// {@endtemplate}
|
/// {@endtemplate}
|
||||||
@@ -91,6 +105,47 @@ abstract class SignInWithGoogleFailureInterface
|
|||||||
SignInWithGoogleFailureInterface.fromCode(String code) : super.fromCode(code);
|
SignInWithGoogleFailureInterface.fromCode(String code) : super.fromCode(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// {@template sign_in_with_facebook_failure}
|
||||||
|
/// Thrown during the sign in process if a failure occurs.
|
||||||
|
/// {@endtemplate}
|
||||||
|
abstract class SignInWithFacebookFailureInterface
|
||||||
|
extends AuthenticationFailureInterface {
|
||||||
|
/// {@macro sign_in_with_facebook_failure}
|
||||||
|
SignInWithFacebookFailureInterface(String code, String message)
|
||||||
|
: super(code, message);
|
||||||
|
|
||||||
|
/// {@macro sign_in_with_facebook_failure}
|
||||||
|
SignInWithFacebookFailureInterface.fromCode(String code)
|
||||||
|
: super.fromCode(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@template sign_in_with_apple_failure}
|
||||||
|
/// Thrown during the sign in process if a failure occurs.
|
||||||
|
/// {@endtemplate}
|
||||||
|
abstract class SignInWithAppleFailureInterface
|
||||||
|
extends AuthenticationFailureInterface {
|
||||||
|
/// {@macro sign_in_with_apple_failure}
|
||||||
|
SignInWithAppleFailureInterface(String code, String message)
|
||||||
|
: super(code, message);
|
||||||
|
|
||||||
|
/// {@macro sign_in_with_apple_failure}
|
||||||
|
SignInWithAppleFailureInterface.fromCode(String code) : super.fromCode(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// {@template sign_in_with_twitter_failure}
|
||||||
|
/// Thrown during the sign in process if a failure occurs.
|
||||||
|
/// {@endtemplate}
|
||||||
|
abstract class SignInWithTwitterFailureInterface
|
||||||
|
extends AuthenticationFailureInterface {
|
||||||
|
/// {@macro sign_in_with_twitter_failure}
|
||||||
|
SignInWithTwitterFailureInterface(String code, String message)
|
||||||
|
: super(code, message);
|
||||||
|
|
||||||
|
/// {@macro sign_in_with_twitter_failure}
|
||||||
|
SignInWithTwitterFailureInterface.fromCode(String code)
|
||||||
|
: super.fromCode(code);
|
||||||
|
}
|
||||||
|
|
||||||
/// {@template sign_in_with_email_link_failure}
|
/// {@template sign_in_with_email_link_failure}
|
||||||
/// Thrown during the sign in process if a failure occurs.
|
/// Thrown during the sign in process if a failure occurs.
|
||||||
/// {@endtemplate}
|
/// {@endtemplate}
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
|
||||||
// Please see the AUTHORS file for details.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/validation_error.dart';
|
|
||||||
|
|
||||||
/// {@template iban}
|
|
||||||
/// Form input for an IBAN input.
|
|
||||||
/// {@endtemplate}
|
|
||||||
class Iban extends FormInput<String, ValidationError> {
|
|
||||||
/// {@macro iban}
|
|
||||||
const Iban.pure() : super.pure('');
|
|
||||||
|
|
||||||
/// {@macro iban}
|
|
||||||
const Iban.dirty([String value = '']) : super.dirty(value);
|
|
||||||
|
|
||||||
static final RegExp _regExp = RegExp(
|
|
||||||
r'^(?:((?:IT|SM)\d{2}[A-Z]{1}\d{22})|(NL\d{2}[A-Z]{4}\d{10})|(LV\d{2}[A-Z]{4}\d{13})|((?:BG|GB|IE)\d{2}[A-Z]{4}\d{14})|(GI\d{2}[A-Z]{4}\d{15})|(RO\d{2}[A-Z]{4}\d{16})|(MT\d{2}[A-Z]{4}\d{23})|(NO\d{13})|((?:DK|FI)\d{16})|((?:SI)\d{17})|((?:AT|EE|LU|LT)\d{18})|((?:HR|LI|CH)\d{19})|((?:DE|VA)\d{20})|((?:AD|CZ|ES|MD|SK|SE)\d{22})|(PT\d{23})|((?:IS)\d{24})|((?:BE)\d{14})|((?:FR|MC|GR)\d{25})|((?:PL|HU|CY)\d{26}))$',
|
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
|
||||||
ValidationError? validator(String? value) {
|
|
||||||
return _regExp.hasMatch(value ?? '') ? null : ValidationError.invalid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -14,16 +14,5 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
export 'boolean.dart';
|
|
||||||
export 'confirmed_password.dart';
|
|
||||||
export 'email.dart';
|
|
||||||
export 'exceptions/exceptions.dart';
|
export 'exceptions/exceptions.dart';
|
||||||
export 'iban.dart';
|
|
||||||
export 'name.dart';
|
|
||||||
export 'operations.dart';
|
|
||||||
export 'password.dart';
|
|
||||||
export 'phone.dart';
|
|
||||||
export 'siren.dart';
|
|
||||||
export 'text_string.dart';
|
|
||||||
export 'user/user.dart';
|
export 'user/user.dart';
|
||||||
export 'validation_error.dart';
|
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
// Copyright (C) 2022 WYATT GROUP
|
|
||||||
// Please see the AUTHORS file for details.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/validation_error.dart';
|
|
||||||
|
|
||||||
/// {@template phone}
|
|
||||||
/// Form input for a phone input.
|
|
||||||
/// {@endtemplate}
|
|
||||||
class Phone extends FormInput<String, ValidationError> {
|
|
||||||
/// {@macro phone}
|
|
||||||
const Phone.pure() : super.pure('');
|
|
||||||
|
|
||||||
/// {@macro phone}
|
|
||||||
const Phone.dirty([String value = '']) : super.dirty(value);
|
|
||||||
|
|
||||||
static final RegExp _phoneRegExp =
|
|
||||||
RegExp(r'^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$');
|
|
||||||
|
|
||||||
@override
|
|
||||||
ValidationError? validator(String? value) {
|
|
||||||
return _phoneRegExp.hasMatch(value ?? '') ? null : ValidationError.invalid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -64,6 +64,9 @@ class UserFirebase implements UserInterface {
|
|||||||
@override
|
@override
|
||||||
String get uid => _user?.uid ?? '';
|
String get uid => _user?.uid ?? '';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? get providerId => _user?.providerData.first.providerId;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool? get isNewUser {
|
bool? get isNewUser {
|
||||||
if (_user?.metadata.lastSignInTime == null ||
|
if (_user?.metadata.lastSignInTime == null ||
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ abstract class UserInterface {
|
|||||||
/// The user's unique ID.
|
/// The user's unique ID.
|
||||||
String get uid;
|
String get uid;
|
||||||
|
|
||||||
|
/// The provider ID for the user.
|
||||||
|
String? get providerId;
|
||||||
|
|
||||||
/// Whether the user account has been recently created.
|
/// Whether the user account has been recently created.
|
||||||
bool? get isNewUser;
|
bool? get isNewUser;
|
||||||
|
|
||||||
|
|||||||
@@ -16,11 +16,9 @@
|
|||||||
|
|
||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_status.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_validator.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/email.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/exceptions/exceptions_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/models/exceptions/exceptions_interface.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/repositories/authentication_repository_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/repositories/authentication_repository_interface.dart';
|
||||||
|
import 'package:wyatt_form_bloc/wyatt_form_bloc.dart';
|
||||||
|
|
||||||
part 'password_reset_state.dart';
|
part 'password_reset_state.dart';
|
||||||
|
|
||||||
@@ -35,7 +33,7 @@ class PasswordResetCubit extends Cubit<PasswordResetState> {
|
|||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
email: email,
|
email: email,
|
||||||
status: FormValidator.validate([email]),
|
status: FormData.validate([email]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,19 +15,28 @@
|
|||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:firebase_auth/firebase_auth.dart';
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
|
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
|
||||||
|
import 'package:google_sign_in/google_sign_in.dart';
|
||||||
|
import 'package:sign_in_with_apple/sign_in_with_apple.dart';
|
||||||
|
import 'package:twitter_login/twitter_login.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/models/exceptions/exceptions_firebase.dart';
|
import 'package:wyatt_authentication_bloc/src/models/exceptions/exceptions_firebase.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/models/user/user_firebase.dart';
|
import 'package:wyatt_authentication_bloc/src/models/user/user_firebase.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/models/user/user_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/models/user/user_interface.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/repositories/authentication_repository_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/repositories/authentication_repository_interface.dart';
|
||||||
|
import 'package:wyatt_authentication_bloc/src/utils/cryptography.dart';
|
||||||
|
|
||||||
class AuthenticationRepositoryFirebase
|
class AuthenticationRepositoryFirebase
|
||||||
implements AuthenticationRepositoryInterface {
|
implements AuthenticationRepositoryInterface {
|
||||||
final FirebaseAuth _firebaseAuth;
|
final FirebaseAuth _firebaseAuth;
|
||||||
|
final TwitterLogin? _twitterLogin;
|
||||||
|
|
||||||
UserFirebase _userCache = const UserFirebase.empty();
|
UserFirebase _userCache = const UserFirebase.empty();
|
||||||
|
|
||||||
AuthenticationRepositoryFirebase({FirebaseAuth? firebaseAuth})
|
AuthenticationRepositoryFirebase({
|
||||||
: _firebaseAuth = firebaseAuth ?? FirebaseAuth.instance;
|
FirebaseAuth? firebaseAuth,
|
||||||
|
TwitterLogin? twitterLogin,
|
||||||
|
}) : _firebaseAuth = firebaseAuth ?? FirebaseAuth.instance,
|
||||||
|
_twitterLogin = twitterLogin;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Stream<UserInterface> get user {
|
Stream<UserInterface> get user {
|
||||||
@@ -99,9 +108,106 @@ class AuthenticationRepositoryFirebase
|
|||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> signInWithGoogle() {
|
Future<void> signInWithGoogle() async {
|
||||||
// TODO(hpcl): implement signInWithGoogle
|
// Trigger the authentication flow
|
||||||
throw UnimplementedError();
|
final GoogleSignInAccount? googleUser = await GoogleSignIn().signIn();
|
||||||
|
|
||||||
|
// Obtain the auth details from the request
|
||||||
|
final GoogleSignInAuthentication? googleAuth =
|
||||||
|
await googleUser?.authentication;
|
||||||
|
|
||||||
|
// Create a new credential
|
||||||
|
final credential = GoogleAuthProvider.credential(
|
||||||
|
accessToken: googleAuth?.accessToken,
|
||||||
|
idToken: googleAuth?.idToken,
|
||||||
|
);
|
||||||
|
|
||||||
|
try {
|
||||||
|
await _firebaseAuth.signInWithCredential(credential);
|
||||||
|
} on FirebaseAuthException catch (e) {
|
||||||
|
throw SignInWithGoogleFailureFirebase.fromCode(e.code);
|
||||||
|
} catch (_) {
|
||||||
|
throw SignInWithGoogleFailureFirebase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> signInWithFacebook() async {
|
||||||
|
// Trigger the sign-in flow
|
||||||
|
final LoginResult loginResult = await FacebookAuth.instance.login();
|
||||||
|
|
||||||
|
// Create a credential from the access token
|
||||||
|
final OAuthCredential credential =
|
||||||
|
FacebookAuthProvider.credential(loginResult.accessToken?.token ?? '');
|
||||||
|
|
||||||
|
try {
|
||||||
|
await _firebaseAuth.signInWithCredential(credential);
|
||||||
|
} on FirebaseAuthException catch (e) {
|
||||||
|
throw SignInWithFacebookFailureFirebase.fromCode(e.code);
|
||||||
|
} catch (_) {
|
||||||
|
throw SignInWithFacebookFailureFirebase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> signInWithApple() async {
|
||||||
|
// To prevent replay attacks with the credential returned from Apple, we
|
||||||
|
// include a nonce in the credential request. When signing in with
|
||||||
|
// Firebase, the nonce in the id token returned by Apple, is expected to
|
||||||
|
// match the sha256 hash of `rawNonce`.
|
||||||
|
final rawNonce = Cryptography.generateNonce();
|
||||||
|
final nonce = Cryptography.sha256ofString(rawNonce);
|
||||||
|
|
||||||
|
// Request credential for the currently signed in Apple account.
|
||||||
|
final appleCredential = await SignInWithApple.getAppleIDCredential(
|
||||||
|
scopes: [
|
||||||
|
AppleIDAuthorizationScopes.email,
|
||||||
|
AppleIDAuthorizationScopes.fullName,
|
||||||
|
],
|
||||||
|
nonce: nonce,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Create an `OAuthCredential` from the credential returned by Apple.
|
||||||
|
final credential = OAuthProvider('apple.com').credential(
|
||||||
|
idToken: appleCredential.identityToken,
|
||||||
|
rawNonce: rawNonce,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Sign in the user with Firebase. If the nonce we generated earlier does
|
||||||
|
// not match the nonce in `appleCredential.identityToken`,
|
||||||
|
// sign in will fail.
|
||||||
|
try {
|
||||||
|
await _firebaseAuth.signInWithCredential(credential);
|
||||||
|
} on FirebaseAuthException catch (e) {
|
||||||
|
throw SignInWithAppleFailureFirebase.fromCode(e.code);
|
||||||
|
} catch (_) {
|
||||||
|
throw SignInWithAppleFailureFirebase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> signInWithTwitter() async {
|
||||||
|
final twitterLogin = _twitterLogin;
|
||||||
|
if (twitterLogin == null) {
|
||||||
|
throw SignInWithTwitterFailureFirebase();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Trigger the sign-in flow
|
||||||
|
final authResult = await twitterLogin.login();
|
||||||
|
|
||||||
|
// Create a credential from the access token
|
||||||
|
final credential = TwitterAuthProvider.credential(
|
||||||
|
accessToken: authResult.authToken!,
|
||||||
|
secret: authResult.authTokenSecret!,
|
||||||
|
);
|
||||||
|
|
||||||
|
try {
|
||||||
|
await _firebaseAuth.signInWithCredential(credential);
|
||||||
|
} on FirebaseAuthException catch (e) {
|
||||||
|
throw SignInWithCredentialFailureFirebase.fromCode(e.code);
|
||||||
|
} catch (_) {
|
||||||
|
throw SignInWithCredentialFailureFirebase();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -61,6 +61,21 @@ abstract class AuthenticationRepositoryInterface {
|
|||||||
/// Throws a [SignInWithGoogleFailureInterface] if an exception occurs.
|
/// Throws a [SignInWithGoogleFailureInterface] if an exception occurs.
|
||||||
Future<void> signInWithGoogle();
|
Future<void> signInWithGoogle();
|
||||||
|
|
||||||
|
/// Starts the Sign In with Facebook Flow.
|
||||||
|
///
|
||||||
|
/// Throws a [SignInWithFacebookFailureInterface] if an exception occurs.
|
||||||
|
Future<void> signInWithFacebook();
|
||||||
|
|
||||||
|
/// Starts the Sign In with Apple Flow.
|
||||||
|
///
|
||||||
|
/// Throws a [SignInWithAppleFailureInterface] if an exception occurs.
|
||||||
|
Future<void> signInWithApple();
|
||||||
|
|
||||||
|
/// Starts the Sign In with Twitter Flow.
|
||||||
|
///
|
||||||
|
/// Throws a [SignInWithTwitterFailureInterface] if an exception occurs.
|
||||||
|
Future<void> signInWithTwitter();
|
||||||
|
|
||||||
/// Signs in using an email address and email sign-in link.
|
/// Signs in using an email address and email sign-in link.
|
||||||
///
|
///
|
||||||
/// Throws a [SignInWithEmailLinkFailureInterface] if an exception occurs.
|
/// Throws a [SignInWithEmailLinkFailureInterface] if an exception occurs.
|
||||||
|
|||||||
@@ -17,12 +17,9 @@
|
|||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
import 'package:equatable/equatable.dart';
|
import 'package:equatable/equatable.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/authentication/cubit/authentication_cubit.dart';
|
import 'package:wyatt_authentication_bloc/src/authentication/cubit/authentication_cubit.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_status.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_validator.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/email.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/exceptions/exceptions_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/models/exceptions/exceptions_interface.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/models/password.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/repositories/authentication_repository_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/repositories/authentication_repository_interface.dart';
|
||||||
|
import 'package:wyatt_form_bloc/wyatt_form_bloc.dart';
|
||||||
|
|
||||||
part 'sign_in_state.dart';
|
part 'sign_in_state.dart';
|
||||||
|
|
||||||
@@ -42,7 +39,7 @@ class SignInCubit extends Cubit<SignInState> {
|
|||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
email: email,
|
email: email,
|
||||||
status: FormValidator.validate([email, state.password]),
|
status: FormData.validate([email, state.password]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -52,13 +49,12 @@ class SignInCubit extends Cubit<SignInState> {
|
|||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
password: password,
|
password: password,
|
||||||
status: FormValidator.validate([state.email, password]),
|
status: FormData.validate([state.email, password]),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> signInAnonymously() async {
|
Future<void> signInAnonymously() async {
|
||||||
// TODO(hpcl): Maybe check this in UI.
|
|
||||||
if (state.status.isSubmissionInProgress) {
|
if (state.status.isSubmissionInProgress) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -80,6 +76,28 @@ class SignInCubit extends Cubit<SignInState> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> signInWithGoogle() async {
|
||||||
|
if (state.status.isSubmissionInProgress) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
emit(state.copyWith(status: FormStatus.submissionInProgress));
|
||||||
|
try {
|
||||||
|
await _authenticationRepository.signInWithGoogle();
|
||||||
|
_authenticationCubit.start();
|
||||||
|
emit(state.copyWith(status: FormStatus.submissionSuccess));
|
||||||
|
} on SignInWithGoogleFailureInterface catch (e) {
|
||||||
|
emit(
|
||||||
|
state.copyWith(
|
||||||
|
errorMessage: e.message,
|
||||||
|
status: FormStatus.submissionFailure,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} catch (_) {
|
||||||
|
emit(state.copyWith(status: FormStatus.submissionFailure));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> signInWithEmailAndPassword() async {
|
Future<void> signInWithEmailAndPassword() async {
|
||||||
if (!state.status.isValidated) return;
|
if (!state.status.isValidated) return;
|
||||||
emit(state.copyWith(status: FormStatus.submissionInProgress));
|
emit(state.copyWith(status: FormStatus.submissionInProgress));
|
||||||
|
|||||||
@@ -45,4 +45,14 @@ class SignInState extends Equatable {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
List<Object> get props => [email, password, status];
|
List<Object> get props => [email, password, status];
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return '''
|
||||||
|
email: $email,
|
||||||
|
password: $password,
|
||||||
|
status: $status,
|
||||||
|
errorMessage: $errorMessage,
|
||||||
|
''';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,16 +19,9 @@ import 'dart:async';
|
|||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/authentication/cubit/authentication_cubit.dart';
|
import 'package:wyatt_authentication_bloc/src/authentication/cubit/authentication_cubit.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_data.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_status.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_validator.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/email.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/exceptions/exceptions_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/models/exceptions/exceptions_interface.dart';
|
||||||
import 'package:wyatt_authentication_bloc/src/models/operations.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/password.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/models/validation_error.dart';
|
|
||||||
import 'package:wyatt_authentication_bloc/src/repositories/authentication_repository_interface.dart';
|
import 'package:wyatt_authentication_bloc/src/repositories/authentication_repository_interface.dart';
|
||||||
|
import 'package:wyatt_form_bloc/wyatt_form_bloc.dart';
|
||||||
|
|
||||||
part 'sign_up_state.dart';
|
part 'sign_up_state.dart';
|
||||||
|
|
||||||
@@ -60,7 +53,7 @@ class SignUpCubit extends Cubit<SignUpState> {
|
|||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
email: email,
|
email: email,
|
||||||
status: FormValidator.validate(inputsToValidate),
|
status: FormData.validate(inputsToValidate),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -77,11 +70,12 @@ class SignUpCubit extends Cubit<SignUpState> {
|
|||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
password: password,
|
password: password,
|
||||||
status: FormValidator.validate(inputsToValidate),
|
status: FormData.validate(inputsToValidate),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Take from wyatt_form_bloc/wyatt_form_bloc.dart
|
||||||
void dataChanged<T>(String field, FormInput dirtyValue) {
|
void dataChanged<T>(String field, FormInput dirtyValue) {
|
||||||
final _form = state.data.clone();
|
final _form = state.data.clone();
|
||||||
|
|
||||||
@@ -94,13 +88,14 @@ class SignUpCubit extends Cubit<SignUpState> {
|
|||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
data: _form,
|
data: _form,
|
||||||
status: FormValidator.validate(
|
status: FormData.validate(
|
||||||
[state.email, state.password, ..._form.inputs<dynamic>()],
|
[state.email, state.password, ..._form.inputs<dynamic>()],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Take from wyatt_form_bloc/wyatt_form_bloc.dart
|
||||||
void updateFormData(
|
void updateFormData(
|
||||||
FormData data, {
|
FormData data, {
|
||||||
SetOperation operation = SetOperation.replace,
|
SetOperation operation = SetOperation.replace,
|
||||||
@@ -125,7 +120,7 @@ class SignUpCubit extends Cubit<SignUpState> {
|
|||||||
emit(
|
emit(
|
||||||
state.copyWith(
|
state.copyWith(
|
||||||
data: _form,
|
data: _form,
|
||||||
status: FormValidator.validate(
|
status: FormData.validate(
|
||||||
[state.email, state.password, ..._form.inputs<dynamic>()],
|
[state.email, state.password, ..._form.inputs<dynamic>()],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
export 'authentication/authentication.dart';
|
export 'authentication/authentication.dart';
|
||||||
export 'email_verification/email_verification.dart';
|
export 'email_verification/email_verification.dart';
|
||||||
export 'form/form.dart';
|
|
||||||
export 'models/models.dart';
|
export 'models/models.dart';
|
||||||
export 'password_reset/password_reset.dart';
|
export 'password_reset/password_reset.dart';
|
||||||
export 'repositories/repositories.dart';
|
export 'repositories/repositories.dart';
|
||||||
|
|||||||
@@ -14,26 +14,26 @@
|
|||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import 'package:wyatt_authentication_bloc/src/form/form_input.dart';
|
import 'dart:convert';
|
||||||
import 'package:wyatt_authentication_bloc/src/models/validation_error.dart';
|
import 'dart:math';
|
||||||
|
|
||||||
/// {@template password}
|
import 'package:crypto/crypto.dart';
|
||||||
/// Form input for a password input.
|
|
||||||
/// {@endtemplate}
|
|
||||||
class Password extends FormInput<String, ValidationError> {
|
|
||||||
/// {@macro password}
|
|
||||||
const Password.pure() : super.pure('');
|
|
||||||
|
|
||||||
/// {@macro password}
|
class Cryptography {
|
||||||
const Password.dirty([String value = '']) : super.dirty(value);
|
/// Generates a cryptographically secure random nonce, to be included in a
|
||||||
|
/// credential request.
|
||||||
|
static String generateNonce([int length = 32]) {
|
||||||
|
const charset =
|
||||||
|
'0123456789ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz-._';
|
||||||
|
final random = Random.secure();
|
||||||
|
return List.generate(length, (_) => charset[random.nextInt(charset.length)])
|
||||||
|
.join();
|
||||||
|
}
|
||||||
|
|
||||||
static final RegExp _passwordRegExp =
|
/// Returns the sha256 hash of [input] in hex notation.
|
||||||
RegExp(r'^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$');
|
static String sha256ofString(String input) {
|
||||||
|
final bytes = utf8.encode(input);
|
||||||
@override
|
final digest = sha256.convert(bytes);
|
||||||
ValidationError? validator(String? value) {
|
return digest.toString();
|
||||||
return _passwordRegExp.hasMatch(value ?? '')
|
|
||||||
? null
|
|
||||||
: ValidationError.invalid;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||