Skip to content

Commit d7a2e83

Browse files
authored
Merge pull request #24 from ionicfirebaseapp/master
master pull
2 parents 03bcb9d + b224f20 commit d7a2e83

File tree

9 files changed

+323
-244
lines changed

9 files changed

+323
-244
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</a>
88
</p>
99

10-
[**GetFlutter**](https://www.getflutter.dev) is a 100% free Flutter open-source UI library that is built to make Flutter development easier and more joyful than ever. GetFlutter has 1000+ pre-build widgets that you can reuse to develop both Flutter mobile app and web app. Our motto is to provide the best Flutter UI library to the Flutter community to speed up their development process and build awesome apps with pre-build Flutter Library Components.
10+
[**GetFlutter**](https://www.getflutter.dev) is a 100% free Flutter open-source UI library built with <a href="https://flutter.dev/" target="_blank">Flutter SDK</a> to make Flutter development easier and more joyful than ever. GetFlutter has 1000+ pre-build widgets that you can reuse to develop both Flutter mobile app and web app. Our motto is to provide the best Flutter UI library to the Flutter community to speed up their development process and build awesome apps with pre-build Flutter Library Components.
1111

1212
## Table of contents
1313

@@ -78,7 +78,8 @@ Facebook: <https://www.facebook.com/getflutter>
7878
Linkedin: <https://www.linkedin.com/company/getflutter>
7979

8080
Instagram: <https://www.instagram.com/getflutter.dev/>
81-
81+
82+
### Note: GetFlutter is not directly and/or indirectly associated/affiliated with Flutter or Google LLC. We are the team of Flutter Developers and we built this open-source library for the Flutter development community to made app development more easier.
8283

8384
## Copyright-and-license
8485
Code and documentation Copyright 2017-2020 the [GETFLUTTER Authors](https://www.getflutter.dev) and [IONICFIREBASEAPP](https://ionicfirebaseapp.com) Code released under the [MIT License]. Docs released under [Creative Commons](https://creativecommons.org/licenses/by/3.0/).

example/lib/main.dart

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ class _MyHomePageState extends State<MyHomePage>
7474
Widget build(BuildContext context) {
7575
return Scaffold(
7676
drawer: GFDrawer(
77-
colorFilter: new ColorFilter.mode(
78-
Colors.black.withOpacity(0.6), BlendMode.darken),
79-
backgroundImage: NetworkImage(
80-
"https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg"),
77+
// colorFilter: new ColorFilter.mode(
78+
// Colors.teal.withOpacity(0.6), BlendMode.darken),
79+
// backgroundImage: NetworkImage(
80+
// "https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg"),
8181
gradient: LinearGradient(
8282
begin: Alignment.topRight,
8383
end: Alignment.bottomLeft,
@@ -89,6 +89,7 @@ class _MyHomePageState extends State<MyHomePage>
8989
Colors.teal[200],
9090
],
9191
),
92+
color: Colors.greenAccent,
9293
child: ListView(
9394
padding: EdgeInsets.zero,
9495
children: <Widget>[
@@ -99,7 +100,7 @@ class _MyHomePageState extends State<MyHomePage>
99100
"https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg"),
100101
),
101102
decoration: BoxDecoration(
102-
color: Colors.teal.withOpacity(0.45),
103+
color: Colors.teal,
103104
),
104105
otherAccountsPictures: <Widget>[
105106
Image(
@@ -111,24 +112,23 @@ class _MyHomePageState extends State<MyHomePage>
111112
child: Text("dcf"),
112113
)
113114
],
115+
// closeButton: Text("Close"),
114116
child: Column(
115117
mainAxisAlignment: MainAxisAlignment.start,
116118
crossAxisAlignment: CrossAxisAlignment.start,
117119
children: <Widget>[
118-
Text('user'),
119-
Text('user@asdf.com'),
120+
Text('user name'),
121+
Text('user@userid.com'),
120122
],
121123
),
122124
),
123125
ListTile(
124126
title: Text('Item 1'),
125-
onTap: () {
126-
Navigator.pop(context);
127-
},
127+
onTap: null,
128128
),
129129
ListTile(
130130
title: Text('Item 2'),
131-
onTap: () {},
131+
onTap: null,
132132
),
133133
],
134134
),
@@ -175,15 +175,17 @@ class _MyHomePageState extends State<MyHomePage>
175175
// Container(color: Colors.green),
176176
// Container(color: Colors.blue)
177177
// ]),
178+
179+
178180
SingleChildScrollView(
179181
child: Column(
180182
mainAxisAlignment: MainAxisAlignment.center,
181183
crossAxisAlignment: CrossAxisAlignment.center,
182184
children: <Widget>[
183185
GFSearchBar(
184186
searchList: list,
185-
hideSearchBoxWhenItemSelected: false,
186-
overlaySearchListHeight: 100.0,
187+
// hideSearchBoxWhenItemSelected: false,
188+
// overlaySearchListHeight: 100.0,
187189
searchQueryBuilder: (query, list) {
188190
return list
189191
.where((item) =>
@@ -192,17 +194,17 @@ class _MyHomePageState extends State<MyHomePage>
192194
},
193195
overlaySearchListItemBuilder: (item) {
194196
return Container(
195-
padding: const EdgeInsets.all(12),
197+
padding: const EdgeInsets.all(8),
196198
child: Text(
197199
item,
198200
style: const TextStyle(fontSize: 18),
199201
),
200202
);
201203
},
202-
noItemsFoundWidget: Container(
203-
color: Colors.green,
204-
child: Text("no items found"),
205-
),
204+
// noItemsFoundWidget: Container(
205+
// color: Colors.green,
206+
// child: Text("no items found..."),
207+
// ),
206208
onItemSelected: (item) {
207209
setState(() {
208210
print('ssssssss $item');
@@ -646,6 +648,7 @@ class _MyHomePageState extends State<MyHomePage>
646648
// ),
647649
//
648650
GFButton(
651+
// position: GFPosition.end,
649652
// icon: GFBadge(
650653
// child: Text("12"),
651654
// color: GFColor.dark,
@@ -662,9 +665,9 @@ class _MyHomePageState extends State<MyHomePage>
662665
// hoverColor: GFColor.dark,
663666
color: GFColor.secondary,
664667
// focusColor: GFColor.danger,
665-
type: GFButtonType.solid,
666-
shape: GFButtonShape.pills,
667-
buttonBoxShadow: true,
668+
// type: GFButtonType.solid,
669+
// shape: GFButtonShape.pills,
670+
// buttonBoxShadow: true,
668671
// boxShadow: BoxShadow(
669672
// color: Colors.pink,
670673
// blurRadius: 2.0,
@@ -676,7 +679,7 @@ class _MyHomePageState extends State<MyHomePage>
676679
// size: GFSize.large,
677680
// disabledColor: GFColor.dark,
678681
// disabledTextColor: GFColor.light,
679-
blockButton: true,
682+
// blockButton: true,
680683
// fullWidthButton: true,
681684
// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid),
682685
// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero),

lib/components/accordian/gf_accordian.dart

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ class GFAccordion extends StatefulWidget {
88
this.content,
99
this.titlebackgroundColor,
1010
this.collapsedIcon = const Icon(Icons.keyboard_arrow_down),
11-
this.expandedIcon =
12-
const Icon(Icons.keyboard_arrow_up, color: Colors.red),
11+
this.expandedIcon = const Icon(Icons.keyboard_arrow_up),
1312
this.title,
1413
this.textStyle = const TextStyle(color: Colors.black, fontSize: 16),
1514
this.titlePadding,
16-
this.descriptionPadding,
17-
this.descriptionbackgroundColor,
15+
this.contentbackgroundColor,
16+
this.contentPadding,
1817
this.contentChild,
18+
this.titleborderColor,
19+
this.contentBorderColor,
1920
this.margin})
2021
: super(key: key);
2122

@@ -47,14 +48,20 @@ class GFAccordion extends StatefulWidget {
4748
final EdgeInsets titlePadding;
4849

4950
///descriptionPadding of type [EdgeInsets] which is used to set the padding of the [GFAccordion] description
50-
final EdgeInsets descriptionPadding;
51+
final EdgeInsets contentPadding;
5152

5253
/// type of [Color] or [GFColor] which is used to change the background color of the [GFAccordion] description
53-
final dynamic descriptionbackgroundColor;
54+
final dynamic contentbackgroundColor;
5455

5556
///margin of type [EdgeInsets] which is used to set the margin of the [GFAccordion]
5657
final EdgeInsets margin;
5758

59+
///titleborderColor of type [Color] or [GFColor] which is used to change the border color of title
60+
final dynamic titleborderColor;
61+
62+
///contentBorderColor of type [Color] or [GFColor] which is used to change the border color of content
63+
final dynamic contentBorderColor;
64+
5865
@override
5966
_GFAccordionState createState() => _GFAccordionState();
6067
}
@@ -105,9 +112,19 @@ class _GFAccordionState extends State<GFAccordion>
105112
});
106113
},
107114
child: Container(
108-
color: widget.titlebackgroundColor != null
109-
? widget.titlebackgroundColor
110-
: Colors.white,
115+
decoration: BoxDecoration(
116+
border: widget.titleborderColor == null
117+
? widget.titleborderColor
118+
: Border(
119+
top: BorderSide(color: Colors.black38),
120+
left: BorderSide(color: Colors.black38),
121+
right: BorderSide(color: Colors.black38),
122+
bottom: BorderSide(color: Colors.black38)),
123+
color: showAccordion
124+
? widget.titlebackgroundColor != null
125+
? widget.titlebackgroundColor
126+
: Color(0xFFE0E0E0)
127+
: widget.titlebackgroundColor),
111128
padding: widget.titlePadding != null
112129
? widget.titlePadding
113130
: EdgeInsets.all(10),
@@ -126,12 +143,20 @@ class _GFAccordionState extends State<GFAccordion>
126143
),
127144
showAccordion
128145
? Container(
146+
decoration: BoxDecoration(
147+
border: widget.contentBorderColor == null
148+
? widget.contentBorderColor
149+
: Border(
150+
bottom: BorderSide(color: Colors.black38),
151+
left: BorderSide(color: Colors.black38),
152+
right: BorderSide(color: Colors.black38)),
153+
color: widget.contentbackgroundColor != null
154+
? widget.contentbackgroundColor
155+
: Colors.white70,
156+
),
129157
width: MediaQuery.of(context).size.width,
130-
color: widget.descriptionbackgroundColor != null
131-
? widget.descriptionbackgroundColor
132-
: Colors.white70,
133-
padding: widget.descriptionPadding != null
134-
? widget.descriptionPadding
158+
padding: widget.contentPadding != null
159+
? widget.contentPadding
135160
: EdgeInsets.all(10),
136161
child: SlideTransition(
137162
position: offset,

lib/components/alert/gf_alert.dart

Lines changed: 51 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class GFAlert extends StatefulWidget {
5656

5757
///type of [Widget] used for the buttons ie, OK, Cancel for the action in [GFAlert]
5858
final Widget bottombar;
59+
5960
@override
6061
_GFAlertState createState() => _GFAlertState();
6162
}
@@ -83,66 +84,58 @@ class _GFAlertState extends State<GFAlert> with TickerProviderStateMixin {
8384

8485
@override
8586
Widget build(BuildContext context) {
86-
return Stack(
87-
children: <Widget>[
88-
Container(
89-
height: MediaQuery.of(context).size.height,
90-
),
91-
FadeTransition(
92-
opacity: animation,
93-
child: Column(
94-
children: <Widget>[
95-
Container(
96-
width: widget.type == GFAlertType.fullWidth
97-
? MediaQuery.of(context).size.width
98-
: widget.width,
99-
constraints: BoxConstraints(minHeight: 50.0),
100-
margin: widget.type == GFAlertType.fullWidth
101-
? EdgeInsets.only(left: 0, right: 0)
102-
: EdgeInsets.only(left: 20, right: 20),
103-
padding: EdgeInsets.all(15),
104-
decoration: BoxDecoration(
105-
borderRadius: widget.type == GFAlertType.basic
106-
? BorderRadius.circular(3.0)
107-
: widget.type == GFAlertType.rounded
108-
? BorderRadius.circular(10.0)
109-
: BorderRadius.zero,
110-
color: widget.backgroundColor != null
111-
? GFColors.getGFColor(widget.backgroundColor)
112-
: GFColors.getGFColor(GFColor.white),
113-
boxShadow: [
114-
BoxShadow(
115-
color: Colors.black.withOpacity(0.40),
116-
blurRadius: 3.0)
117-
]),
118-
child: Column(
119-
crossAxisAlignment: CrossAxisAlignment.start,
120-
children: <Widget>[
121-
widget.title != null
122-
? Text(widget.title, style: widget.titleTextStyle)
123-
: (widget.child ?? Container()),
124-
SizedBox(
125-
height: 10,
126-
),
127-
Align(
128-
alignment: widget.alignment != null
129-
? widget.alignment
130-
: Alignment.topLeft,
131-
child: widget.content != null
132-
? Text(widget.content, style: widget.textStyle)
133-
: (widget.contentChild ?? Container()),
134-
),
135-
SizedBox(
136-
height: 10,
137-
),
138-
widget.bottombar != null ? widget.bottombar : Container(),
139-
],
87+
return FadeTransition(
88+
opacity: animation,
89+
child: Column(
90+
children: <Widget>[
91+
Container(
92+
width: widget.type == GFAlertType.fullWidth
93+
? MediaQuery.of(context).size.width
94+
: widget.width,
95+
constraints: BoxConstraints(minHeight: 50.0),
96+
margin: widget.type == GFAlertType.fullWidth
97+
? EdgeInsets.only(left: 0, right: 0)
98+
: EdgeInsets.only(left: 20, right: 20),
99+
padding: EdgeInsets.all(15),
100+
decoration: BoxDecoration(
101+
borderRadius: widget.type == GFAlertType.basic
102+
? BorderRadius.circular(3.0)
103+
: widget.type == GFAlertType.rounded
104+
? BorderRadius.circular(10.0)
105+
: BorderRadius.zero,
106+
color: widget.backgroundColor != null
107+
? GFColors.getGFColor(widget.backgroundColor)
108+
: GFColors.getGFColor(GFColor.white),
109+
boxShadow: [
110+
BoxShadow(
111+
color: Colors.black.withOpacity(0.40), blurRadius: 3.0)
112+
]),
113+
child: Column(
114+
crossAxisAlignment: CrossAxisAlignment.start,
115+
children: <Widget>[
116+
widget.title != null
117+
? Text(widget.title, style: widget.titleTextStyle)
118+
: (widget.child ?? Container()),
119+
SizedBox(
120+
height: 10,
121+
),
122+
Align(
123+
alignment: widget.alignment != null
124+
? widget.alignment
125+
: Alignment.topLeft,
126+
child: widget.content != null
127+
? Text(widget.content, style: widget.textStyle)
128+
: (widget.contentChild ?? Container()),
129+
),
130+
SizedBox(
131+
height: 10,
140132
),
141-
),
142-
],
133+
widget.bottombar != null ? widget.bottombar : Container(),
134+
],
135+
),
143136
),
144-
),
145-
],
137+
],
138+
),
146139
);
147140
}
148141
}

0 commit comments

Comments
 (0)