@@ -2,6 +2,12 @@ import 'package:concentric_transition/concentric_transition.dart';
2
2
import 'package:flutter/material.dart' ;
3
3
4
4
final pages = [
5
+ const PageData (
6
+ icon: Icons .bubble_chart,
7
+ title: "Local news\n stories" ,
8
+ bgColor: Color (0xFF0043D0 ),
9
+ textColor: Colors .white,
10
+ ),
5
11
const PageData (
6
12
icon: Icons .format_size,
7
13
title: "Choose your\n interests" ,
@@ -13,12 +19,6 @@ final pages = [
13
19
title: "Drag and\n drop to move" ,
14
20
bgColor: Color (0xFFFFFFFF ),
15
21
),
16
- const PageData (
17
- icon: Icons .bubble_chart,
18
- title: "Local news\n stories" ,
19
- bgColor: Color (0xFF0043D0 ),
20
- textColor: Colors .white,
21
- ),
22
22
];
23
23
24
24
class OnboardingExample extends StatelessWidget {
@@ -30,14 +30,17 @@ class OnboardingExample extends StatelessWidget {
30
30
return Scaffold (
31
31
body: ConcentricPageView (
32
32
colors: pages.map ((p) => p.bgColor).toList (),
33
- radius: screenWidth * 0.12 ,
34
- curve: Curves .ease,
35
- nextButtonBuilder: (context) => Icon (
36
- Icons .navigate_next,
37
- size: screenWidth * 0.1 ,
33
+ radius: screenWidth * 0.1 ,
34
+ // curve: Curves.ease,
35
+ nextButtonBuilder: (context) => Padding (
36
+ padding: const EdgeInsets .only (left: 3 ), // visual center
37
+ child: Icon (
38
+ Icons .navigate_next,
39
+ size: screenWidth * 0.08 ,
40
+ ),
38
41
),
39
42
// itemCount: pages.length,
40
- duration: const Duration (milliseconds: 1500 ),
43
+ // duration: const Duration(milliseconds: 1500),
41
44
// opacityFactor: 2.0,
42
45
// scaleFactor: 0.2,
43
46
// verticalPosition: 0.7,
0 commit comments