-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f7ddc6
commit b43fdd0
Showing
42 changed files
with
219 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,36 @@ | ||
# Integrate Ory Network with Flutter | ||
|
||
This example demonstrates how to use Ory Network with a Flutter app. It includes login and registration with email and password. | ||
This example demonstrates how to use Ory Network with a Flutter app. It includes | ||
login and registration with email and password. | ||
|
||
## Develop | ||
|
||
### Prerequisites | ||
|
||
1. [Flutter](https://docs.flutter.dev/get-started/install) version 3.13.1 | ||
2. Xcode and Android Studio | ||
3. iOS Simulator or Android Emulator | ||
4. [Ory Network](https://console.ory.sh/) project | ||
4. [Ory Network](https://console.ory.sh/) project | ||
|
||
### Environmental variables | ||
|
||
Create .env file with your project url in the root folder of the Flutter app | ||
|
||
```env | ||
ORY_BASE_URL=https://{your-project-slug}.projects.oryapis.com | ||
``` | ||
|
||
### Run locally | ||
|
||
1. Install dependancies from `pubspec.yaml` | ||
|
||
```console | ||
flutter pub get | ||
``` | ||
|
||
2. open iOS Simulator or Android Emulator | ||
3. Start the app | ||
|
||
```console | ||
flutter run | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
160 changes: 80 additions & 80 deletions
160
flutter-ory-network/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,122 +1,122 @@ | ||
{ | ||
"images" : [ | ||
"images": [ | ||
{ | ||
"size" : "20x20", | ||
"idiom" : "iphone", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
"size": "20x20", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size" : "20x20", | ||
"idiom" : "iphone", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
"size": "20x20", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size" : "29x29", | ||
"idiom" : "iphone", | ||
"filename" : "[email protected]", | ||
"scale" : "1x" | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size" : "29x29", | ||
"idiom" : "iphone", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size" : "29x29", | ||
"idiom" : "iphone", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size" : "40x40", | ||
"idiom" : "iphone", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
"size": "40x40", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size" : "40x40", | ||
"idiom" : "iphone", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
"size": "40x40", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size" : "60x60", | ||
"idiom" : "iphone", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
"size": "60x60", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size" : "60x60", | ||
"idiom" : "iphone", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
"size": "60x60", | ||
"idiom": "iphone", | ||
"filename": "[email protected]", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size" : "20x20", | ||
"idiom" : "ipad", | ||
"filename" : "[email protected]", | ||
"scale" : "1x" | ||
"size": "20x20", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size" : "20x20", | ||
"idiom" : "ipad", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
"size": "20x20", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size" : "29x29", | ||
"idiom" : "ipad", | ||
"filename" : "[email protected]", | ||
"scale" : "1x" | ||
"size": "29x29", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size" : "29x29", | ||
"idiom" : "ipad", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
"size": "29x29", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size" : "40x40", | ||
"idiom" : "ipad", | ||
"filename" : "[email protected]", | ||
"scale" : "1x" | ||
"size": "40x40", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size" : "40x40", | ||
"idiom" : "ipad", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
"size": "40x40", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size" : "76x76", | ||
"idiom" : "ipad", | ||
"filename" : "[email protected]", | ||
"scale" : "1x" | ||
"size": "76x76", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size" : "76x76", | ||
"idiom" : "ipad", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
"size": "76x76", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size" : "83.5x83.5", | ||
"idiom" : "ipad", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
"size": "83.5x83.5", | ||
"idiom": "ipad", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size" : "1024x1024", | ||
"idiom" : "ios-marketing", | ||
"filename" : "[email protected]", | ||
"scale" : "1x" | ||
"size": "1024x1024", | ||
"idiom": "ios-marketing", | ||
"filename": "[email protected]", | ||
"scale": "1x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
"info": { | ||
"version": 1, | ||
"author": "xcode" | ||
} | ||
} |
26 changes: 13 additions & 13 deletions
26
flutter-ory-network/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
{ | ||
"images" : [ | ||
"images": [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "LaunchImage.png", | ||
"scale" : "1x" | ||
"idiom": "universal", | ||
"filename": "LaunchImage.png", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "[email protected]", | ||
"scale" : "2x" | ||
"idiom": "universal", | ||
"filename": "[email protected]", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "[email protected]", | ||
"scale" : "3x" | ||
"idiom": "universal", | ||
"filename": "[email protected]", | ||
"scale": "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
"info": { | ||
"version": 1, | ||
"author": "xcode" | ||
} | ||
} |
7 changes: 5 additions & 2 deletions
7
flutter-ory-network/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
# Launch Screen Assets | ||
|
||
You can customize the launch screen with your own desired assets by replacing the image files in this directory. | ||
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. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright © 2023 Ory Corp | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
part of 'auth_bloc.dart'; | ||
|
||
@immutable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright © 2023 Ory Corp | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
part of 'auth_bloc.dart'; | ||
|
||
@freezed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright © 2023 Ory Corp | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
part of 'login_bloc.dart'; | ||
|
||
@immutable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright © 2023 Ory Corp | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
part of 'login_bloc.dart'; | ||
|
||
@freezed | ||
|
3 changes: 3 additions & 0 deletions
3
flutter-ory-network/lib/blocs/registration/registration_bloc.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
flutter-ory-network/lib/blocs/registration/registration_bloc.freezed.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
flutter-ory-network/lib/blocs/registration/registration_event.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
flutter-ory-network/lib/blocs/registration/registration_state.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
// Copyright © 2023 Ory Corp | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
part of 'registration_bloc.dart'; | ||
|
||
@freezed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.