Skip to content

Commit

Permalink
added alert for vibration enabling
Browse files Browse the repository at this point in the history
  • Loading branch information
gadhvirushiraj committed Mar 31, 2023
1 parent 3d4e74f commit 67d475f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/app-tour/tour_home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ List<TargetFocus> home_target({
"Click here to switch between\nCalendar and Mood Chart",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w300,
fontWeight: FontWeight.w400,
fontSize: 20,
),
textAlign: TextAlign.left,
Expand Down Expand Up @@ -211,7 +211,7 @@ List<TargetFocus> home_target({
height: 30,
),
Text(
"After tutorial, click timer icon to start your first session.",
"After tutorial, click timer icon at bottom to start your first session.",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.w100,
Expand Down
31 changes: 31 additions & 0 deletions lib/breathing-excercise/breath_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,37 @@ class _BreathState extends State<Breath> {
inactiveTrackColor: Colors.white54,
activeColor: ekaantGreen,
onChanged: (bool value) {
if (value) {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: const Text("Enable Vibration"),
actionsPadding: const EdgeInsets.all(15),
content: const Text(
"Make sure to turn on Haptic Feedback or Touch Feedback in your device setting.",
style: TextStyle(fontSize: 18)),
actions: [
TextButton(
child: const Text(
"Got it!",
style: TextStyle(
color: ekaantGreen, fontSize: 20),
),
onPressed: () {
Navigator.of(context).pop();
},
)
],
shape: ShapeBorder.lerp(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20)),
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20)),
0.5,
),
),
);
}
setState(() {
vibrate = value;
});
Expand Down

0 comments on commit 67d475f

Please sign in to comment.