-
Notifications
You must be signed in to change notification settings - Fork 44
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
Reviewed code #93
Reviewed code #93
Conversation
final _radioButtons = [ | ||
final List<String> _radioButtons = [ |
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.
Why did you add types where it is not necessary ?
final List<String> _checkboxButtons = [ | ||
'Michael Jordan', |
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.
Useless type specification
final theme = Theme.of(context); | ||
final ThemeData theme = Theme.of(context); |
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.
Useless type specification
final controller = GroupButtonController( | ||
final GroupButtonController controller = GroupButtonController( |
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.
Useless type specification
final GroupButtonController controller = GroupButtonController( | ||
onDisablePressed: (i) => debugPrint('Disable Button #$i pressed'), | ||
); | ||
final customizableController = CustomizableExampleController(); | ||
final CustomizableExampleController customizableController = | ||
CustomizableExampleController(); |
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.
Useless type specification
lib/src/options/defaults.dart
Outdated
const defaultSelectedTextStyle = TextStyle(fontSize: 14, color: Colors.white); | ||
const TextStyle defaultSelectedTextStyle = TextStyle( | ||
fontSize: 14, | ||
color: Colors.white, | ||
); | ||
|
||
@protected | ||
const defaultUnselectedTextStyle = TextStyle(fontSize: 14, color: Colors.black); | ||
const TextStyle defaultUnselectedTextStyle = TextStyle( | ||
fontSize: 14, | ||
color: Colors.black, | ||
); |
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.
Useless type specification
List<int> selectedIndexes = const <int>[], | ||
List<int> disabledIndexes = const <int>[], | ||
List<int> selectedIndexes = const [], | ||
List<int> disabledIndexes = const [], |
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.
For what you did it ?
It's your own linter rules ?
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.
Check analysis_options.yaml file
/// Returns int [index] of selected button | ||
Function(int index)? onDisablePressed; | ||
|
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.
👍🏻
/// Custom builder method to create custom buttons by index | ||
/// Custom builder method to create custom buttons by 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.
👍🏻
class Routes { | ||
/// Use [GroupButtonExtendedExample] | ||
/// to check all package [GroupingType]'s in one place | ||
static const groupButtonExtendedExample = '/GroupButtonExtendedExample'; |
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.
👍🏻
Hello @anasfik ! But please check comments and effective dart docs |
I just reviewed the code, specified types, fixed an overflow problem, separated the routes to a single file