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

add missing vibration on the button #137

Closed
wants to merge 8 commits into from

Conversation

Amitkumarkoli
Copy link
Contributor

pr #117
Hey! I just add the missing vibration on intro page and ready_for_session_page .
let me know is this correct or not?

@guyluz11 guyluz11 linked an issue Jun 22, 2024 that may be closed by this pull request
Copy link
Owner

@guyluz11 guyluz11 left a comment

Choose a reason for hiding this comment

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

Welcome to Infinite Horizons.

I have added request for change, please fix and press the re review button for me to start checking the pr again.

Comment on lines 27 to 30
Future<void> _vibrateDevice() async {
if (await Vibrate.canVibrate) {
Vibrate.vibrate();
}
Copy link
Owner

Choose a reason for hiding this comment

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

We are using controllers for api calls.
Use VibrationController.instance.vibrate(VibrationType.light); directly

@Amitkumarkoli Amitkumarkoli requested a review from guyluz11 June 22, 2024 15:49
@Amitkumarkoli
Copy link
Contributor Author

Hey! I added new changes to it 2 days ago,
can u please check it and let me know about this?

Copy link
Owner

@guyluz11 guyluz11 left a comment

Choose a reason for hiding this comment

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

Sorry for the late response, not sure how did I missed it.

Comment on lines 31 to 35
void onDone(BuildContext context) {
VibrationController.instance.vibrate(VibrationType.light);
Navigator.of(context)
.push(MaterialPageRoute(builder: (context) => HomePage()));
}
Copy link
Owner

Choose a reason for hiding this comment

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

Not needed as you already called vibration on ready_for_session_page.dart which call this method

Comment on lines 39 to 42
() {
VibrationController.instance.vibrate(VibrationType.light);
callback();
},
Copy link
Owner

Choose a reason for hiding this comment

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

Would be nicer to extract that to a method

@Amitkumarkoli
Copy link
Contributor Author

Hey ! I just added new commit let me know this is what u want ?

@Amitkumarkoli Amitkumarkoli requested a review from guyluz11 June 25, 2024 06:02
Comment on lines +31 to +34
void onDone(BuildContext context) {
Navigator.of(context)
.push(MaterialPageRoute(builder: (context) => HomePage()));
}
Copy link
Owner

Choose a reason for hiding this comment

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

Please revert to arrow function

Comment on lines +45 to +50
void handleCallback() => _handleCallback();

void _handleCallback() {
VibrationController.instance.vibrate(VibrationType.light);
callback();
}
Copy link
Owner

Choose a reason for hiding this comment

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

There is no reason to call function to call function??.

Also move it above the build method

scaffold: false,
title: 'start_session',
child: ReadyForSessionOrganism(
callback,
() => handleCallback(),
Copy link
Owner

Choose a reason for hiding this comment

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

You can write this code cleaner by changing () => handleCallback(), to just handleCallback

Copy link
Owner

@guyluz11 guyluz11 left a comment

Choose a reason for hiding this comment

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

Also this pr have conflicts with dev branch, please fix it as well

@guyluz11
Copy link
Owner

I have started to work on a big feature, it will take a couple of days and I want this feature to be in the same release.
Thanks

@guyluz11
Copy link
Owner

guyluz11 commented Jul 5, 2024

I have started to work on a big feature, it will take a couple of days and I want this feature to be in the same release. Thanks

The big future got merged so I will continue from here as this pr didn't got new commits from last week.

@guyluz11 guyluz11 closed this Jul 5, 2024
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.

Intro next missing vibration
2 participants