-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: sign user out after 2 hours/Never #514
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #514 +/- ##
==========================================
+ Coverage 72.36% 73.77% +1.41%
==========================================
Files 133 140 +7
Lines 1603 1716 +113
==========================================
+ Hits 1160 1266 +106
- Misses 443 450 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature can be implemented with 5-10 changed files instead of 30. Remove any code refactoring from your feature branch before proceeding.
lib/features/authentication/data/datasources/authentication_local_data_source.dart
Outdated
Show resolved
Hide resolved
lib/features/authentication/data/intercepters/authentication_interceptor.dart
Outdated
Show resolved
Hide resolved
lib/features/authentication/domain/entities/authenticated_user.dart
Outdated
Show resolved
Hide resolved
Pull request was converted to draft
I have a few thoughts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Address my previous comment.
final FilterCategory value; | ||
final List<DropdownMenuItem<FilterCategory>>? items; | ||
final void Function(FilterCategory?) onChanged; | ||
final T value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Give a more descriptive name for the type T
final T value; | |
final DropdownItem value; |
final TextStyle? textStyle; | ||
final Color? dropdownColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make required with no default value. What I suspect you really want is a way to change the colour of the text, in which case you can also change the TextStyle field into a Color field instead.
final TextStyle? textStyle; | |
final Color? dropdownColor; | |
final Color textColor; | |
final Color dropdownColor; |
@@ -9,22 +8,26 @@ class SettingListEntry extends StatelessWidget { | |||
final bool destructive; | |||
final void Function()? onTap; | |||
final ListEntrySide sideToExpand; | |||
final bool overrideDisableBehaviour; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't override intended disabling behavior.
void initSession() { | ||
// bloc | ||
const List<SessionTimeout> entries = [ | ||
('2 hours', Duration(hours: 2)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't put actual configuration data in the service locator
@@ -2,17 +2,21 @@ import 'package:coffeecard/core/styles/app_colors.dart'; | |||
import 'package:coffeecard/core/styles/app_text_styles.dart'; | |||
import 'package:flutter/material.dart'; | |||
|
|||
class Dropdown<FilterCategory> extends StatelessWidget { | |||
class Dropdown<T> extends StatelessWidget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change the intended use case for this widget.
closes #169