Skip to content
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

Merged
merged 5 commits into from
Aug 28, 2022
Merged

Reviewed code #93

merged 5 commits into from
Aug 28, 2022

Conversation

anasfik
Copy link
Contributor

@anasfik anasfik commented Aug 20, 2022

I just reviewed the code, specified types, fixed an overflow problem, separated the routes to a single file

final _radioButtons = [
final List<String> _radioButtons = [
Copy link
Owner

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 ?

Comment on lines 16 to 17
final List<String> _checkboxButtons = [
'Michael Jordan',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless type specification

Comment on lines 53 to 60
final theme = Theme.of(context);
final ThemeData theme = Theme.of(context);
Copy link
Owner

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(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless type specification

Comment on lines +10 to +14
final GroupButtonController controller = GroupButtonController(
onDisablePressed: (i) => debugPrint('Disable Button #$i pressed'),
);
final customizableController = CustomizableExampleController();
final CustomizableExampleController customizableController =
CustomizableExampleController();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless type specification

Comment on lines 17 to 26
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,
);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless type specification

Comment on lines -8 to +9
List<int> selectedIndexes = const <int>[],
List<int> disabledIndexes = const <int>[],
List<int> selectedIndexes = const [],
List<int> disabledIndexes = const [],
Copy link
Owner

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 ?

Copy link
Owner

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

Comment on lines +21 to 23
/// Returns int [index] of selected button
Function(int index)? onDisablePressed;

Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

Comment on lines +11 to +14
class Routes {
/// Use [GroupButtonExtendedExample]
/// to check all package [GroupingType]'s in one place
static const groupButtonExtendedExample = '/GroupButtonExtendedExample';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@Frezyx
Copy link
Owner

Frezyx commented Aug 21, 2022

Hello @anasfik !
Thank you so much for this contribution ❤️

But please check comments and effective dart docs
https://dart.dev/guides/language/effective-dart/design

@Frezyx Frezyx merged commit 22cc99c into Frezyx:master Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants