Skip to content

Commit

Permalink
feat(#677): remove privacy screen based on lifecycle (not working on …
Browse files Browse the repository at this point in the history
…Android)
  • Loading branch information
tamslo committed Dec 18, 2023
1 parent e056b0f commit b50cc83
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 70 deletions.
17 changes: 0 additions & 17 deletions app/lib/common/pages/privacy/privacy.dart

This file was deleted.

2 changes: 0 additions & 2 deletions app/lib/common/routing/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import '../../report/module.dart';
import '../../search/module.dart';
import '../../settings/module.dart';
import '../pages/main/main.dart';
import '../pages/privacy/privacy.dart';

part 'router.gr.dart';

Expand All @@ -17,7 +16,6 @@ part 'router.gr.dart';
drugSelectionRoutes,
loginRoutes,
onboardingRoutes,
privacyRoutes,
AutoRoute(
path: 'main',
page: MainPage,
Expand Down
41 changes: 19 additions & 22 deletions app/lib/common/widgets/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,26 @@ class PharMeApp extends StatelessWidget {

@override
Widget build(BuildContext context) {
return LifecycleObserver(
appRouter: _appRouter,
child: MaterialApp.router(
debugShowCheckedModeBanner: false,
routeInformationParser: _appRouter.defaultRouteParser(),
routerDelegate: _appRouter.delegate(
initialDeepLink: !_isLoggedIn
? 'login'
: !_onboardingDone
? 'onboarding'
: !_initialDrugSelectionDone
? 'drugselection'
: 'main',
),
theme: PharMeTheme.light,
localizationsDelegates: [
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [Locale('en', '')],
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routeInformationParser: _appRouter.defaultRouteParser(),
routerDelegate: _appRouter.delegate(
initialDeepLink: !_isLoggedIn
? 'login'
: !_onboardingDone
? 'onboarding'
: !_initialDrugSelectionDone
? 'drugselection'
: 'main',
),
theme: PharMeTheme.light,
localizationsDelegates: [
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [Locale('en', '')],
);
}
}
28 changes: 0 additions & 28 deletions app/lib/common/widgets/lifecycle_observer.dart

This file was deleted.

1 change: 0 additions & 1 deletion app/lib/common/widgets/module.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export 'drug_list/builder.dart';
export 'drug_list/cubit.dart';
export 'headings.dart';
export 'indicators.dart';
export 'lifecycle_observer.dart';
export 'page_scaffold.dart';
export 'pharme_logo_page.dart';
export 'radiant_gradient_mask.dart';
Expand Down

0 comments on commit b50cc83

Please sign in to comment.