|
| 1 | +import 'package:flutter/material.dart'; |
| 2 | +import 'package:google_fonts/google_fonts.dart'; |
| 3 | +import 'package:tutorial_coach_mark/tutorial_coach_mark.dart'; |
| 4 | + |
| 5 | +List<TargetFocus> addDetailsPage({ |
| 6 | + required GlobalKey dueKey, |
| 7 | + required GlobalKey waitKey, |
| 8 | + required GlobalKey untilKey, |
| 9 | + required GlobalKey priorityKey, |
| 10 | +}) { |
| 11 | + List<TargetFocus> targets = []; |
| 12 | + |
| 13 | + targets.add( |
| 14 | + TargetFocus( |
| 15 | + keyTarget: dueKey, |
| 16 | + alignSkip: Alignment.topRight, |
| 17 | + shape: ShapeLightFocus.RRect, |
| 18 | + contents: [ |
| 19 | + TargetContent( |
| 20 | + align: ContentAlign.top, |
| 21 | + builder: (context, controller) { |
| 22 | + return Container( |
| 23 | + alignment: Alignment.center, |
| 24 | + child: Column( |
| 25 | + crossAxisAlignment: CrossAxisAlignment.center, |
| 26 | + mainAxisAlignment: MainAxisAlignment.center, |
| 27 | + children: <Widget>[ |
| 28 | + Text( |
| 29 | + "This signifies the due date of the task", |
| 30 | + textAlign: TextAlign.center, |
| 31 | + style: GoogleFonts.poppins( |
| 32 | + color: Colors.white, |
| 33 | + ), |
| 34 | + ), |
| 35 | + ], |
| 36 | + ), |
| 37 | + ); |
| 38 | + }, |
| 39 | + ), |
| 40 | + ], |
| 41 | + ), |
| 42 | + ); |
| 43 | + |
| 44 | + targets.add( |
| 45 | + TargetFocus( |
| 46 | + keyTarget: waitKey, |
| 47 | + alignSkip: Alignment.topRight, |
| 48 | + shape: ShapeLightFocus.RRect, |
| 49 | + contents: [ |
| 50 | + TargetContent( |
| 51 | + align: ContentAlign.bottom, |
| 52 | + builder: (context, controller) { |
| 53 | + return Container( |
| 54 | + alignment: Alignment.center, |
| 55 | + child: Column( |
| 56 | + crossAxisAlignment: CrossAxisAlignment.center, |
| 57 | + mainAxisAlignment: MainAxisAlignment.center, |
| 58 | + children: <Widget>[ |
| 59 | + Text( |
| 60 | + "This signifies the waiting date of the task \n Task will be visible after this date", |
| 61 | + textAlign: TextAlign.center, |
| 62 | + style: GoogleFonts.poppins( |
| 63 | + color: Colors.white, |
| 64 | + ), |
| 65 | + ), |
| 66 | + ], |
| 67 | + ), |
| 68 | + ); |
| 69 | + }, |
| 70 | + ), |
| 71 | + ], |
| 72 | + ), |
| 73 | + ); |
| 74 | + |
| 75 | + targets.add( |
| 76 | + TargetFocus( |
| 77 | + keyTarget: untilKey, |
| 78 | + alignSkip: Alignment.topRight, |
| 79 | + shape: ShapeLightFocus.RRect, |
| 80 | + contents: [ |
| 81 | + TargetContent( |
| 82 | + align: ContentAlign.bottom, |
| 83 | + builder: (context, controller) { |
| 84 | + return Container( |
| 85 | + alignment: Alignment.center, |
| 86 | + child: Column( |
| 87 | + crossAxisAlignment: CrossAxisAlignment.center, |
| 88 | + mainAxisAlignment: MainAxisAlignment.center, |
| 89 | + children: <Widget>[ |
| 90 | + Text( |
| 91 | + "This shows the last date of the task", |
| 92 | + textAlign: TextAlign.center, |
| 93 | + style: GoogleFonts.poppins( |
| 94 | + color: Colors.white, |
| 95 | + ), |
| 96 | + ), |
| 97 | + ], |
| 98 | + ), |
| 99 | + ); |
| 100 | + }, |
| 101 | + ), |
| 102 | + ], |
| 103 | + ), |
| 104 | + ); |
| 105 | + |
| 106 | + targets.add( |
| 107 | + TargetFocus( |
| 108 | + keyTarget: priorityKey, |
| 109 | + alignSkip: Alignment.topRight, |
| 110 | + shape: ShapeLightFocus.RRect, |
| 111 | + contents: [ |
| 112 | + TargetContent( |
| 113 | + align: ContentAlign.bottom, |
| 114 | + builder: (context, controller) { |
| 115 | + return Container( |
| 116 | + alignment: Alignment.center, |
| 117 | + child: Column( |
| 118 | + crossAxisAlignment: CrossAxisAlignment.center, |
| 119 | + mainAxisAlignment: MainAxisAlignment.center, |
| 120 | + children: <Widget>[ |
| 121 | + Text( |
| 122 | + "This is the priority of the Tasks \n L -> Low \n M -> Medium \n H -> Hard", |
| 123 | + textAlign: TextAlign.center, |
| 124 | + style: GoogleFonts.poppins( |
| 125 | + color: Colors.white, |
| 126 | + ), |
| 127 | + ), |
| 128 | + ], |
| 129 | + ), |
| 130 | + ); |
| 131 | + }, |
| 132 | + ), |
| 133 | + ], |
| 134 | + ), |
| 135 | + ); |
| 136 | + |
| 137 | + return targets; |
| 138 | +} |
0 commit comments