Skip to content

Flutter v2 gen2 comment fixes #7598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
51ec5b5
chore: remove callout that should be in migration guide
khatruong2009 May 15, 2024
5d0f0f9
chore: remove unnecessary code snippet that originates from vCurrent
khatruong2009 May 15, 2024
d9fe525
chore: fix incorrect references to vCurrent fragments inside vPrev pages
khatruong2009 May 15, 2024
f0f6eaf
chore: remove unnecessary line for flutter custom challenge in both p…
khatruong2009 May 15, 2024
68a814f
chore: make function public in prev and current
khatruong2009 May 15, 2024
e36ae80
chore: remove "suppports-only-mobile"
khatruong2009 May 15, 2024
207b9e5
chore: remove unnecessary inline filters and put back an upload fragment
khatruong2009 May 15, 2024
62fea43
chore: remove unnecessary inline filter from graphql link
khatruong2009 May 15, 2024
113084d
chore: remove unintentionally added line
khatruong2009 May 15, 2024
e488279
chore: move flutter back to the top of the platforms list
khatruong2009 May 15, 2024
185486c
chore: delete before you begin snippet for grapql vprev
khatruong2009 May 15, 2024
9c4daf5
chore: add picture back in to vprev flutter storage page
khatruong2009 May 15, 2024
1339de9
chore: revert flutter import changes back to original
khatruong2009 May 15, 2024
caead54
chore: clean up preReq snippets
khatruong2009 May 15, 2024
afe203c
chore: add title="Terminal" showLineNumbers={false} to terminal snippets
khatruong2009 May 16, 2024
74f8138
chore: revert changes that are out of scope
khatruong2009 May 16, 2024
c4fabd0
chore: revert removal of inline filter and addition of white space
khatruong2009 May 16, 2024
fc68440
chore: revert changes that removed before you begin snippet
khatruong2009 May 16, 2024
bc863f4
chore: revert change to wording
khatruong2009 May 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
The following are required, depending on which platforms you are targeting:
* [Install and configure Amplify CLI](/gen1/[platform]/tools/cli/start/set-up-cli/)

- An iOS configuration targeting at least iOS 13.0 and XCode version >=13.2
- An Android configuration targeting at least Android API level 24 (Android 7.0) or above
- Any browser supported by Flutter for Web (you can check the list of supported browsers [here](https://docs.flutter.dev/development/platform-integration/web/faq#which-web-browsers-are-supported-by-flutter))
- Any Windows OS meeting Flutter minimums
- macOS version 10.15 or higher
- Any Ubuntu Linux distribution meeting Flutter minimums
- For a full example please follow the [project setup walkthrough](/gen1/[platform]/prev/start/project-setup/create-application/)
Amplify Flutter requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/gen1/[platform]/prev/start/project-setup/platform-setup/) guide for more details on platform specific setup.
13 changes: 0 additions & 13 deletions src/fragments/lib-v1/analytics/flutter/identifyuser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ You can get the current user's ID from the Amplify Auth category as shown per th

If you have asked for location access and received permission, you can also provide that in `UserProfileLocation`

<Callout>

Breaking changes from v0 to v1:

The Analytics- prefix of the original `AnalyticsUserProfile` and `AnalyticsUserProfileLocation` classes is removed. Furthermore, `AnalyticsProperties` is renamed to `CustomProperties`.


</Callout>

```dart
Future<void> addAnalyticsWithLocation({
required String userId,
Expand Down Expand Up @@ -43,7 +34,3 @@ Future<void> addAnalyticsWithLocation({
);
}
```

import flutter0 from "/src/fragments/lib/analytics/native_common/identify-use-cases.mdx";

<Fragments fragments={{flutter: flutter0}} />
2 changes: 1 addition & 1 deletion src/fragments/lib-v1/auth/common/sms/flows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ If MFA is **ON** or enabled for the user, you must call `confirmSignIn` with the

import flutter9 from "/src/fragments/lib-v1/auth/flutter/sms/confirm_sign_in.mdx";

<Fragments fragments={{flutter: flutter9}} />
<Fragments fragments={{flutter: flutter9}} />
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<BlockSwitcher>
<Block name="Amplify CLI (Create)">

> Prerequisites: [Install and configure](/[platform]/start/project-setup/prerequisites/#install-and-configure-the-amplify-cli) the Amplify CLI in addition to the Amplify libraries and [necessary dependencies](/[platform]/build-a-backend/auth/set-up-auth/#install-amplify-libraries).
> Prerequisites: [Install and configure](/gen1/[platform]/prev/start/project-setup/prerequisites/#install-and-configure-the-amplify-cli) the Amplify CLI in addition to the Amplify libraries and [necessary dependencies](/gen1/[platform]/prev/build-a-backend/auth/set-up-auth/#install-amplify-libraries).

To start provisioning auth resources in the backend, go to your project directory and **execute the command**:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ Once the user provides the correct response, they should be authenticated in you
<b>Special Handling on ConfirmSignIn</b>

During a `confirmSignIn` call, if `failAuthentication: true` is returned by the Lambda, the session of the request gets invalidated by Cognito, and a `NotAuthorizedException` is thrown. To recover, the user must initiate a new sign in by calling `Amplify.Auth.signIn`.

Exception: `NotAuthorizedException` with a message `Invalid session for the user.`
</Callout>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Amplify Flutter supports [standard OIDC user attributes](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) as well as custom attributes. Custom attributes can be instantiated via the custom attribute constructor:

```dart
Future<void> _signUp({
Future<void> signUp({
required String username,
required String password,
required String email,
Expand All @@ -23,4 +23,4 @@ Future<void> _signUp({
}
```

When working with a Cognito UserPool, you can set up [custom attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-custom-attributes) via the Cognito console or AWS CLI. Although Cognito prepends a "custom:" prefix on the attribute name, there is no need for you to add this in Amplify Flutter's custom attribute constructor.
When working with a Cognito UserPool, you can set up [custom attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-custom-attributes) via the Cognito console or AWS CLI. Although Cognito prepends a "custom:" prefix on the attribute name, there is no need for you to add this in Amplify Flutter's custom attribute constructor.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
flutter:
sdk: flutter

amplify_datastore: ^1.0.0-supports-only-mobile
amplify_datastore: ^1.0.0
amplify_flutter: ^1.0.0
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
* [Install and configure Amplify CLI](/gen1/[platform]/tools/cli/start/set-up-cli/)

The following are required, depending on which platforms you are targeting:

* An iOS configuration targeting at least iOS 13.0 and XCode version >=13.2
* An Android configuration targeting at least Android API level 24 (Android 7.0) or above
* Any browser supported by Flutter for Web (you can check the list of supported browsers [here](https://docs.flutter.dev/development/platform-integration/web/faq#which-web-browsers-are-supported-by-flutter))
* Any Windows OS meeting Flutter minimums
* macOS version 10.15 or higher
* Any Ubuntu Linux distribution meeting Flutter minimums
* For a full example please follow the [project setup walkthrough](/gen1/[platform]/prev/start/project-setup/create-application/)
Amplify Flutter requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/gen1/[platform]/prev/start/project-setup/platform-setup/) guide for more details on platform specific setup.
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ import android8 from '/src/fragments/lib-v1/graphqlapi/android/getting-started/4

<Fragments fragments={{ android: android8 }} />

import flutter18 from '/src/fragments/lib-v1/graphqlapi/flutter/getting-started/40_codegen.mdx';
import flutter7 from '/src/fragments/lib-v1/graphqlapi/flutter/getting-started/40_codegen.mdx';

<Fragments fragments={{ flutter: flutter18 }} />
<Fragments fragments={{ flutter: flutter7 }} />

## Install Amplify Libraries

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
* [Install and configure Amplify CLI](/gen1/[platform]/tools/cli/start/set-up-cli/)

The following are required, depending on which platforms you are targeting:

* An iOS configuration targeting at least iOS 13.0 and XCode version >=13.2
* An Android configuration targeting at least Android API level 24 (Android 7.0) or above
* Any browser supported by Flutter for Web (you can check the list of supported browsers [here](https://docs.flutter.dev/development/platform-integration/web/faq#which-web-browsers-are-supported-by-flutter))
* Any Windows OS meeting Flutter minimums
* macOS version 10.15 or higher
* Any Ubuntu Linux distribution meeting Flutter minimums
* For a full example please follow the [project setup walkthrough](/gen1/[platform]/start/project-setup/create-application/)
Amplify Flutter requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/gen1/[platform]/prev/start/project-setup/platform-setup/) guide for more details on platform specific setup.
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
* [Install and configure Amplify CLI](/gen1/[platform]/tools/cli/start/set-up-cli/)

The following are required, depending on which platforms you are targeting:

* An iOS configuration targeting at least iOS 13.0 and XCode version >=13.2
* An Android configuration targeting at least Android API level 24 (Android 7.0) or above
* Any browser supported by Flutter for Web (you can check the list of supported browsers [here](https://docs.flutter.dev/development/platform-integration/web/faq#which-web-browsers-are-supported-by-flutter))
* Any Windows OS meeting Flutter minimums
* macOS version 10.15 or higher
* Any Ubuntu Linux distribution meeting Flutter minimums
* For a full example please follow the [project setup walkthrough](/gen1/[platform]/start/project-setup/create-application/)
Amplify Flutter requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/gen1/[platform]/prev/start/project-setup/platform-setup/) guide for more details on platform specific setup.
14 changes: 0 additions & 14 deletions src/fragments/lib-v1/storage/flutter/upload.mdx
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
<InlineFilter filters={["flutter"]}>
## Upload File

To upload to S3 from a file, specify the `key` to upload the file to and the `localFile` to be uploaded. `localFile` can be an instance of `AWSFile` created from either an OS platform `File` instance or the result of Flutter file picker plugins such as [file_picker](https://pub.dev/packages/file_picker).
</InlineFilter>

<InlineFilter filters={["swift", "android"]}>
## Upload File

To upload to S3 from a file, specify the key and the local file to be uploaded. A file can be created locally, or retrieved from the user's device using a package such as [image_picker](https://pub.dev/packages/image_picker) or [file_picker](https://pub.dev/packages/file_picker).
</InlineFilter>

<InlineFilter filters={["swift", "android"]}>
### Upload a local file
</InlineFilter>

<InlineFilter filters={["flutter"]}>
### Upload platform `File`
</InlineFilter>

<Callout>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,9 @@ import flutter11 from '/src/fragments/lib-v1/storage/flutter/getting-started/30_

<Fragments fragments={{ flutter: flutter11 }} />

<InlineFilter filters={['swift', 'android']}>
## Uploading data to your bucket

To upload to S3 from a data object, specify the key and the data object to be uploaded.
</InlineFilter>

import ios12 from '/src/fragments/lib-v1/storage/ios/getting-started/40_upload.mdx';

Expand All @@ -113,7 +111,10 @@ import android13 from '/src/fragments/lib-v1/storage/android/getting-started/40_

<Fragments fragments={{ android: android13 }} />

<InlineFilter filters={['swift', 'android']}>
import flutter14 from '/src/fragments/lib-v1/storage/flutter/getting-started/40_upload.mdx';

<Fragments fragments={{ flutter: flutter14 }} />

Upon successfully executing this code, you should see a new folder in your bucket, called `public`. It should contain a file called `ExampleKey`, whose contents is `Example file contents`.

## Next Steps
Expand All @@ -126,8 +127,7 @@ Congratulations! You've uploaded a file to an s3 bucket. Check out the following
- [Remove Files](/gen1/[platform]/prev/build-a-backend/storage/remove/)
- [File Access Levels](/gen1/[platform]/prev/build-a-backend/storage/configure-access/)
- [Using Lambda Triggers](/gen1/[platform]/prev/build-a-backend/storage/lambda-triggers/)
</InlineFilter>

<InlineFilter filters={['android', 'swift']}>
- [Escape Hatch](/gen1/[platform]/prev/build-a-backend/storage/sdk/)
</InlineFilter>
- [Escape Hatch](/gen1/[platform]/prev/build-a-backend/storage/sdk/)
</InlineFilter>
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
The following are required, depending on which platforms you are targeting:
* [Install and configure Amplify CLI](/gen1/[platform]/tools/cli/start/set-up-cli/)

- An iOS configuration targeting at least iOS 13.0 and XCode version >=13.2
- An Android configuration targeting at least Android API level 24 (Android 7.0) or above
- Any browser supported by Flutter for Web (you can check the list of supported browsers [here](https://docs.flutter.dev/development/platform-integration/web/faq#which-web-browsers-are-supported-by-flutter))
- Any Windows OS meeting Flutter minimums
- macOS version 10.15 or higher
- Any Ubuntu Linux distribution meeting Flutter minimums
- For a full example please follow the [project setup walkthrough](/gen1/[platform]/start/project-setup/create-application/)
Amplify Flutter requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/gen1/[platform]/start/project-setup/platform-setup/) guide for more details on platform specific setup.
4 changes: 3 additions & 1 deletion src/fragments/lib/auth/flutter/getting_started/10_preReq.mdx
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Amplify requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/gen1/[platform]/start/project-setup/platform-setup/) guide for more details on platform specific setup.
* [Install and configure Amplify CLI](/gen1/[platform]/tools/cli/start/set-up-cli/)

Amplify Flutter requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/gen1/[platform]/start/project-setup/platform-setup/) guide for more details on platform specific setup.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ Once the user provides the correct response, they should be authenticated in you
<b>Special Handling on ConfirmSignIn</b>

During a `confirmSignIn` call, if `failAuthentication: true` is returned by the Lambda, the session of the request gets invalidated by Cognito, and a `NotAuthorizedException` is thrown. To recover, the user must initiate a new sign in by calling `Amplify.Auth.signIn`.

Exception: `NotAuthorizedException` with a message `Invalid session for the user.`
</Callout>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Amplify Flutter supports [standard OIDC user attributes](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) as well as custom attributes. Custom attributes can be instantiated via the custom attribute constructor:

```dart
Future<void> _signUp({
Future<void> signUp({
required String username,
required String password,
required String email,
Expand All @@ -23,4 +23,4 @@ Future<void> _signUp({
}
```

When working with a Cognito UserPool, you can set up [custom attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-custom-attributes) via the Cognito console or AWS CLI. Although Cognito prepends a "custom:" prefix on the attribute name, there is no need for you to add this in Amplify Flutter's custom attribute constructor.
When working with a Cognito UserPool, you can set up [custom attributes](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#user-pool-settings-custom-attributes) via the Cognito console or AWS CLI. Although Cognito prepends a "custom:" prefix on the attribute name, there is no need for you to add this in Amplify Flutter's custom attribute constructor.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
flutter:
sdk: flutter

amplify_datastore: 2.0.0-supports-only-mobile
amplify_datastore: 2.0.0
amplify_flutter: ^2.0.0
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
* [Install and configure Amplify CLI](/gen1/[platform]/tools/cli/start/set-up-cli/)

The following are required, depending on which platforms you are targeting:

* An iOS configuration targeting at least iOS 13.0 and XCode version >=13.2
* An Android configuration targeting at least Android API level 24 (Android 7.0) or above
* Any browser supported by Flutter for Web (you can check the list of supported browsers [here](https://docs.flutter.dev/development/platform-integration/web/faq#which-web-browsers-are-supported-by-flutter))
* Any Windows OS meeting Flutter minimums
* macOS version 10.15 or higher
* Any Ubuntu Linux distribution meeting Flutter minimums
* For a full example please follow the [project setup walkthrough](/gen1/[platform]/start/project-setup/create-application/)
Amplify Flutter requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/gen1/[platform]/start/project-setup/platform-setup/) guide for more details on platform specific setup.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ Congratulations! You've created a `Todo` object in your database. Check out the
- [Update data](/gen1/[platform]/build-a-backend/graphqlapi/mutate-data/)
- [Subscribe to data](/gen1/[platform]/build-a-backend/graphqlapi/subscribe-data/)
- [Concepts](/gen1/[platform]/build-a-backend/graphqlapi/api-graphql-concepts/)
<InlineFilter filters={['swift', 'android']}>
- [Configure authorization modes](/gen1/[platform]/build-a-backend/graphqlapi/customize-authorization-rules)
</InlineFilter>

{/* TODO: * [Authorizing API calls with Cognito User Pool] */}
10 changes: 1 addition & 9 deletions src/fragments/lib/restapi/flutter/getting-started/10_preReq.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
* [Install and configure Amplify CLI](/gen1/[platform]/tools/cli/start/set-up-cli/)

The following are required, depending on which platforms you are targeting:

* An iOS configuration targeting at least iOS 13.0 and XCode version >=13.2
* An Android configuration targeting at least Android API level 24 (Android 7.0) or above
* Any browser supported by Flutter for Web (you can check the list of supported browsers [here](https://docs.flutter.dev/development/platform-integration/web/faq#which-web-browsers-are-supported-by-flutter))
* Any Windows OS meeting Flutter minimums
* macOS version 10.15 or higher
* Any Ubuntu Linux distribution meeting Flutter minimums
* For a full example please follow the [project setup walkthrough](/gen1/[platform]/start/project-setup/create-application/)
Amplify Flutter requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/gen1/[platform]/start/project-setup/platform-setup/) guide for more details on platform specific setup.
10 changes: 2 additions & 8 deletions src/fragments/lib/storage/flutter/getting-started/10_preReq.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
The following are required, depending on which platforms you are targeting:
* [Install and configure Amplify CLI](/gen1/[platform]/tools/cli/start/set-up-cli/)

* An iOS configuration targeting at least iOS 13.0 and XCode version >=13.2
* An Android configuration targeting at least Android API level 24 (Android 7.0) or above
* Any browser supported by Flutter for Web (you can check the list of supported browsers [here](https://docs.flutter.dev/development/platform-integration/web/faq#which-web-browsers-are-supported-by-flutter))
* Any Windows OS meeting Flutter minimums
* macOS version 10.15 or higher
* Any Ubuntu Linux distribution meeting Flutter minimums
* For a full example please follow the [project setup walkthrough](/gen1/[platform]/start/project-setup/create-application/)
Amplify Flutter requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/gen1/[platform]/start/project-setup/platform-setup/) guide for more details on platform specific setup.
1 change: 0 additions & 1 deletion src/fragments/lib/storage/flutter/list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ Future<void> listAll() async {
}
}
```
import { delimiter } from "path"
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,8 @@ For more information on how to use the `visionos-preview` branch, see [Platform

<InlineFilter filters={["flutter"]}>

The following are required, depending on which platforms you are targeting:

- An iOS configuration targeting at least iOS 13.0 and XCode version >=13.2
- An Android configuration targeting at least Android API level 24 (Android 7.0) or above
- Any browser supported by Flutter for Web (you can check the list of supported browsers [here](https://docs.flutter.dev/development/platform-integration/web/faq#which-web-browsers-are-supported-by-flutter))
- Any Windows OS meeting Flutter minimums
- macOS version 10.15 or higher
- Any Ubuntu Linux distribution meeting Flutter minimums
Amplify Flutter requires a minimum target platform for iOS (13.0), Android (API level 24), and macOS (10.15). Additional setup is required for some target platforms. Please see the [platform setup](/[platform]/start/) guide for more details on platform specific setup.



</InlineFilter>
Expand Down
Loading
Loading