Skip to content

Commit 9dcfc9c

Browse files
Sandip KakadiyaSandip Kakadiya
authored andcommitted
GFColor changes in accordian
1 parent 6189813 commit 9dcfc9c

4 files changed

Lines changed: 22 additions & 22 deletions

File tree

example/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class _MyHomePageState extends State<MyHomePage> {
6767
),
6868
),
6969
GFButton(
70-
size: GFSize.large,
70+
size: GFSize.LARGE,
7171
text: 'View on Github',
7272
textStyle: const TextStyle(
7373
fontSize: 16,
@@ -100,7 +100,7 @@ class _MyHomePageState extends State<MyHomePage> {
100100
),
101101
),
102102
GFButton(
103-
size: GFSize.large,
103+
size: GFSize.LARGE,
104104
text: 'View on Playstore',
105105
textStyle:
106106
const TextStyle(fontSize: 16, color: GFColors.WHITE),

lib/components/accordian/gf_accordian.dart

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import 'package:flutter/material.dart';
2-
import 'package:getflutter/colors/gf_color.dart';
2+
import 'package:getflutter/getflutter.dart';
33

44
class GFAccordion extends StatefulWidget {
55
const GFAccordion(
66
{Key key,
77
this.child,
88
this.content,
9-
this.collapsedTitlebackgroundColor = Colors.white,
9+
this.collapsedTitlebackgroundColor = GFColors.WHITE,
1010
this.expandedTitlebackgroundColor = const Color(0xFFE0E0E0),
1111
this.collapsedIcon = const Icon(Icons.keyboard_arrow_down),
1212
this.expandedIcon = const Icon(Icons.keyboard_arrow_up),
@@ -16,8 +16,8 @@ class GFAccordion extends StatefulWidget {
1616
this.contentbackgroundColor,
1717
this.contentPadding = const EdgeInsets.all(10),
1818
this.contentChild,
19-
this.titleborderColor = const Border(),
20-
this.contentBorderColor = const Border(),
19+
this.titleborder = const Border(),
20+
this.contentBorder = const Border(),
2121
this.margin})
2222
: super(key: key);
2323

@@ -30,11 +30,11 @@ class GFAccordion extends StatefulWidget {
3030
/// contentChild of type [Widget]is alternative to content key. content will get priority over contentChild
3131
final Widget contentChild;
3232

33-
/// type of [Color] or [GFColor] which is used to change the background color of the [GFAccordion] title when it is collapsed
34-
final dynamic collapsedTitlebackgroundColor;
33+
/// type of [Color] or [GFColors] which is used to change the background color of the [GFAccordion] title when it is collapsed
34+
final Color collapsedTitlebackgroundColor;
3535

36-
/// type of [Color] or [GFColor] which is used to change the background color of the [GFAccordion] title when it is expanded
37-
final dynamic expandedTitlebackgroundColor;
36+
/// type of [Color] or [GFColors] which is used to change the background color of the [GFAccordion] title when it is expanded
37+
final Color expandedTitlebackgroundColor;
3838

3939
///collapsedIcon of type [Widget] which is used to show when the [GFAccordion] is collapsed
4040
final Widget collapsedIcon;
@@ -54,17 +54,17 @@ class GFAccordion extends StatefulWidget {
5454
///descriptionPadding of type [EdgeInsets] which is used to set the padding of the [GFAccordion] description
5555
final EdgeInsets contentPadding;
5656

57-
/// type of [Color] or [GFColor] which is used to change the background color of the [GFAccordion] description
58-
final dynamic contentbackgroundColor;
57+
/// type of [Color] or [GFColors] which is used to change the background color of the [GFAccordion] description
58+
final Color contentbackgroundColor;
5959

6060
///margin of type [EdgeInsets] which is used to set the margin of the [GFAccordion]
6161
final EdgeInsets margin;
6262

63-
///titleborderColor of type [Color] or [GFColor] which is used to change the border color of title
64-
final dynamic titleborderColor;
63+
///titleborderColor of type [Color] or [GFColors] which is used to change the border color of title
64+
final Border titleborder;
6565

66-
///contentBorderColor of type [Color] or [GFColor] which is used to change the border color of content
67-
final dynamic contentBorderColor;
66+
///contentBorderColor of type [Color] or [GFColors] which is used to change the border color of content
67+
final Border contentBorder;
6868

6969
@override
7070
_GFAccordionState createState() => _GFAccordionState();
@@ -128,7 +128,7 @@ class _GFAccordionState extends State<GFAccordion>
128128
},
129129
child: Container(
130130
decoration: BoxDecoration(
131-
border: widget.titleborderColor,
131+
border: widget.titleborder,
132132
color: showAccordion
133133
? widget.expandedTitlebackgroundColor
134134
: widget.collapsedTitlebackgroundColor,
@@ -150,7 +150,7 @@ class _GFAccordionState extends State<GFAccordion>
150150
showAccordion
151151
? Container(
152152
decoration: BoxDecoration(
153-
border: widget.contentBorderColor,
153+
border: widget.contentBorder,
154154
color: widget.contentbackgroundColor ?? Colors.white70,
155155
),
156156
width: MediaQuery.of(context).size.width,

lib/components/alert/gf_alert.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class GFAlert extends StatefulWidget {
3838
///type of [TextStyle] to change the style of the title not for the child
3939
final TextStyle titleTextStyle;
4040

41-
///pass color of type [Color] or [GFColor] for background of [GFAlert]
42-
final dynamic backgroundColor;
41+
///pass color of type [Color] or [GFColors] for background of [GFAlert]
42+
final Color backgroundColor;
4343

4444
///type of [TextStyle] to change the style of the content not for the contentchild
4545
final TextStyle contentTextStyle;

lib/components/floating_widget/gf_floating_widget.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class GFFloatingWidget extends StatefulWidget {
2626
/// verticalPosition of type [double] which aligns the child vertically across the body
2727
final double verticalPosition;
2828

29-
///blurnessColor of tye [Color] or [GFColor] which is used to blur the backgroundColor when ever the [child] is used in [GFFloatingWidget]
30-
final dynamic blurnessColor;
29+
///blurnessColor of tye [Color] or [GFColors] which is used to blur the backgroundColor when ever the [child] is used in [GFFloatingWidget]
30+
final Color blurnessColor;
3131

3232
///type of bool which allows to show or hide the blurness of the backgroundColor whenever the [child] is used in [GFFloatingWidget]
3333
final bool showblurness;

0 commit comments

Comments
 (0)