Skip to content

Commit

Permalink
Remove amplify and new login feature flag (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
banghuazhao authored Nov 9, 2024
1 parent 41512c6 commit ea0afbd
Show file tree
Hide file tree
Showing 16 changed files with 6 additions and 1,048 deletions.
25 changes: 0 additions & 25 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
PODS:
- amplify_auth_cognito (0.0.1):
- Flutter
- FlutterMacOS
- amplify_secure_storage (0.0.1):
- Flutter
- app_links (0.0.2):
- Flutter
- app_tracking_transparency (0.0.1):
- Flutter
- device_info (0.0.1):
- Flutter
- device_info_plus (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_secure_storage (6.0.0):
- Flutter
Expand All @@ -37,12 +28,8 @@ PODS:
- Flutter

DEPENDENCIES:
- amplify_auth_cognito (from `.symlinks/plugins/amplify_auth_cognito/darwin`)
- amplify_secure_storage (from `.symlinks/plugins/amplify_secure_storage/ios`)
- app_links (from `.symlinks/plugins/app_links/ios`)
- app_tracking_transparency (from `.symlinks/plugins/app_tracking_transparency/ios`)
- device_info (from `.symlinks/plugins/device_info/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
Expand All @@ -59,18 +46,10 @@ SPEC REPOS:
- Toast

EXTERNAL SOURCES:
amplify_auth_cognito:
:path: ".symlinks/plugins/amplify_auth_cognito/darwin"
amplify_secure_storage:
:path: ".symlinks/plugins/amplify_secure_storage/ios"
app_links:
:path: ".symlinks/plugins/app_links/ios"
app_tracking_transparency:
:path: ".symlinks/plugins/app_tracking_transparency/ios"
device_info:
:path: ".symlinks/plugins/device_info/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
:path: Flutter
flutter_secure_storage:
Expand All @@ -93,12 +72,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
amplify_auth_cognito: 76b5a54f05f66f69966b468b8121a0dd33a32c70
amplify_secure_storage: be403397a8ba39f5e0f2a05303b3ca03b53b9ee9
app_links: e7a6750a915a9e161c58d91bc610e8cd1d4d0ad0
app_tracking_transparency: e169b653478da7bb15a6c61209015378ca73e375
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_secure_storage: d33dac7ae2ea08509be337e775f6b59f1ff45f12
fluttertoast: e9a18c7be5413da53898f660530c56f35edfba9c
Expand Down
24 changes: 0 additions & 24 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import 'dart:async';

import 'package:amplify_auth_cognito/amplify_auth_cognito.dart';
import 'package:amplify_flutter/amplify_flutter.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
Expand Down Expand Up @@ -46,25 +41,6 @@ class MyApp extends StatefulWidget {
}

class _MyAppState extends State<MyApp> {
Future<void> _configureAmplify() async {
try {
// Add the following line to add Auth plugin to your app.
await Amplify.addPlugin(AmplifyAuthCognito());

// call Amplify.configure to use the initialized categories in your app
final amplifyconfig = dotenv.env['AMPLIFY_CONFIG'] ?? "";
await Amplify.configure(amplifyconfig);
} on Exception catch (e) {
print('An error occurred configuring Amplify: $e');
}
}

@override
void initState() {
super.initState();
_configureAmplify();
}

@override
Widget build(BuildContext context) {
return MultiProvider(
Expand Down
3 changes: 0 additions & 3 deletions lib/presentation/bottom_navigator.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'package:app_links/app_links.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:swiftcomp/presentation/chat/viewModels/chat_view_model.dart';
Expand All @@ -17,7 +15,6 @@ class BottomNavigator extends StatefulWidget {
}

class _BottomNavigatorState extends State<BottomNavigator> {
late final AppLinks _appLinks;
final PageController _controller = PageController(
initialPage: 0,
);
Expand Down
6 changes: 2 additions & 4 deletions lib/presentation/chat/views/chat_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ class _ChatScreenState extends State<ChatScreen>

@override
Widget build(BuildContext context) {
final featureFlagProvider = Provider.of<FeatureFlagProvider>(context);
final isNewLoginEnabled = featureFlagProvider.getFeatureFlag("NewLogin");
return Consumer<ChatViewModel>(builder: (context, viewModel, _) {
return Scaffold(
appBar: AppBar(title: const Text("Chat")),
drawer: (viewModel.isLoggedIn || !isNewLoginEnabled) ? ChatDrawer() : null,
body: (viewModel.isLoggedIn || !isNewLoginEnabled)
drawer: (viewModel.isLoggedIn) ? ChatDrawer() : null,
body: (viewModel.isLoggedIn)
? ChatMessageList()
: Center(
child: Column(
Expand Down
135 changes: 0 additions & 135 deletions lib/presentation/settings/login/email_confimation_screen.dart

This file was deleted.

Loading

0 comments on commit ea0afbd

Please sign in to comment.