Skip to content

Commit 52afb15

Browse files
author
srinivas
committed
removed shape in intro slide widget for better user experience
1 parent 1e7f879 commit 52afb15

File tree

5 files changed

+19
-20
lines changed

5 files changed

+19
-20
lines changed

lib/components/intro_screen/gf__intro_bottom_navigation.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GFIntroBottomNavigation extends StatelessWidget {
1919
this.onSkipTap,
2020
this.skipWidget,
2121
this.rightWidget,
22-
this.dotShape = BoxShape.rectangle,
22+
this.dotShape = BoxShape.circle,
2323
this.defaultColor,
2424
this.activeColor,
2525
this.dotHeight,

lib/components/intro_screen/gf_intro_bubble_slide.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class GFIntroBubbleSlide extends StatelessWidget {
2828
child: Container(
2929
width: MediaQuery.of(context).size.width / 2,
3030
height: MediaQuery.of(context).size.height / 2,
31-
padding: const EdgeInsets.only(left:16,right: 16, top: 24, bottom: 24),
31+
padding: const EdgeInsets.only(
32+
left: 16, right: 16, top: 24, bottom: 24),
3233
color: color.withOpacity(0.5),
3334
child: child ??
3435
RawMaterialButton(

lib/components/intro_screen/gf_intro_screen.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class _GFIntroScreenState extends State<GFIntroScreen> {
102102
duration: const Duration(milliseconds: 500),
103103
curve: Curves.linear);
104104
},
105-
pagesCount: widget.slides ?? slides().length,
105+
pagesCount: widget.slides.length ?? slides().length,
106106
pageNumber: page,
107107
)
108108
],
@@ -115,8 +115,8 @@ class _GFIntroScreenState extends State<GFIntroScreen> {
115115
list.add(const GFIntroSlide(
116116
backgroundColor: Colors.white,
117117
title: 'First',
118-
imageHeight: 100,
119-
imageWidth: 100,
118+
imageHeight: 200,
119+
imageWidth: 200,
120120
image: NetworkImage('https://www.gstatic.com/webp/gallery/3.jpg'),
121121
));
122122
list.add(const GFIntroSlide(

lib/components/intro_screen/gf_intro_slide.dart

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@ import 'package:getwidget/colors/gf_color.dart';
33
import 'package:getwidget/components/image/gf_image_overlay.dart';
44

55
class GFIntroSlide extends StatelessWidget {
6-
const GFIntroSlide(
7-
{Key key,
8-
@required this.image,
9-
this.imageHeight = 100,
10-
this.imageWidth = 100,
11-
this.title,
12-
this.subTitle,
13-
this.titleStyle = const TextStyle(fontSize: 20, color: GFColors.DARK),
14-
this.subTitleStyle = const TextStyle(fontSize: 16, color: GFColors.DARK),
15-
this.backgroundColor = GFColors.PRIMARY,
16-
this.imageShape = BoxShape.circle})
17-
: super(key: key);
6+
const GFIntroSlide({
7+
Key key,
8+
@required this.image,
9+
this.imageHeight = 100,
10+
this.imageWidth = 100,
11+
this.title,
12+
this.subTitle,
13+
this.titleStyle = const TextStyle(fontSize: 20, color: GFColors.DARK),
14+
this.subTitleStyle = const TextStyle(fontSize: 16, color: GFColors.DARK),
15+
this.backgroundColor = GFColors.PRIMARY,
16+
}) : super(key: key);
1817
final double imageHeight;
1918
final double imageWidth;
2019
final ImageProvider image;
@@ -23,7 +22,6 @@ class GFIntroSlide extends StatelessWidget {
2322
final String subTitle;
2423
final TextStyle subTitleStyle;
2524
final Color backgroundColor;
26-
final BoxShape imageShape;
2725

2826
@override
2927
Widget build(BuildContext context) => Container(
@@ -33,8 +31,8 @@ class GFIntroSlide extends StatelessWidget {
3331
crossAxisAlignment: CrossAxisAlignment.center,
3432
children: <Widget>[
3533
GFImageOverlay(
36-
shape: imageShape,
3734
height: imageHeight,
35+
colorFilter: const ColorFilter.mode(null, null),
3836
width: imageWidth,
3937
image: image),
4038
const SizedBox(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ dev_dependencies:
1515
sdk: flutter
1616

1717
flutter:
18-
uses-material-design: true
18+
uses-material-design: true

0 commit comments

Comments
 (0)