diff --git a/canaries/main.dart b/canaries/main.dart index 8503d19379..55fdba512b 100644 --- a/canaries/main.dart +++ b/canaries/main.dart @@ -1,13 +1,13 @@ -import 'package:flutter/material.dart'; -import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:amplify_analytics_pinpoint/amplify_analytics_pinpoint.dart'; +import 'package:amplify_api/amplify_api.dart'; import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; -import 'package:amplify_storage_s3/amplify_storage_s3.dart'; import 'package:amplify_datastore/amplify_datastore.dart'; -import 'package:amplify_api/amplify_api.dart'; -import '/models/ModelProvider.dart'; -import 'amplifyconfiguration.dart'; +import 'package:amplify_flutter/amplify_flutter.dart'; +import 'package:amplify_storage_s3/amplify_storage_s3.dart'; +import 'package:flutter/material.dart'; +import 'models/ModelProvider.dart'; +import 'amplifyconfiguration.dart'; void main() { runApp(const MyApp()); @@ -66,20 +66,20 @@ class _MyHomePageState extends State { } void _configureAmplify() async { - if(!Amplify.isConfigured) { + if (!Amplify.isConfigured) { print("Configuring amplify"); AmplifyAuthCognito auth = AmplifyAuthCognito(); AmplifyStorageS3 storage = AmplifyStorageS3(); AmplifyAnalyticsPinpoint analytics = AmplifyAnalyticsPinpoint(); Amplify.addPlugin(AmplifyAPI(modelProvider: ModelProvider.instance)); AmplifyDataStore datastorePlugin = - AmplifyDataStore(modelProvider: ModelProvider.instance); + AmplifyDataStore(modelProvider: ModelProvider.instance); try { await Amplify.addPlugins([auth, storage, analytics, datastorePlugin]); await Amplify.configure(amplifyconfig); print("Done configuring amplify"); - } on AmplifyException catch (e) { + } on AmplifyException catch (e) { print(e); print("Expected to fail cause there's no real amplifyconfig file"); } diff --git a/example/lib/main.dart b/example/lib/main.dart index 4c6f9a0399..a9608cefdb 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -18,9 +18,8 @@ import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:amplify_storage_s3/amplify_storage_s3.dart'; import 'package:flutter/material.dart'; -import 'package:sample_app/Pages/LoadingPage.dart'; - -import 'Pages/LandingPage.dart'; +import 'package:sample_app/pages/landing_page.dart'; +import 'package:sample_app/pages/loading_page.dart'; /* IMPORTANT - THIS LINE WILL NOT COMPILE diff --git a/example/lib/Pages/LandingPage.dart b/example/lib/pages/landing_page.dart similarity index 95% rename from example/lib/Pages/LandingPage.dart rename to example/lib/pages/landing_page.dart index 0011a4f118..697f938f54 100644 --- a/example/lib/Pages/LandingPage.dart +++ b/example/lib/pages/landing_page.dart @@ -15,9 +15,9 @@ import 'package:flutter/material.dart'; -import '../Views/SignInView.dart'; -import '../Views/SignUpView.dart'; -import 'MainPage.dart'; +import '../views/sign_in_view.dart'; +import '../views/sign_up_view.dart'; +import 'main_page.dart'; class LandingPage extends StatefulWidget { LandingPage({Key? key}) : super(key: key); diff --git a/example/lib/Pages/LoadingPage.dart b/example/lib/pages/loading_page.dart similarity index 100% rename from example/lib/Pages/LoadingPage.dart rename to example/lib/pages/loading_page.dart diff --git a/example/lib/Pages/MainPage.dart b/example/lib/pages/main_page.dart similarity index 94% rename from example/lib/Pages/MainPage.dart rename to example/lib/pages/main_page.dart index b51514695e..038ad5c17e 100644 --- a/example/lib/Pages/MainPage.dart +++ b/example/lib/pages/main_page.dart @@ -16,9 +16,9 @@ import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:amplify_storage_s3/amplify_storage_s3.dart'; import 'package:flutter/material.dart'; -import 'package:sample_app/Views/ImageLineItem.dart'; -import 'package:sample_app/Views/ImageUploader.dart'; -import 'package:sample_app/Views/UserView.dart'; +import 'package:sample_app/views/image_line_item.dart'; +import 'package:sample_app/views/image_uploader.dart'; +import 'package:sample_app/views/user_view.dart'; class MainPage extends StatefulWidget { @override diff --git a/example/lib/Views/ErrorView.dart b/example/lib/views/error_view.dart similarity index 100% rename from example/lib/Views/ErrorView.dart rename to example/lib/views/error_view.dart diff --git a/example/lib/Views/ImageLineItem.dart b/example/lib/views/image_line_item.dart similarity index 98% rename from example/lib/Views/ImageLineItem.dart rename to example/lib/views/image_line_item.dart index 101882d9f3..abf46a4ae7 100644 --- a/example/lib/Views/ImageLineItem.dart +++ b/example/lib/views/image_line_item.dart @@ -15,7 +15,7 @@ import 'package:flutter/material.dart'; -import 'ImagePreview.dart'; +import 'image_preview.dart'; class ImageLineItem extends StatelessWidget { final String storageKey; diff --git a/example/lib/Views/ImagePreview.dart b/example/lib/views/image_preview.dart similarity index 100% rename from example/lib/Views/ImagePreview.dart rename to example/lib/views/image_preview.dart diff --git a/example/lib/Views/ImageUploader.dart b/example/lib/views/image_uploader.dart similarity index 100% rename from example/lib/Views/ImageUploader.dart rename to example/lib/views/image_uploader.dart diff --git a/example/lib/Views/SignInView.dart b/example/lib/views/sign_in_view.dart similarity index 99% rename from example/lib/Views/SignInView.dart rename to example/lib/views/sign_in_view.dart index 62a29f9fc2..f1c541de55 100644 --- a/example/lib/Views/SignInView.dart +++ b/example/lib/views/sign_in_view.dart @@ -16,7 +16,7 @@ import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:flutter/material.dart'; -import 'ErrorView.dart'; +import 'error_view.dart'; class SignInView extends StatefulWidget { @override diff --git a/example/lib/Views/SignUpView.dart b/example/lib/views/sign_up_view.dart similarity index 99% rename from example/lib/Views/SignUpView.dart rename to example/lib/views/sign_up_view.dart index d7666ce3a6..7da7b4f44e 100644 --- a/example/lib/Views/SignUpView.dart +++ b/example/lib/views/sign_up_view.dart @@ -16,7 +16,7 @@ import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:flutter/material.dart'; -import 'package:sample_app/Views/ErrorView.dart'; +import 'package:sample_app/views/error_view.dart'; class SignUpView extends StatefulWidget { @override diff --git a/example/lib/Views/UserView.dart b/example/lib/views/user_view.dart similarity index 96% rename from example/lib/Views/UserView.dart rename to example/lib/views/user_view.dart index 33eb142e5e..a613d783ff 100644 --- a/example/lib/Views/UserView.dart +++ b/example/lib/views/user_view.dart @@ -15,7 +15,7 @@ import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:flutter/material.dart'; -import 'package:sample_app/Pages/LandingPage.dart'; +import 'package:sample_app/pages/landing_page.dart'; class UserView extends StatefulWidget { @override