|
1 |
| -# flutter-walkthrough-screen |
| 1 | +# Flutter Walkthrough Screen |
2 | 2 | A flutter package which help developer in creating a customize onboarding screens of their app.
|
| 3 | + |
| 4 | +## Screenshots |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | +## Usage |
| 10 | + |
| 11 | + |
| 12 | +[Example](https://github.com/champ96k/flutter-walkthrough-screen/tree/main/example) |
| 13 | + |
| 14 | +To use this package : |
| 15 | + |
| 16 | +* add the dependency to your [pubspec.yaml](https://github.com/champ96k/flutter-onboarding-screen/blob/master/pubspec.yaml) file. |
| 17 | + |
| 18 | +```yaml |
| 19 | + dependencies: |
| 20 | + flutter: |
| 21 | + sdk: flutter |
| 22 | + flutter_walkthrough_screen: |
| 23 | +``` |
| 24 | +
|
| 25 | +### How to use |
| 26 | +
|
| 27 | +```dart |
| 28 | +class TestScreen extends StatelessWidget { |
| 29 | + /*here we have a list of OnbordingScreen which we want to have, each OnbordingScreen have a imagePath,title and an desc. |
| 30 | + */ |
| 31 | + final List<OnbordingData> list = [ |
| 32 | + OnbordingData( |
| 33 | + image: AssetImage("images/pic1.png"), |
| 34 | + titleText:Text("This is Title1"), |
| 35 | + descText: Text("This is desc1"), |
| 36 | + ), |
| 37 | + OnbordingData( |
| 38 | + image: AssetImage("images/pic2.png"), |
| 39 | + titleText:Text("This is Title2"), |
| 40 | + descText: Text("This is desc2"), |
| 41 | + ), |
| 42 | + OnbordingData( |
| 43 | + image: AssetImage("images/pic3.png"), |
| 44 | + titleText:Text("This is Title3"), |
| 45 | + descText: Text("This is desc4"), |
| 46 | + ), |
| 47 | + OnbordingData( |
| 48 | + image: AssetImage("images/pic4.png"), |
| 49 | + titleText:Text("This is Title4"), |
| 50 | + descText: Text("This is desc4"), |
| 51 | + ), |
| 52 | + ]; |
| 53 | + |
| 54 | + @override |
| 55 | + Widget build(BuildContext context) { |
| 56 | + /* remove the back button in the AppBar is to set automaticallyImplyLeading to false |
| 57 | + here we need to pass the list and the route for the next page to be opened after this. */ |
| 58 | + return IntroScreen( |
| 59 | + onbordingDataList: list, |
| 60 | + colors: [ |
| 61 | + //list of colors for per pages |
| 62 | + ], |
| 63 | + pageRoute: MaterialPageRoute( |
| 64 | + builder: (context) => NextPage(), |
| 65 | + ), |
| 66 | + nextButton: Text( |
| 67 | + "NEXT", |
| 68 | + style: TextStyle( |
| 69 | + color: Colors.purple, |
| 70 | + ), |
| 71 | + ), |
| 72 | + lastButton: Text( |
| 73 | + "GOT IT", |
| 74 | + style: TextStyle( |
| 75 | + color: Colors.purple, |
| 76 | + ), |
| 77 | + ), |
| 78 | + skipButton: Text( |
| 79 | + "SKIP", |
| 80 | + style: TextStyle( |
| 81 | + color: Colors.purple, |
| 82 | + ), |
| 83 | + ), |
| 84 | + selectedDotColor: Colors.orange, |
| 85 | + unSelectdDotColor: Colors.grey, |
| 86 | + ); |
| 87 | + } |
| 88 | +} |
| 89 | +``` |
| 90 | + |
| 91 | +### Created & Maintained By |
| 92 | + |
| 93 | +[Tushar Nikam](https://github.com/champ96k) |
| 94 | +([linkedin](https://www.linkedin.com/in/tushar-nikam-a29a97131/)) |
| 95 | + |
| 96 | + |
| 97 | +## Getting Started |
| 98 | + |
| 99 | +For help getting started with Flutter, view our online [documentation](https://flutter.io/). |
| 100 | + |
| 101 | +For help on editing package code, view the [documentation](https://flutter.io/developing-packages/). |
| 102 | + |
0 commit comments