|
1 | | - |
2 | 1 | import 'package:flutter/material.dart'; |
3 | 2 | import 'package:flutter_introduction_widget/flutter_introduction_widget.dart'; |
4 | 3 |
|
5 | | -const List<IntroductionPage> defaultIntroductionPages = [ |
6 | | - IntroductionPage( |
7 | | - title: Column( |
8 | | - children: [ |
9 | | - SizedBox(height: 50), |
10 | | - Text( |
11 | | - 'welcome to iconinstagram', |
| 4 | +List<IntroductionPage> defaultIntroductionPages(BuildContext context) { |
| 5 | + var theme = Theme.of(context); |
| 6 | + return [ |
| 7 | + IntroductionPage( |
| 8 | + title: Column( |
| 9 | + children: [ |
| 10 | + const SizedBox(height: 50), |
| 11 | + Text( |
| 12 | + 'welcome to iconinstagram', |
| 13 | + style: theme.textTheme.headlineLarge, |
| 14 | + ), |
| 15 | + const SizedBox(height: 6), |
| 16 | + ], |
| 17 | + ), |
| 18 | + graphic: const Image( |
| 19 | + image: AssetImage( |
| 20 | + 'assets/first.png', |
| 21 | + package: 'flutter_introduction_widget', |
12 | 22 | ), |
13 | | - SizedBox(height: 6), |
14 | | - ], |
15 | | - ), |
16 | | - graphic: Image( |
17 | | - image: AssetImage( |
18 | | - 'assets/first.png', |
19 | | - package: 'flutter_introduction_widget', |
| 23 | + ), |
| 24 | + text: Text( |
| 25 | + 'Welcome to the world of Instagram, where creativity' |
| 26 | + ' knows no bounds and connections are made' |
| 27 | + ' through captivating visuals.', |
| 28 | + textAlign: TextAlign.center, |
| 29 | + style: theme.textTheme.bodyMedium, |
20 | 30 | ), |
21 | 31 | ), |
22 | | - text: Text( |
23 | | - 'Welcome to the world of Instagram, where creativity' |
24 | | - ' knows no bounds and connections are made' |
25 | | - ' through captivating visuals.', |
26 | | - textAlign: TextAlign.center, |
27 | | - ), |
28 | | - ), |
29 | | - IntroductionPage( |
30 | | - title: Column( |
31 | | - mainAxisAlignment: MainAxisAlignment.center, |
32 | | - children: [ |
33 | | - SizedBox(height: 50), |
34 | | - Text( |
35 | | - 'discover iconinstagram', |
| 32 | + IntroductionPage( |
| 33 | + title: Column( |
| 34 | + mainAxisAlignment: MainAxisAlignment.center, |
| 35 | + children: [ |
| 36 | + const SizedBox(height: 50), |
| 37 | + Text( |
| 38 | + 'discover iconinstagram', |
| 39 | + style: theme.textTheme.headlineLarge, |
| 40 | + ), |
| 41 | + const SizedBox(height: 6), |
| 42 | + ], |
| 43 | + ), |
| 44 | + text: Text( |
| 45 | + 'Dive into the vibrant world of' |
| 46 | + ' Instagram and discover endless possibilities.' |
| 47 | + ' From stunning photography to engaging videos,' |
| 48 | + ' Instagram offers a diverse range of content to explore and enjoy.', |
| 49 | + textAlign: TextAlign.center, |
| 50 | + style: theme.textTheme.bodyMedium, |
| 51 | + ), |
| 52 | + graphic: const Image( |
| 53 | + image: AssetImage( |
| 54 | + 'assets/second.png', |
| 55 | + package: 'flutter_introduction_widget', |
36 | 56 | ), |
37 | | - SizedBox(height: 6), |
38 | | - ], |
39 | | - ), |
40 | | - text: Text( |
41 | | - 'Dive into the vibrant world of' |
42 | | - ' Instagram and discover endless possibilities.' |
43 | | - ' From stunning photography to engaging videos,' |
44 | | - ' Instagram offers a diverse range of content to explore and enjoy.', |
45 | | - textAlign: TextAlign.center, |
46 | | - ), |
47 | | - graphic: Image( |
48 | | - image: AssetImage( |
49 | | - 'assets/second.png', |
50 | | - package: 'flutter_introduction_widget', |
51 | 57 | ), |
52 | 58 | ), |
53 | | - ), |
54 | | - IntroductionPage( |
55 | | - title: Column( |
56 | | - children: [ |
57 | | - SizedBox(height: 50), |
58 | | - Text( |
59 | | - 'elevate your experience', |
| 59 | + IntroductionPage( |
| 60 | + title: Column( |
| 61 | + children: [ |
| 62 | + const SizedBox(height: 50), |
| 63 | + Text( |
| 64 | + 'elevate your experience', |
| 65 | + style: theme.textTheme.headlineLarge, |
| 66 | + ), |
| 67 | + const SizedBox(height: 6), |
| 68 | + ], |
| 69 | + ), |
| 70 | + graphic: const Image( |
| 71 | + image: AssetImage( |
| 72 | + 'assets/third.png', |
| 73 | + package: 'flutter_introduction_widget', |
60 | 74 | ), |
61 | | - SizedBox(height: 6), |
62 | | - ], |
63 | | - ), |
64 | | - graphic: Image( |
65 | | - image: AssetImage( |
66 | | - 'assets/third.png', |
67 | | - package: 'flutter_introduction_widget', |
| 75 | + ), |
| 76 | + text: Text( |
| 77 | + 'Whether promoting your business, or connecting' |
| 78 | + ' with friends and family, Instagram provides the' |
| 79 | + ' tools and platform to make your voice heard.', |
| 80 | + textAlign: TextAlign.center, |
| 81 | + style: theme.textTheme.bodyMedium, |
68 | 82 | ), |
69 | 83 | ), |
70 | | - text: Text( |
71 | | - 'Whether promoting your business, or connecting' |
72 | | - ' with friends and family, Instagram provides the' |
73 | | - ' tools and platform to make your voice heard.', |
74 | | - textAlign: TextAlign.center, |
75 | | - ), |
76 | | - ), |
77 | | -]; |
| 84 | + ]; |
| 85 | +} |
0 commit comments