Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions example/lib/main_temp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,25 @@ class _MyHomePageState extends State<MyHomePage>
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
GFFloatingWidget(
child: GFToast(
text: 'This item already has the label “travel”',
autoDismiss: true,
),
body: Container(
color: Colors.blueAccent,
child: Text('body or any kind of widget here..'),
)),

GFAccordion(
titleChild: Text('fgk'),
contentChild: Text('hhjk'),
// title: 'GF Accordion',
// content: 'GetFlutter is an open source library that comes with pre-build 1000+ UI components.',
collapsedIcon: Text('Show'),
expandedIcon: Text('Hide')
),

// GFFloatingWidget(
// child: GFToast(
// text: 'This item already has the label “travel”',
// autoDismiss: true,
// ),
// body: Container(
// color: Colors.blueAccent,
// child: Text('body or any kind of widget here..'),
// )),

// GFRating(
// value: _rating,
Expand Down
10 changes: 5 additions & 5 deletions lib/components/accordian/gf_accordian.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:getflutter/getflutter.dart';
class GFAccordion extends StatefulWidget {
const GFAccordion(
{Key key,
this.child,
this.titleChild,
this.content,
this.collapsedTitlebackgroundColor = GFColors.WHITE,
this.expandedTitlebackgroundColor = const Color(0xFFE0E0E0),
Expand All @@ -21,8 +21,8 @@ class GFAccordion extends StatefulWidget {
this.margin})
: super(key: key);

/// child of type [Widget]is alternative to title key. title will get priority over child
final Widget child;
/// child of type [Widget]is alternative to title key. title will get priority over titleChild
final Widget titleChild;

/// content of type[String] which shows the messages after the [GFAccordion] is expanded
final String content;
Expand All @@ -42,7 +42,7 @@ class GFAccordion extends StatefulWidget {
///expandedIcon of type[Widget] which is used when the [GFAccordion] is expanded
final Widget expandedIcon;

/// text of type [String] is alternative to child. text will get priority over child
/// text of type [String] is alternative to child. text will get priority over titleChild
final String title;

/// textStyle of type [textStyle] will be applicable to text only and not for the child
Expand Down Expand Up @@ -140,7 +140,7 @@ class _GFAccordionState extends State<GFAccordion>
Expanded(
child: widget.title != null
? Text(widget.title, style: widget.textStyle)
: (widget.child ?? Container()),
: (widget.titleChild ?? Container()),
),
showAccordion ? widget.expandedIcon : widget.collapsedIcon
],
Expand Down
2 changes: 1 addition & 1 deletion lib/components/carousel/gf_carousel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class _GFCarouselState extends State<GFCarousel> with TickerProviderStateMixin {
scrollDirection: widget.scrollDirection,
controller: widget.pageController,
reverse: widget.reverse,
itemCount: widget.enableInfiniteScroll ? null : widget.items.length,
itemCount: widget.items.length == 1 ? widget.items.length : widget.enableInfiniteScroll ? null : widget.items.length,
onPageChanged: (int index) {
int currentPage;
currentPage = _getRealIndex(index + widget.initialPage,
Expand Down