-
Notifications
You must be signed in to change notification settings - Fork 43
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
Feature/#336 base screen #351
base: feature/#349-add-remote-config
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,153 @@ | |||
import 'package:flutter/foundation.dart'; |
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.
rename folder to base_screen instead of simple_screen
|
||
class BaseScreen extends StatelessWidget { | ||
final bool isScrollable; | ||
final bool useSlivers; |
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.
Good idea to add more functionality, we can do even better imo
Add the ability to show an error by having a String and/or a onRetryPressed. But do make the visualisation a separate widget like you do with _content and _header
|
||
if (children.isNotEmpty) { | ||
if (useSlivers) { | ||
content = CustomScrollView( |
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.
just return here
padding: padding, | ||
children: children, | ||
); | ||
} else { |
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.
if you return, no need for the } else {
here
actions: trailingItems, | ||
child: titleWidget, | ||
), | ||
] |
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.
Cheeky ,
missing
fixes #336