From ba425baaaaaf4378ef060b2962ef366ff381569c Mon Sep 17 00:00:00 2001 From: deepikahr Date: Tue, 24 Dec 2019 15:28:36 +0530 Subject: [PATCH 1/4] slider component created --- example/lib/assets/food.jpeg | Bin 0 -> 34410 bytes example/lib/main.dart | 885 +++++++++++++++++++-------- example/pubspec.yaml | 6 +- lib/components/slider/gf_slider.dart | 285 +++++++++ lib/components/toggle/gf_toggle.dart | 4 +- 5 files changed, 908 insertions(+), 272 deletions(-) create mode 100644 example/lib/assets/food.jpeg create mode 100644 lib/components/slider/gf_slider.dart diff --git a/example/lib/assets/food.jpeg b/example/lib/assets/food.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..09f1fcefb4bcec584f22df721d16900423ec4c07 GIT binary patch literal 34410 zcmb@tW0YjUvoBh0+qP}nwr$(fwmEIvwtJ>++wPvWjobfo?t15bc=ywLnYGvct;ndz ztlUwNfvWG-?_B_*w78Tw00;;OAo3^08{`jBNG=#Aw@-5!2h*9E&p);v<15V$ojvs{l5=D zo0_?p{0x2kT>2)C&aMCeknRtL@o;tg54QZlsKz$`g?;{moqrbiLr?e*w)k&c{9io( zjobf=M^#zmhiCE!3tIdi*!cgz|9jpa766C|^M7vt|29`M&!6=J08*L&z<>7izoq}r zUi}XZ1pQ|TEI-ep_PY2KlcfsF%T25BuE>WCqw}>B^*|wTdD+ROr9ihFeMMYOB=^uV37@(KGjxzz6%5Y z7{9;2Hvl03FmP}PC(`d$Y>{`bgqJ`ueJ?SNME{^1JQdPmqevB6bSm0I>}r&t^N{dP;J{u929 z6R9c=anJ;NR%+<2!pXcc4Y3|ZIW_NNND~64`N9hO1-7@}=v^}h#aN*v`&-a-(=e55 zOdHib5Vvwn>(H2W7gzUEMygV$i*d9ueN*`H(pwM$?}_ZqRP?pmGFbg-B1ftg8V>6Y z9Sa4MO_r(BGalcQO3Yl; zX6_sJNDj;Uv&8D*nU99f8oSKc`NMi|WAdN^!y(oC289Pwr&k*Sbq8j5nl#=(fVq;} z>fIe1j$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L2tQGI6Jg#}R^LxHZagS3U2?*M<57B(vy=oq1ZasoZk&E|E{RSLmC9qcyE zjNXtcQHeQ4`fi)d`D95TAoT&Hk}CP}F&j&PQT0!JWLMq?Z%N0^GA z!X#o0PID`@b5CeoTx7_SjZRWx6c19Q5eohC8-@eFwaV<9cU+*+a4Z+@VjQ|OPz8yH zghV}%?p+oha&l$_a^PVQF!H-Ei=M?0ZV?9UFn9v%kU;yV7}ZO@NHkM^4LGxg#|Z|K zeGqeVILW0fE%Q)sz!n;WT;xm{L=q~pN5IXcQE<}8=FCmdi4QhJK_%O)5`T#qf^J6U zpP)qKAPrnVS@ULb7v;gjaDIpV@WZE;{YoVqNAC?D>QjT91HqjMj#8k(ye7_2b=G+- zScuI6EdrcFRW5-SQ}6~H%!>M_m$pF=iC}Z3Zq2Y?CyRqwc(hJ;K>A9O%4 zO0=LwilI<$c29Ez(8ExX1j#DWvz^Qis+?ASrGYJyiB$ x6^P`3I&grb@PIr>xyDZtiQN#TLX+`M59!56na56&v*Nx<)R`zdRVwfo|JlFGJzoF- literal 0 HcmV?d00001 diff --git a/example/lib/main.dart b/example/lib/main.dart index a61dfa18..527914ae 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,294 +1,643 @@ -import 'package:flutter/cupertino.dart'; +import 'package:ui_kit/components/slider/gf_slider.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/painting.dart'; -import 'package:ui_kit/components/button/gf_button.dart'; -import 'package:ui_kit/components/button/gf_icon_button.dart'; -import 'package:ui_kit/components/badge/gf_button_badge.dart'; -import 'package:ui_kit/components/badge/gf_icon_badge.dart'; -import 'package:ui_kit/components/avatar/gf_avatar.dart'; -import 'package:ui_kit/components/badge/gf_badge.dart'; -import 'package:ui_kit/components/card/gf_card.dart'; -import 'package:ui_kit/components/header_bar/gf_title_bar.dart'; -import 'package:ui_kit/components/button_bar/gf_button_bar.dart'; -import 'package:ui_kit/position/gf_position.dart'; -import 'package:ui_kit/types/gf_type.dart'; -import 'package:ui_kit/components/image/gf_image_overlay.dart'; -import 'package:ui_kit/shape/gf_shape.dart'; -void main() => runApp(MyApp()); +final List imgList = [ + 'https://images.unsplash.com/photo-1520342868574-5fa3804e551c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=6ff92caffcdd63681a35134a6770ed3b&auto=format&fit=crop&w=1951&q=80', + 'https://images.unsplash.com/photo-1522205408450-add114ad53fe?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=368f45b0888aeb0b7b08e3a1084d3ede&auto=format&fit=crop&w=1950&q=80', + 'https://images.unsplash.com/photo-1519125323398-675f0ddb6308?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=94a1e718d89ca60a6337a6008341ca50&auto=format&fit=crop&w=1950&q=80', + 'https://images.unsplash.com/photo-1523205771623-e0faa4d2813d?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=89719a0d55dd05e2deae4120227e6efc&auto=format&fit=crop&w=1953&q=80', + 'https://images.unsplash.com/photo-1508704019882-f9cf40e475b4?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=8c6e5e3aba713b17aa1fe71ab4f0ae5b&auto=format&fit=crop&w=1352&q=80', + 'https://images.unsplash.com/photo-1519985176271-adb1088fa94c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=a0c8d632e977f94e5d312d9893258f59&auto=format&fit=crop&w=1355&q=80' +]; -class MyApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'UI_KIT_EXAMPLE', - theme: ThemeData( - primarySwatch: Colors.blue, +void main() => runApp(CarouselDemo()); + +final Widget placeholder = Container(color: Colors.grey); + +final List child = map( + imgList, + (index, i) { + return Container( + margin: EdgeInsets.all(5.0), + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + child: Stack(children: [ + Image.network(i, fit: BoxFit.cover, width: 1000.0), + Positioned( + bottom: 0.0, + left: 0.0, + right: 0.0, + child: Container( + decoration: BoxDecoration( + gradient: LinearGradient( + colors: [Color.fromARGB(200, 0, 0, 0), Color.fromARGB(0, 0, 0, 0)], + begin: Alignment.bottomCenter, + end: Alignment.topCenter, + ), + ), + padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0), + child: Text( + 'No. $index image', + style: TextStyle( + color: Colors.white, + fontSize: 20.0, + fontWeight: FontWeight.bold, + ), + ), + ), + ), + ]), ), - home: MyHomePage(title: 'UI_KIT_EXAMPLE'), ); + }, +).toList(); + +List map(List list, Function handler) { + List result = []; + for (var i = 0; i < list.length; i++) { + result.add(handler(i, list[i])); } + + return result; } -class MyHomePage extends StatefulWidget { - MyHomePage({Key key, this.title}) : super(key: key); +class CarouselWithIndicator extends StatefulWidget { + @override + _CarouselWithIndicatorState createState() => _CarouselWithIndicatorState(); +} - final String title; +class _CarouselWithIndicatorState extends State { + int _current = 0; @override - _MyHomePageState createState() => _MyHomePageState(); + Widget build(BuildContext context) { + return Column(children: [ + GFSlider( + items: child, + autoPlay: true, + enlargeCenterPage: true, + aspectRatio: 2.0, + onPageChanged: (index) { + setState(() { + _current = index; + }); + }, + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: map( + imgList, + (index, url) { + return Container( + width: 8.0, + height: 8.0, + margin: EdgeInsets.symmetric(vertical: 10.0, horizontal: 2.0), + decoration: BoxDecoration( + shape: BoxShape.circle, + color: _current == index + ? Color.fromRGBO(0, 0, 0, 0.9) + : Color.fromRGBO(0, 0, 0, 0.4)), + ); + }, + ), + ), + ]); + } } -class _MyHomePageState extends State { +class CarouselDemo extends StatelessWidget { @override Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), - body: SingleChildScrollView( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - GFCard( - boxFit: BoxFit.cover, - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(0.67), BlendMode.darken), - image: Image.asset("lib/assets/pizza.jpeg"), -// imageOverlay: AssetImage("lib/assets/pizza.jpeg"), - titlePosition: GFPosition.end, - title: GFTitleBar( - avatar: GFAvatar( - child: Text("tb"), - ), - title: Text( - 'title', - style: TextStyle(color: Colors.grey), - ), - subTitle: Text( - 'subtitle', - style: TextStyle(color: Colors.grey), - ), - icon: GFIconButton( - onPressed: null, - icon: Icon(Icons.favorite_border), - type: GFType.transparent, - ), - ), - content: Text( - "Flutter " - "Flutter is Google's mobile UI framework for crafting" - " high-quality native interfaces on iOS and Android in " - "Flutter ", - style: TextStyle(color: Colors.grey), - ), - buttonBar: GFButtonBar( - mainAxisSize: MainAxisSize.min, - children: [ - GFButton( - onPressed: null, - child: Text("favorite"), - icon: Icon(Icons.favorite_border), - type: GFType.transparent, - ), - GFButton( - onPressed: null, - child: Text("share"), - icon: Icon(Icons.share), - type: GFType.outline, - ), - ], - ), + //Manually operated Carousel + final GFSlider manualCarouselDemo = GFSlider( + items: child, + autoPlay: false, + enlargeCenterPage: true, + viewportFraction: 0.9, + aspectRatio: 2.0, + ); + + //Auto playing carousel + final GFSlider autoPlayDemo = GFSlider( + viewportFraction: 0.9, + aspectRatio: 2.0, + autoPlay: true, + enlargeCenterPage: true, + items: imgList.map( + (url) { + return Container( + margin: EdgeInsets.all(5.0), + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + child: Image.network( + url, + fit: BoxFit.cover, + width: 1000.0, ), + ), + ); + }, + ).toList(), + ); -// GFButtonBar( -// mainAxisSize: MainAxisSize.min, -// children: [ -// GFButton(onPressed: null, child: Text("like"), icon: Icon(Icons.favorite_border), type: GFType.transparent,), -// GFButton(onPressed: null, child: Text("comment"),), -// GFButton(onPressed: null, child: Text("share"), icon: Icon(Icons.share), type: GFType.outline,), -// ], -// ), -// -// GFTitleBar( -// avatar: GFAvatar( -// child: Text("tb"), -// ), -// title: Text('title'), -// subTitle: Text('subtitle'), -// icon: GFIconButton( -// onPressed: null, -// type: GFType.transparent, -// icon: Icon(Icons.favorite_border), -// ), -// ), + //Button controlled carousel + Widget buttonDemo() { + final basicSlider = GFSlider( + items: child, + autoPlay: false, + enlargeCenterPage: true, + viewportFraction: 0.9, + aspectRatio: 2.0, + ); + return Column(children: [ + basicSlider, + Row(children: [ + Expanded( + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 15.0), + child: RaisedButton( + onPressed: () => basicSlider.previousPage( + duration: Duration(milliseconds: 300), curve: Curves.linear), + child: Text('prev slider'), + ), + ), + ), + Expanded( + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 15.0), + child: RaisedButton( + onPressed: () => basicSlider.nextPage( + duration: Duration(milliseconds: 300), curve: Curves.linear), + child: Text('next slider'), + ), + ), + ), + ]), + ]); + } + + //Pages covers entire carousel + final GFSlider coverScreenExample = GFSlider( + viewportFraction: 1.0, + aspectRatio: 2.0, + autoPlay: false, + enlargeCenterPage: false, + items: map( + imgList, + (index, i) { + return Container( + decoration: BoxDecoration( + image: DecorationImage(image: NetworkImage(i), fit: BoxFit.cover), + ), + ); + }, + ), + ); + + //User input pauses carousels automatic playback + final GFSlider touchDetectionDemo = GFSlider( + viewportFraction: 0.9, + aspectRatio: 2.0, + autoPlay: true, + enlargeCenterPage: true, + pauseAutoPlayOnTouch: Duration(seconds: 3), + items: imgList.map( + (url) { + return Container( + margin: EdgeInsets.all(5.0), + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + child: Image.network( + url, + fit: BoxFit.cover, + width: 1000.0, + ), + ), + ); + }, + ).toList(), + ); + + //Non-looping manual Carousel + final GFSlider nonLoopingCarousel = GFSlider( + items: child, + scrollPhysics: BouncingScrollPhysics(), + enableInfiniteScroll: false, + autoPlay: false, + enlargeCenterPage: true, + viewportFraction: 0.9, + aspectRatio: 2.0, + ); + + //Vertical carousel + final GFSlider verticalScrollCarousel = GFSlider( + scrollDirection: Axis.vertical, + aspectRatio: 2.0, + autoPlay: true, + enlargeCenterPage: true, + viewportFraction: 0.9, + pauseAutoPlayOnTouch: Duration(seconds: 3), + items: imgList.map( + (url) { + return Container( + margin: EdgeInsets.all(5.0), + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + child: Image.network( + url, + fit: BoxFit.cover, + width: 1000.0, + ), + ), + ); + }, + ).toList(), + ); - GFImageOverlay( - width: MediaQuery.of(context).size.width, - margin: EdgeInsets.all(16.0), - padding: EdgeInsets.all(16.0), - child: Column( - children: [ - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - ], + //create full screen Carousel with context + GFSlider getFullScreenCarousel(BuildContext mediaContext) { + return GFSlider( + autoPlay: true, + viewportFraction: 1.0, + aspectRatio: MediaQuery.of(mediaContext).size.aspectRatio, + items: imgList.map( + (url) { + return Container( + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(0.0)), + child: Image.network( + url, + fit: BoxFit.cover, + width: 1000.0, ), -// color: Colors.orange, - image: AssetImage("lib/assets/pizza.jpeg"), - boxFit: BoxFit.cover, - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(0.6), BlendMode.darken), - borderRadius: new BorderRadius.circular(5.0), -// border: Border.all(color: Colors.pink, width: 2.0), ), + ); + }, + ).toList(), + ); + } + + return MaterialApp( + title: 'demo', + home: Scaffold( + appBar: AppBar(title: Text('Carousel slider demo')), + body: ListView( + children: [ +// Padding( +// padding: EdgeInsets.symmetric(vertical: 15.0), +// child: Column(children: [ +// Text('Manuell Carousel'), +// manualCarouselDemo, +// ])), + Padding( + padding: EdgeInsets.symmetric(vertical: 15.0), + child: Column(children: [ + Text('Auto Playing Carousel'), + autoPlayDemo, + ])), +// Padding( +// padding: EdgeInsets.symmetric(vertical: 15.0), +// child: Column(children: [ +// Text('Button Controlled Carousel'), +// buttonDemo(), +// ])), +// Padding( +// padding: EdgeInsets.symmetric(vertical: 15.0), +// child: Column(children: [ +// Text('Full Screen Carousel'), +// coverScreenExample, +// ])), +// Padding( +// padding: EdgeInsets.symmetric(vertical: 15.0), +// child: Column(children: [ +// Text('Carousel With Indecator'), +// CarouselWithIndicator(), +// ])), +// Padding( +// padding: EdgeInsets.symmetric(vertical: 15.0), +// child: Column(children: [ +// Text('Pause When Touched Carousel'), +// touchDetectionDemo, +// ])), +// Padding( +// padding: EdgeInsets.symmetric(vertical: 15.0), +// child: Column(children: [ +// Text('No infinity scroll carousel'), +// nonLoopingCarousel, +// ])), +// Padding( +// padding: EdgeInsets.symmetric(vertical: 15.0), +// child: Column(children: [ +// Text('Vertical scroll carousel'), +// verticalScrollCarousel, +// ])), +// Padding( +// padding: EdgeInsets.only(top: 15.0), +// //Builder needed to provide mediaQuery context from material app +// child: Builder(builder: (context) { +// return Column(children: [ +// Text('Full screen carousel'), +// getFullScreenCarousel(context), +// ]); +// })), + ], + ), + ), + ); + } +} +//import 'package:flutter/cupertino.dart'; +//import 'package:flutter/material.dart'; +//import 'package:flutter/painting.dart'; +//import 'package:ui_kit/components/button/gf_button.dart'; +//import 'package:ui_kit/components/button/gf_icon_button.dart'; +//import 'package:ui_kit/components/badge/gf_button_badge.dart'; +//import 'package:ui_kit/components/badge/gf_icon_badge.dart'; +//import 'package:ui_kit/components/avatar/gf_avatar.dart'; +//import 'package:ui_kit/components/badge/gf_badge.dart'; +//import 'package:ui_kit/components/card/gf_card.dart'; +//import 'package:ui_kit/components/header_bar/gf_title_bar.dart'; +//import 'package:ui_kit/components/button_bar/gf_button_bar.dart'; +//import 'package:ui_kit/position/gf_position.dart'; +//import 'package:ui_kit/types/gf_type.dart'; +//import 'package:ui_kit/components/image/gf_image_overlay.dart'; +//import 'package:ui_kit/shape/gf_shape.dart'; +// +//void main() => runApp(MyApp()); +// +//class MyApp extends StatelessWidget { +// @override +// Widget build(BuildContext context) { +// return MaterialApp( +// title: 'UI_KIT_EXAMPLE', +// theme: ThemeData( +// primarySwatch: Colors.blue, +// ), +// home: MyHomePage(title: 'UI_KIT_EXAMPLE'), +// ); +// } +//} +// +//class MyHomePage extends StatefulWidget { +// MyHomePage({Key key, this.title}) : super(key: key); +// +// final String title; +// +// @override +// _MyHomePageState createState() => _MyHomePageState(); +//} // -// GFAvatar( -//// radius: 40.0, -// child: Text("de"), -// backgroundColor: Colors.pink, -//// backgroundImage: , -//// foregroundColor: Colors.deepOrangeAccent, -//// shape: GFShape.square, -//// size: GFSize.medium, -//// borderRadius: BorderRadius.circular(20.0), -// ), -// GFIconBadges( -// onPressed: null, -// child: GFIconButton( -// onPressed: null, -// icon: Icon(Icons.ac_unit), +//class _MyHomePageState extends State { +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// appBar: AppBar( +// title: Text(widget.title), +// ), +// body: SingleChildScrollView( +// child: Column( +// mainAxisAlignment: MainAxisAlignment.center, +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// GFCard( +// boxFit: BoxFit.cover, +// colorFilter: new ColorFilter.mode( +// Colors.black.withOpacity(0.67), BlendMode.darken), +// image: Image.asset("lib/assets/food.jpeg"), +//// imageOverlay: AssetImage("lib/assets/food.jpeg"), +// titlePosition: GFPosition.end, +// title: GFTitleBar( +// avatar: GFAvatar( +// child: Text("tb"), +// ), +// title: Text( +// 'title', +// style: TextStyle(color: Colors.grey), +// ), +// subTitle: Text( +// 'subtitle', +// style: TextStyle(color: Colors.grey), +// ), +// icon: GFIconButton( +// onPressed: null, +// icon: Icon(Icons.favorite_border), +// type: GFType.transparent, +// ), +// ), +// content: Text( +// "Flutter " +// "Flutter is Google's mobile UI framework for crafting" +// " high-quality native interfaces on iOS and Android in " +// "Flutter ", +// style: TextStyle(color: Colors.grey), +// ), +// buttonBar: GFButtonBar( +// mainAxisSize: MainAxisSize.min, +// children: [ +// GFButton( +// onPressed: null, +// child: Text("favorite"), +// icon: Icon(Icons.favorite_border), +// type: GFType.transparent, +// ), +// GFButton( +// onPressed: null, +// child: Text("share"), +// icon: Icon(Icons.share), +// type: GFType.outline, +// ), +// ], +// ), // ), -// counterChild: GFBadge( -// text: '12', -//// color: GFColor.dark, -//// shape: GFShape.circle, -//// size: GFSize.small, -//// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -//// textColor: GFColor.white, -//// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), -//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.orange, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +// +//// GFButtonBar( +//// mainAxisSize: MainAxisSize.min, +//// children: [ +//// GFButton(onPressed: null, child: Text("like"), icon: Icon(Icons.favorite_border), type: GFType.transparent,), +//// GFButton(onPressed: null, child: Text("comment"),), +//// GFButton(onPressed: null, child: Text("share"), icon: Icon(Icons.share), type: GFType.outline,), +//// ], +//// ), +//// +//// GFTitleBar( +//// avatar: GFAvatar( +//// child: Text("tb"), +//// ), +//// title: Text('title'), +//// subTitle: Text('subtitle'), +//// icon: GFIconButton( +//// onPressed: null, +//// type: GFType.transparent, +//// icon: Icon(Icons.favorite_border), +//// ), +//// ), +// +// GFImageOverlay( +// width: MediaQuery.of(context).size.width, +// margin: EdgeInsets.all(16.0), +// padding: EdgeInsets.all(16.0), +// child: Column( +// children: [ +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// ], +// ), +//// color: Colors.orange, +// image: AssetImage("lib/assets/food.jpeg"), +// boxFit: BoxFit.cover, +// colorFilter: new ColorFilter.mode( +// Colors.black.withOpacity(0.6), BlendMode.darken), +// borderRadius: new BorderRadius.circular(5.0), +//// border: Border.all(color: Colors.pink, width: 2.0), // ), -// ), -// GFIconButton( -// onPressed: null, -// icon: Icon(Icons.ac_unit), -//// iconSize: 12.0, -//// type: GFType.solid, -//// shape: GFShape.pills, -//// size: GFSize.large, -//// buttonBoxShadow: true, -//// color: GFColor.primary, -//// boxShadow: BoxShadow( -//// color: Colors.pink, -//// blurRadius: 2.0, -//// spreadRadius: 1.0, -//// offset: Offset.zero, +// +//// +//// GFAvatar( +////// radius: 40.0, +//// child: Text("de"), +//// backgroundColor: Colors.pink, +////// backgroundImage: , +////// foregroundColor: Colors.deepOrangeAccent, +////// shape: GFShape.square, +////// size: GFSize.medium, +////// borderRadius: BorderRadius.circular(20.0), +//// ), +//// GFIconBadges( +//// onPressed: null, +//// child: GFIconButton( +//// onPressed: null, +//// icon: Icon(Icons.ac_unit), //// ), -//// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), -// ), -// GFButtonBadge( -// onPressed: null, -//// position: GFIconPosition.start, -//// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), -// text: 'goodies', -//// color: GFColor.danger, -//// shape: GFShape.pills, -//// type: GFType.outline, -//// size: GFSize.small, -// counterChild: GFBadge( -// child: Text("12"), -//// color: GFColor.dark, -//// shape: GFShape.circle, -//// size: GFSize.small, -//// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -//// textColor: GFColor.white, -//// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), -// ), -// ), -// GFBadge( -// text: '12', -//// color: GFColor.dark, -//// shape: GFShape.circle, -//// size: GFSize.small, -//// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -//// textColor: GFColor.white, -//// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), -// ), -// GFButton( -//// type: GFType.solid, -//// shape: GFShape.pills, -// text: 'goodies', -// onPressed: () {}, -//// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), -//// size: GFSize.large, -//// buttonBoxShadow: true, -//// blockButton: true, -//// fullWidthButton: true, -//// color: GFColor.primary, -//// textColor: GFColor.secondary, -//// icon: Icon(Icons.error, color: Colors.white,), -//// position: GFIconPosition.start, -//// boxShadow: BoxShadow( -//// color: Colors.pink, -//// blurRadius: 2.0, -//// spreadRadius: 1.0, -//// offset: Offset.zero, +//// counterChild: GFBadge( +//// text: '12', +////// color: GFColor.dark, +////// shape: GFShape.circle, +////// size: GFSize.small, +////// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +////// textColor: GFColor.white, +////// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), +////// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.orange, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), //// ), -//// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), -// ), - ], - ), - )); - } -} +//// ), +//// GFIconButton( +//// onPressed: null, +//// icon: Icon(Icons.ac_unit), +////// iconSize: 12.0, +////// type: GFType.solid, +////// shape: GFShape.pills, +////// size: GFSize.large, +////// buttonBoxShadow: true, +////// color: GFColor.primary, +////// boxShadow: BoxShadow( +////// color: Colors.pink, +////// blurRadius: 2.0, +////// spreadRadius: 1.0, +////// offset: Offset.zero, +////// ), +////// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +////// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +//// ), +//// GFButtonBadge( +//// onPressed: null, +////// position: GFIconPosition.start, +////// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +////// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +//// text: 'goodies', +////// color: GFColor.danger, +////// shape: GFShape.pills, +////// type: GFType.outline, +////// size: GFSize.small, +//// counterChild: GFBadge( +//// child: Text("12"), +////// color: GFColor.dark, +////// shape: GFShape.circle, +////// size: GFSize.small, +////// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +////// textColor: GFColor.white, +////// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), +//// ), +//// ), +//// GFBadge( +//// text: '12', +////// color: GFColor.dark, +////// shape: GFShape.circle, +////// size: GFSize.small, +////// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +////// textColor: GFColor.white, +////// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), +//// ), +//// GFButton( +////// type: GFType.solid, +////// shape: GFShape.pills, +//// text: 'goodies', +//// onPressed: () {}, +////// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), +////// size: GFSize.large, +////// buttonBoxShadow: true, +////// blockButton: true, +////// fullWidthButton: true, +////// color: GFColor.primary, +////// textColor: GFColor.secondary, +////// icon: Icon(Icons.error, color: Colors.white,), +////// position: GFIconPosition.start, +////// boxShadow: BoxShadow( +////// color: Colors.pink, +////// blurRadius: 2.0, +////// spreadRadius: 1.0, +////// offset: Offset.zero, +////// ), +////// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +////// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +//// ), +// ], +// ), +// )); +// } +//} diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 95eca7a1..4ebcc8a4 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,4 +1,4 @@ -name: ui_kit_example +name: example description: A new Flutter project. version: 1.0.0+1 @@ -19,4 +19,6 @@ dev_dependencies: sdk: flutter flutter: - uses-material-design: true \ No newline at end of file + uses-material-design: true + assets: + - lib/assets/food.jpeg \ No newline at end of file diff --git a/lib/components/slider/gf_slider.dart b/lib/components/slider/gf_slider.dart new file mode 100644 index 00000000..1f74c2d0 --- /dev/null +++ b/lib/components/slider/gf_slider.dart @@ -0,0 +1,285 @@ +import 'dart:async'; +import 'package:flutter/material.dart'; + +class GFSlider extends StatefulWidget { + GFSlider( + {@required this.items, + this.height, + this.aspectRatio: 16 / 9, + this.viewportFraction: 0.8, + this.initialPage: 0, + int realPage: 10000, + this.enableInfiniteScroll: true, + this.reverse: false, + this.autoPlay: false, + this.autoPlayInterval: const Duration(seconds: 4), + this.autoPlayAnimationDuration = const Duration(milliseconds: 800), + this.autoPlayCurve: Curves.fastOutSlowIn, + this.pauseAutoPlayOnTouch, + this.enlargeCenterPage = false, + this.onPageChanged, + this.scrollPhysics, + this.scrollDirection: Axis.horizontal}) + : this.realPage = enableInfiniteScroll ? realPage + initialPage : initialPage, + this.pageController = PageController( + viewportFraction: viewportFraction, + initialPage: enableInfiniteScroll ? realPage + initialPage : initialPage, + ); + + /// The widgets to be shown in the carousel. + final List items; + + /// Set carousel height and overrides any existing [aspectRatio]. + final double height; + + /// Aspect ratio is used if no height have been declared. + /// + /// Defaults to 16:9 aspect ratio. + final double aspectRatio; + + /// The fraction of the viewport that each page should occupy. + /// + /// Defaults to 0.8, which means each page fills 80% of the carousel. + final num viewportFraction; + + /// The initial page to show when first creating the [GFSlider]. + /// + /// Defaults to 0. + final num initialPage; + + /// The actual index of the [PageView]. + /// + /// This value can be ignored unless you know the carousel will be scrolled + /// backwards more then 10000 pages. + /// Defaults to 10000 to simulate infinite backwards scrolling. + final num realPage; + + ///Determines if carousel should loop infinitely or be limited to item length. + /// + ///Defaults to true, i.e. infinite loop. + final bool enableInfiniteScroll; + + /// Reverse the order of items if set to true. + /// + /// Defaults to false. + final bool reverse; + + /// Enables auto play, sliding one page at a time. + /// + /// Use [autoPlayInterval] to determent the frequency of slides. + /// Defaults to false. + final bool autoPlay; + + /// Sets Duration to determent the frequency of slides when + /// + /// [autoPlay] is set to true. + /// Defaults to 4 seconds. + final Duration autoPlayInterval; + + /// The animation duration between two transitioning pages while in auto playback. + /// + /// Defaults to 800 ms. + final Duration autoPlayAnimationDuration; + + /// Determines the animation curve physics. + /// + /// Defaults to [Curves.fastOutSlowIn]. + final Curve autoPlayCurve; + + /// Sets a timer on touch detected that pause the auto play with + /// the given [Duration]. + /// + /// Touch Detection is only active if [autoPlay] is true. + final Duration pauseAutoPlayOnTouch; + + /// Determines if current page should be larger then the side images, + /// creating a feeling of depth in the carousel. + /// + /// Defaults to false. + final bool enlargeCenterPage; + + /// The axis along which the page view scrolls. + /// + /// Defaults to [Axis.horizontal]. + final Axis scrollDirection; + + /// Called whenever the page in the center of the viewport changes. + final Function(int index) onPageChanged; + + /// How the carousel should respond to user input. + /// + /// For example, determines how the items continues to animate after the + /// user stops dragging the page view. + /// + /// The physics are modified to snap to page boundaries using + /// [PageScrollPhysics] prior to being used. + /// + /// Defaults to matching platform conventions. + final ScrollPhysics scrollPhysics; + + /// [pageController] is created using the properties passed to the constructor + /// and can be used to control the [PageView] it is passed to. + final PageController pageController; + + /// Animates the controlled [GFSlider] to the next page. + /// + /// The animation lasts for the given duration and follows the given curve. + /// The returned [Future] resolves when the animation completes. + Future nextPage({Duration duration, Curve curve}) { + return pageController.nextPage(duration: duration, curve: curve); + } + + /// Animates the controlled [GFSlider] to the previous page. + /// + /// The animation lasts for the given duration and follows the given curve. + /// The returned [Future] resolves when the animation completes. + Future previousPage({Duration duration, Curve curve}) { + return pageController.previousPage(duration: duration, curve: curve); + } + + /// Changes which page is displayed in the controlled [GFSlider]. + /// + /// Jumps the page position from its current value to the given value, + /// without animation, and without checking if the new value is in range. + void jumpToPage(int page) { + final index = _getRealIndex(pageController.page.toInt(), realPage, items.length); + return pageController.jumpToPage(pageController.page.toInt() + page - index); + } + + /// Animates the controlled [GFSlider] from the current page to the given page. + /// + /// The animation lasts for the given duration and follows the given curve. + /// The returned [Future] resolves when the animation completes. + Future animateToPage(int page, {Duration duration, Curve curve}) { + final index = _getRealIndex(pageController.page.toInt(), realPage, items.length); + return pageController.animateToPage(pageController.page.toInt() + page - index, + duration: duration, curve: curve); + } + + @override + _GFSliderState createState() => _GFSliderState(); +} + +class _GFSliderState extends State with TickerProviderStateMixin { + Timer timer; + + @override + void initState() { + super.initState(); + timer = getTimer(); + } + + Timer getTimer() { + return Timer.periodic(widget.autoPlayInterval, (_) { + if (widget.autoPlay) { + widget.pageController + .nextPage(duration: widget.autoPlayAnimationDuration, curve: widget.autoPlayCurve); + } + }); + } + + void pauseOnTouch() { + timer.cancel(); + timer = Timer(widget.pauseAutoPlayOnTouch, () { + timer = getTimer(); + }); + } + + Widget getWrapper(Widget child) { + if (widget.height != null) { + final Widget wrapper = Container(height: widget.height, child: child); + return widget.autoPlay && widget.pauseAutoPlayOnTouch != null + ? addGestureDetection(wrapper) + : wrapper; + } else { + final Widget wrapper = AspectRatio(aspectRatio: widget.aspectRatio, child: child); + return widget.autoPlay && widget.pauseAutoPlayOnTouch != null + ? addGestureDetection(wrapper) + : wrapper; + } + } + + Widget addGestureDetection(Widget child) => + GestureDetector(onPanDown: (_) => pauseOnTouch(), child: child); + + @override + void dispose() { + super.dispose(); + timer?.cancel(); + } + + @override + Widget build(BuildContext context) { + return getWrapper(PageView.builder( + physics: widget.scrollPhysics, + scrollDirection: widget.scrollDirection, + controller: widget.pageController, + reverse: widget.reverse, + itemCount: widget.enableInfiniteScroll ? null : widget.items.length, + onPageChanged: (int index) { + int currentPage = _getRealIndex(index + widget.initialPage, widget.realPage, widget.items.length); + if (widget.onPageChanged != null) { + widget.onPageChanged(currentPage); + } + }, + itemBuilder: (BuildContext context, int i) { + final int index = + _getRealIndex(i + widget.initialPage, widget.realPage, widget.items.length); + + return AnimatedBuilder( + animation: widget.pageController, + child: widget.items[index], + builder: (BuildContext context, child) { + // on the first render, the pageController.page is null, + // this is a dirty hack + if (widget.pageController.position.minScrollExtent == null || + widget.pageController.position.maxScrollExtent == null) { + Future.delayed(Duration(microseconds: 1), () { + setState(() {}); + }); + return Container(); + } + double value = widget.pageController.page - i; + value = (1 - (value.abs() * 0.3)).clamp(0.0, 1.0); + + final double height = + widget.height ?? MediaQuery.of(context).size.width * (1 / widget.aspectRatio); + final double distortionValue = + widget.enlargeCenterPage ? Curves.easeOut.transform(value) : 1.0; + + if (widget.scrollDirection == Axis.horizontal) { + return Center(child: SizedBox(height: distortionValue * height, child: child)); + } else { + return Center( + child: SizedBox( + width: distortionValue * MediaQuery.of(context).size.width, child: child)); + } + }, + ); + }, + )); + } +} + +/// Converts an index of a set size to the corresponding index of a collection of another size +/// as if they were circular. +/// +/// Takes a [position] from collection Foo, a [base] from where Foo's index originated +/// and the [length] of a second collection Baa, for which the correlating index is sought. +/// +/// For example; We have a Carousel of 10000(simulating infinity) but only 6 images. +/// We need to repeat the images to give the illusion of a never ending stream. +/// By calling _getRealIndex with position and base we get an offset. +/// This offset modulo our length, 6, will return a number between 0 and 5, which represent the image +/// to be placed in the given position. +int _getRealIndex(int position, int base, int length) { + final int offset = position - base; + return _remainder(offset, length); +} + +/// Returns the remainder of the modulo operation [input] % [source], and adjust it for +/// negative values. +int _remainder(int input, int source) { + final int result = input % source; + return result < 0 ? source + result : result; +} \ No newline at end of file diff --git a/lib/components/toggle/gf_toggle.dart b/lib/components/toggle/gf_toggle.dart index 167c2619..60384abb 100644 --- a/lib/components/toggle/gf_toggle.dart +++ b/lib/components/toggle/gf_toggle.dart @@ -86,8 +86,8 @@ class GFToggle extends StatelessWidget { activeColor: activeColor, inactiveThumbColor: inactiveTrackColor, inactiveTrackColor: inactiveTrackColor, - hoverColor: hoverColor, - focusColor: focusColor, +// hoverColor: hoverColor, +// focusColor: focusColor, onChanged: onChanged, From 7d8ff201915f1d96576992cb09e071f54ec508c6 Mon Sep 17 00:00:00 2001 From: deepikahr Date: Tue, 24 Dec 2019 17:09:11 +0530 Subject: [PATCH 2/4] GFSlider component animation completed --- example/lib/main.dart | 18 +++---- lib/components/slider/gf_slider.dart | 75 ++++++++-------------------- 2 files changed, 31 insertions(+), 62 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 527914ae..e7315e50 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -75,7 +75,7 @@ class _CarouselWithIndicatorState extends State { GFSlider( items: child, autoPlay: true, - enlargeCenterPage: true, + enlargeMainPage: true, aspectRatio: 2.0, onPageChanged: (index) { setState(() { @@ -112,17 +112,17 @@ class CarouselDemo extends StatelessWidget { final GFSlider manualCarouselDemo = GFSlider( items: child, autoPlay: false, - enlargeCenterPage: true, + enlargeMainPage: true, viewportFraction: 0.9, aspectRatio: 2.0, ); //Auto playing carousel final GFSlider autoPlayDemo = GFSlider( - viewportFraction: 0.9, + viewportFraction: 0.95, aspectRatio: 2.0, autoPlay: true, - enlargeCenterPage: true, + enlargeMainPage: true, items: imgList.map( (url) { return Container( @@ -145,7 +145,7 @@ class CarouselDemo extends StatelessWidget { final basicSlider = GFSlider( items: child, autoPlay: false, - enlargeCenterPage: true, + enlargeMainPage: true, viewportFraction: 0.9, aspectRatio: 2.0, ); @@ -181,7 +181,7 @@ class CarouselDemo extends StatelessWidget { viewportFraction: 1.0, aspectRatio: 2.0, autoPlay: false, - enlargeCenterPage: false, + enlargeMainPage: false, items: map( imgList, (index, i) { @@ -199,7 +199,7 @@ class CarouselDemo extends StatelessWidget { viewportFraction: 0.9, aspectRatio: 2.0, autoPlay: true, - enlargeCenterPage: true, + enlargeMainPage: true, pauseAutoPlayOnTouch: Duration(seconds: 3), items: imgList.map( (url) { @@ -224,7 +224,7 @@ class CarouselDemo extends StatelessWidget { scrollPhysics: BouncingScrollPhysics(), enableInfiniteScroll: false, autoPlay: false, - enlargeCenterPage: true, + enlargeMainPage: true, viewportFraction: 0.9, aspectRatio: 2.0, ); @@ -234,7 +234,7 @@ class CarouselDemo extends StatelessWidget { scrollDirection: Axis.vertical, aspectRatio: 2.0, autoPlay: true, - enlargeCenterPage: true, + enlargeMainPage: true, viewportFraction: 0.9, pauseAutoPlayOnTouch: Duration(seconds: 3), items: imgList.map( diff --git a/lib/components/slider/gf_slider.dart b/lib/components/slider/gf_slider.dart index 1f74c2d0..03db5594 100644 --- a/lib/components/slider/gf_slider.dart +++ b/lib/components/slider/gf_slider.dart @@ -16,7 +16,7 @@ class GFSlider extends StatefulWidget { this.autoPlayAnimationDuration = const Duration(milliseconds: 800), this.autoPlayCurve: Curves.fastOutSlowIn, this.pauseAutoPlayOnTouch, - this.enlargeCenterPage = false, + this.enlargeMainPage = false, this.onPageChanged, this.scrollPhysics, this.scrollDirection: Axis.horizontal}) @@ -26,81 +26,50 @@ class GFSlider extends StatefulWidget { initialPage: enableInfiniteScroll ? realPage + initialPage : initialPage, ); - /// The widgets to be shown in the carousel. + /// The widgets to be shown as sliders. final List items; - /// Set carousel height and overrides any existing [aspectRatio]. + /// Set slide widget height and overrides any existing [aspectRatio]. final double height; - /// Aspect ratio is used if no height have been declared. - /// - /// Defaults to 16:9 aspect ratio. + /// Aspect ratio is used if no height have been declared. Defaults to 16:9 aspect ratio. final double aspectRatio; - /// The fraction of the viewport that each page should occupy. - /// - /// Defaults to 0.8, which means each page fills 80% of the carousel. + /// The fraction of the viewport that each page should occupy. Defaults to 0.8, which means each page fills 80% of the slide. final num viewportFraction; - /// The initial page to show when first creating the [GFSlider]. - /// - /// Defaults to 0. + /// The initial page to show when first creating the [GFSlider]. Defaults to 0. final num initialPage; /// The actual index of the [PageView]. - /// - /// This value can be ignored unless you know the carousel will be scrolled - /// backwards more then 10000 pages. - /// Defaults to 10000 to simulate infinite backwards scrolling. final num realPage; - ///Determines if carousel should loop infinitely or be limited to item length. - /// - ///Defaults to true, i.e. infinite loop. + /// Determines if slides should loop infinitely or be limited to item length. Defaults to true, i.e. infinite loop. final bool enableInfiniteScroll; - /// Reverse the order of items if set to true. - /// - /// Defaults to false. + /// Reverse the order of items if set to true. Defaults to false. final bool reverse; - /// Enables auto play, sliding one page at a time. - /// - /// Use [autoPlayInterval] to determent the frequency of slides. - /// Defaults to false. + /// Enables auto play, sliding one page at a time. Use [autoPlayInterval] to determent the frequency of slides. Defaults to false. final bool autoPlay; - /// Sets Duration to determent the frequency of slides when - /// - /// [autoPlay] is set to true. - /// Defaults to 4 seconds. + /// Sets Duration to determent the frequency of slides when [autoPlay] is set to true. Defaults to 4 seconds. final Duration autoPlayInterval; - /// The animation duration between two transitioning pages while in auto playback. - /// - /// Defaults to 800 ms. + /// The animation duration between two transitioning pages while in auto playback. Defaults to 800 ms. final Duration autoPlayAnimationDuration; - /// Determines the animation curve physics. - /// - /// Defaults to [Curves.fastOutSlowIn]. + /// Determines the animation curve physics. Defaults to [Curves.fastOutSlowIn]. final Curve autoPlayCurve; - /// Sets a timer on touch detected that pause the auto play with - /// the given [Duration]. - /// - /// Touch Detection is only active if [autoPlay] is true. + /// Sets a timer on touch detected that pause the auto play with the given [Duration]. Touch Detection is only active if [autoPlay] is true. final Duration pauseAutoPlayOnTouch; /// Determines if current page should be larger then the side images, - /// creating a feeling of depth in the carousel. - /// - /// Defaults to false. - final bool enlargeCenterPage; + /// creating a feeling of depth in the carousel. Defaults to false. + final bool enlargeMainPage; - /// The axis along which the page view scrolls. - /// - /// Defaults to [Axis.horizontal]. + /// The axis along which the page view scrolls. Defaults to [Axis.horizontal]. final Axis scrollDirection; /// Called whenever the page in the center of the viewport changes. @@ -166,10 +135,10 @@ class _GFSliderState extends State with TickerProviderStateMixin { @override void initState() { super.initState(); - timer = getTimer(); + timer = getPlayTimer(); } - Timer getTimer() { + Timer getPlayTimer() { return Timer.periodic(widget.autoPlayInterval, (_) { if (widget.autoPlay) { widget.pageController @@ -181,11 +150,11 @@ class _GFSliderState extends State with TickerProviderStateMixin { void pauseOnTouch() { timer.cancel(); timer = Timer(widget.pauseAutoPlayOnTouch, () { - timer = getTimer(); + timer = getPlayTimer(); }); } - Widget getWrapper(Widget child) { + Widget getPageWrapper(Widget child) { if (widget.height != null) { final Widget wrapper = Container(height: widget.height, child: child); return widget.autoPlay && widget.pauseAutoPlayOnTouch != null @@ -210,7 +179,7 @@ class _GFSliderState extends State with TickerProviderStateMixin { @override Widget build(BuildContext context) { - return getWrapper(PageView.builder( + return getPageWrapper(PageView.builder( physics: widget.scrollPhysics, scrollDirection: widget.scrollDirection, controller: widget.pageController, @@ -245,7 +214,7 @@ class _GFSliderState extends State with TickerProviderStateMixin { final double height = widget.height ?? MediaQuery.of(context).size.width * (1 / widget.aspectRatio); final double distortionValue = - widget.enlargeCenterPage ? Curves.easeOut.transform(value) : 1.0; + widget.enlargeMainPage ? Curves.easeOut.transform(value) : 1.0; if (widget.scrollDirection == Axis.horizontal) { return Center(child: SizedBox(height: distortionValue * height, child: child)); From b4af75954b5d59e2caa80866f8884ea4bbe907f7 Mon Sep 17 00:00:00 2001 From: deepikahr Date: Tue, 24 Dec 2019 17:27:18 +0530 Subject: [PATCH 3/4] GFSlider autoplay completed --- example/lib/main.dart | 905 ++++++++++++++---------------------------- 1 file changed, 294 insertions(+), 611 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index e7315e50..3747781c 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -1,643 +1,326 @@ -import 'package:ui_kit/components/slider/gf_slider.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/painting.dart'; +import 'package:ui_kit/components/button/gf_button.dart'; +import 'package:ui_kit/components/button/gf_icon_button.dart'; +import 'package:ui_kit/components/badge/gf_button_badge.dart'; +import 'package:ui_kit/components/badge/gf_icon_badge.dart'; +import 'package:ui_kit/components/avatar/gf_avatar.dart'; +import 'package:ui_kit/components/badge/gf_badge.dart'; +import 'package:ui_kit/components/card/gf_card.dart'; +import 'package:ui_kit/components/header_bar/gf_title_bar.dart'; +import 'package:ui_kit/components/button_bar/gf_button_bar.dart'; +import 'package:ui_kit/position/gf_position.dart'; +import 'package:ui_kit/types/gf_type.dart'; +import 'package:ui_kit/components/image/gf_image_overlay.dart'; +import 'package:ui_kit/shape/gf_shape.dart'; +import 'package:ui_kit/components/slider/gf_slider.dart'; -final List imgList = [ - 'https://images.unsplash.com/photo-1520342868574-5fa3804e551c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=6ff92caffcdd63681a35134a6770ed3b&auto=format&fit=crop&w=1951&q=80', - 'https://images.unsplash.com/photo-1522205408450-add114ad53fe?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=368f45b0888aeb0b7b08e3a1084d3ede&auto=format&fit=crop&w=1950&q=80', - 'https://images.unsplash.com/photo-1519125323398-675f0ddb6308?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=94a1e718d89ca60a6337a6008341ca50&auto=format&fit=crop&w=1950&q=80', - 'https://images.unsplash.com/photo-1523205771623-e0faa4d2813d?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=89719a0d55dd05e2deae4120227e6efc&auto=format&fit=crop&w=1953&q=80', - 'https://images.unsplash.com/photo-1508704019882-f9cf40e475b4?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=8c6e5e3aba713b17aa1fe71ab4f0ae5b&auto=format&fit=crop&w=1352&q=80', - 'https://images.unsplash.com/photo-1519985176271-adb1088fa94c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=a0c8d632e977f94e5d312d9893258f59&auto=format&fit=crop&w=1355&q=80' +final List imageList = [ + "https://cdn.pixabay.com/photo/2017/12/03/18/04/christmas-balls-2995437_960_720.jpg", + "https://cdn.pixabay.com/photo/2017/12/13/00/23/christmas-3015776_960_720.jpg", + "https://cdn.pixabay.com/photo/2019/12/19/10/55/christmas-market-4705877_960_720.jpg", + "https://cdn.pixabay.com/photo/2019/12/20/00/03/road-4707345_960_720.jpg" ]; -void main() => runApp(CarouselDemo()); -final Widget placeholder = Container(color: Colors.grey); +void main() => runApp(MyApp()); -final List child = map( - imgList, - (index, i) { - return Container( - margin: EdgeInsets.all(5.0), - child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5.0)), - child: Stack(children: [ - Image.network(i, fit: BoxFit.cover, width: 1000.0), - Positioned( - bottom: 0.0, - left: 0.0, - right: 0.0, - child: Container( - decoration: BoxDecoration( - gradient: LinearGradient( - colors: [Color.fromARGB(200, 0, 0, 0), Color.fromARGB(0, 0, 0, 0)], - begin: Alignment.bottomCenter, - end: Alignment.topCenter, - ), - ), - padding: EdgeInsets.symmetric(vertical: 10.0, horizontal: 20.0), - child: Text( - 'No. $index image', - style: TextStyle( - color: Colors.white, - fontSize: 20.0, - fontWeight: FontWeight.bold, - ), - ), - ), - ), - ]), +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'UI_KIT_EXAMPLE', + theme: ThemeData( + primarySwatch: Colors.blue, ), + home: MyHomePage(title: 'UI_KIT_EXAMPLE'), ); - }, -).toList(); - -List map(List list, Function handler) { - List result = []; - for (var i = 0; i < list.length; i++) { - result.add(handler(i, list[i])); } - - return result; } -class CarouselWithIndicator extends StatefulWidget { - @override - _CarouselWithIndicatorState createState() => _CarouselWithIndicatorState(); -} +class MyHomePage extends StatefulWidget { + MyHomePage({Key key, this.title}) : super(key: key); -class _CarouselWithIndicatorState extends State { - int _current = 0; + final String title; @override - Widget build(BuildContext context) { - return Column(children: [ - GFSlider( - items: child, - autoPlay: true, - enlargeMainPage: true, - aspectRatio: 2.0, - onPageChanged: (index) { - setState(() { - _current = index; - }); - }, - ), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: map( - imgList, - (index, url) { - return Container( - width: 8.0, - height: 8.0, - margin: EdgeInsets.symmetric(vertical: 10.0, horizontal: 2.0), - decoration: BoxDecoration( - shape: BoxShape.circle, - color: _current == index - ? Color.fromRGBO(0, 0, 0, 0.9) - : Color.fromRGBO(0, 0, 0, 0.4)), - ); - }, - ), - ), - ]); - } + _MyHomePageState createState() => _MyHomePageState(); } -class CarouselDemo extends StatelessWidget { +class _MyHomePageState extends State { @override Widget build(BuildContext context) { - //Manually operated Carousel - final GFSlider manualCarouselDemo = GFSlider( - items: child, - autoPlay: false, - enlargeMainPage: true, - viewportFraction: 0.9, - aspectRatio: 2.0, - ); - - //Auto playing carousel - final GFSlider autoPlayDemo = GFSlider( - viewportFraction: 0.95, - aspectRatio: 2.0, - autoPlay: true, - enlargeMainPage: true, - items: imgList.map( - (url) { - return Container( - margin: EdgeInsets.all(5.0), - child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5.0)), - child: Image.network( - url, - fit: BoxFit.cover, - width: 1000.0, - ), - ), - ); - }, - ).toList(), - ); + return Scaffold( + appBar: AppBar( + title: Text(widget.title), + ), + body: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ - //Button controlled carousel - Widget buttonDemo() { - final basicSlider = GFSlider( - items: child, - autoPlay: false, - enlargeMainPage: true, - viewportFraction: 0.9, - aspectRatio: 2.0, - ); - return Column(children: [ - basicSlider, - Row(children: [ - Expanded( - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 15.0), - child: RaisedButton( - onPressed: () => basicSlider.previousPage( - duration: Duration(milliseconds: 300), curve: Curves.linear), - child: Text('prev slider'), - ), - ), - ), - Expanded( - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 15.0), - child: RaisedButton( - onPressed: () => basicSlider.nextPage( - duration: Duration(milliseconds: 300), curve: Curves.linear), - child: Text('next slider'), - ), - ), + GFSlider( + viewportFraction: 0.9, + aspectRatio: 2.0, + autoPlay: true, + enlargeMainPage: true, + items: imageList.map( + (url) { + return Container( + margin: EdgeInsets.all(5.0), + child: ClipRRect( + borderRadius: BorderRadius.all(Radius.circular(5.0)), + child: Image.network( + url, + fit: BoxFit.cover, + width: 1000.0, + ), + ), + ); + }, + ).toList(), ), - ]), - ]); - } - //Pages covers entire carousel - final GFSlider coverScreenExample = GFSlider( - viewportFraction: 1.0, - aspectRatio: 2.0, - autoPlay: false, - enlargeMainPage: false, - items: map( - imgList, - (index, i) { - return Container( - decoration: BoxDecoration( - image: DecorationImage(image: NetworkImage(i), fit: BoxFit.cover), - ), - ); - }, - ), - ); - - //User input pauses carousels automatic playback - final GFSlider touchDetectionDemo = GFSlider( - viewportFraction: 0.9, - aspectRatio: 2.0, - autoPlay: true, - enlargeMainPage: true, - pauseAutoPlayOnTouch: Duration(seconds: 3), - items: imgList.map( - (url) { - return Container( - margin: EdgeInsets.all(5.0), - child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5.0)), - child: Image.network( - url, - fit: BoxFit.cover, - width: 1000.0, + GFCard( + boxFit: BoxFit.cover, + colorFilter: new ColorFilter.mode( + Colors.black.withOpacity(0.67), BlendMode.darken), + image: Image.asset("lib/assets/food.jpeg"), +// imageOverlay: AssetImage("lib/assets/food.jpeg"), + titlePosition: GFPosition.end, + title: GFTitleBar( + avatar: GFAvatar( + child: Text("tb"), + ), + title: Text( + 'title', + style: TextStyle(color: Colors.grey), + ), + subTitle: Text( + 'subtitle', + style: TextStyle(color: Colors.grey), + ), + icon: GFIconButton( + onPressed: null, + icon: Icon(Icons.favorite_border), + type: GFType.transparent, + ), + ), + content: Text( + "Flutter " + "Flutter is Google's mobile UI framework for crafting" + " high-quality native interfaces on iOS and Android in " + "Flutter ", + style: TextStyle(color: Colors.grey), + ), + buttonBar: GFButtonBar( + mainAxisSize: MainAxisSize.min, + children: [ + GFButton( + onPressed: null, + child: Text("favorite"), + icon: Icon(Icons.favorite_border), + type: GFType.transparent, + ), + GFButton( + onPressed: null, + child: Text("share"), + icon: Icon(Icons.share), + type: GFType.outline, + ), + ], + ), ), - ), - ); - }, - ).toList(), - ); - - //Non-looping manual Carousel - final GFSlider nonLoopingCarousel = GFSlider( - items: child, - scrollPhysics: BouncingScrollPhysics(), - enableInfiniteScroll: false, - autoPlay: false, - enlargeMainPage: true, - viewportFraction: 0.9, - aspectRatio: 2.0, - ); - //Vertical carousel - final GFSlider verticalScrollCarousel = GFSlider( - scrollDirection: Axis.vertical, - aspectRatio: 2.0, - autoPlay: true, - enlargeMainPage: true, - viewportFraction: 0.9, - pauseAutoPlayOnTouch: Duration(seconds: 3), - items: imgList.map( - (url) { - return Container( - margin: EdgeInsets.all(5.0), - child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5.0)), - child: Image.network( - url, - fit: BoxFit.cover, - width: 1000.0, - ), - ), - ); - }, - ).toList(), - ); +// GFButtonBar( +// mainAxisSize: MainAxisSize.min, +// children: [ +// GFButton(onPressed: null, child: Text("like"), icon: Icon(Icons.favorite_border), type: GFType.transparent,), +// GFButton(onPressed: null, child: Text("comment"),), +// GFButton(onPressed: null, child: Text("share"), icon: Icon(Icons.share), type: GFType.outline,), +// ], +// ), +// +// GFTitleBar( +// avatar: GFAvatar( +// child: Text("tb"), +// ), +// title: Text('title'), +// subTitle: Text('subtitle'), +// icon: GFIconButton( +// onPressed: null, +// type: GFType.transparent, +// icon: Icon(Icons.favorite_border), +// ), +// ), - //create full screen Carousel with context - GFSlider getFullScreenCarousel(BuildContext mediaContext) { - return GFSlider( - autoPlay: true, - viewportFraction: 1.0, - aspectRatio: MediaQuery.of(mediaContext).size.aspectRatio, - items: imgList.map( - (url) { - return Container( - child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(0.0)), - child: Image.network( - url, - fit: BoxFit.cover, - width: 1000.0, + GFImageOverlay( + width: MediaQuery.of(context).size.width, + margin: EdgeInsets.all(16.0), + padding: EdgeInsets.all(16.0), + child: Column( + children: [ + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + new Text( + 'Hello world', + style: TextStyle(color: Colors.white), + ), + ], ), +// color: Colors.orange, + image: AssetImage("lib/assets/food.jpeg"), + boxFit: BoxFit.cover, + colorFilter: new ColorFilter.mode( + Colors.black.withOpacity(0.6), BlendMode.darken), + borderRadius: new BorderRadius.circular(5.0), +// border: Border.all(color: Colors.pink, width: 2.0), ), - ); - }, - ).toList(), - ); - } - - return MaterialApp( - title: 'demo', - home: Scaffold( - appBar: AppBar(title: Text('Carousel slider demo')), - body: ListView( - children: [ -// Padding( -// padding: EdgeInsets.symmetric(vertical: 15.0), -// child: Column(children: [ -// Text('Manuell Carousel'), -// manualCarouselDemo, -// ])), - Padding( - padding: EdgeInsets.symmetric(vertical: 15.0), - child: Column(children: [ - Text('Auto Playing Carousel'), - autoPlayDemo, - ])), -// Padding( -// padding: EdgeInsets.symmetric(vertical: 15.0), -// child: Column(children: [ -// Text('Button Controlled Carousel'), -// buttonDemo(), -// ])), -// Padding( -// padding: EdgeInsets.symmetric(vertical: 15.0), -// child: Column(children: [ -// Text('Full Screen Carousel'), -// coverScreenExample, -// ])), -// Padding( -// padding: EdgeInsets.symmetric(vertical: 15.0), -// child: Column(children: [ -// Text('Carousel With Indecator'), -// CarouselWithIndicator(), -// ])), -// Padding( -// padding: EdgeInsets.symmetric(vertical: 15.0), -// child: Column(children: [ -// Text('Pause When Touched Carousel'), -// touchDetectionDemo, -// ])), -// Padding( -// padding: EdgeInsets.symmetric(vertical: 15.0), -// child: Column(children: [ -// Text('No infinity scroll carousel'), -// nonLoopingCarousel, -// ])), -// Padding( -// padding: EdgeInsets.symmetric(vertical: 15.0), -// child: Column(children: [ -// Text('Vertical scroll carousel'), -// verticalScrollCarousel, -// ])), -// Padding( -// padding: EdgeInsets.only(top: 15.0), -// //Builder needed to provide mediaQuery context from material app -// child: Builder(builder: (context) { -// return Column(children: [ -// Text('Full screen carousel'), -// getFullScreenCarousel(context), -// ]); -// })), - ], - ), - ), - ); - } -} -//import 'package:flutter/cupertino.dart'; -//import 'package:flutter/material.dart'; -//import 'package:flutter/painting.dart'; -//import 'package:ui_kit/components/button/gf_button.dart'; -//import 'package:ui_kit/components/button/gf_icon_button.dart'; -//import 'package:ui_kit/components/badge/gf_button_badge.dart'; -//import 'package:ui_kit/components/badge/gf_icon_badge.dart'; -//import 'package:ui_kit/components/avatar/gf_avatar.dart'; -//import 'package:ui_kit/components/badge/gf_badge.dart'; -//import 'package:ui_kit/components/card/gf_card.dart'; -//import 'package:ui_kit/components/header_bar/gf_title_bar.dart'; -//import 'package:ui_kit/components/button_bar/gf_button_bar.dart'; -//import 'package:ui_kit/position/gf_position.dart'; -//import 'package:ui_kit/types/gf_type.dart'; -//import 'package:ui_kit/components/image/gf_image_overlay.dart'; -//import 'package:ui_kit/shape/gf_shape.dart'; -// -//void main() => runApp(MyApp()); -// -//class MyApp extends StatelessWidget { -// @override -// Widget build(BuildContext context) { -// return MaterialApp( -// title: 'UI_KIT_EXAMPLE', -// theme: ThemeData( -// primarySwatch: Colors.blue, -// ), -// home: MyHomePage(title: 'UI_KIT_EXAMPLE'), -// ); -// } -//} // -//class MyHomePage extends StatefulWidget { -// MyHomePage({Key key, this.title}) : super(key: key); -// -// final String title; -// -// @override -// _MyHomePageState createState() => _MyHomePageState(); -//} -// -//class _MyHomePageState extends State { -// @override -// Widget build(BuildContext context) { -// return Scaffold( -// appBar: AppBar( -// title: Text(widget.title), -// ), -// body: SingleChildScrollView( -// child: Column( -// mainAxisAlignment: MainAxisAlignment.center, -// crossAxisAlignment: CrossAxisAlignment.center, -// children: [ -// GFCard( -// boxFit: BoxFit.cover, -// colorFilter: new ColorFilter.mode( -// Colors.black.withOpacity(0.67), BlendMode.darken), -// image: Image.asset("lib/assets/food.jpeg"), -//// imageOverlay: AssetImage("lib/assets/food.jpeg"), -// titlePosition: GFPosition.end, -// title: GFTitleBar( -// avatar: GFAvatar( -// child: Text("tb"), -// ), -// title: Text( -// 'title', -// style: TextStyle(color: Colors.grey), -// ), -// subTitle: Text( -// 'subtitle', -// style: TextStyle(color: Colors.grey), -// ), -// icon: GFIconButton( -// onPressed: null, -// icon: Icon(Icons.favorite_border), -// type: GFType.transparent, -// ), -// ), -// content: Text( -// "Flutter " -// "Flutter is Google's mobile UI framework for crafting" -// " high-quality native interfaces on iOS and Android in " -// "Flutter ", -// style: TextStyle(color: Colors.grey), -// ), -// buttonBar: GFButtonBar( -// mainAxisSize: MainAxisSize.min, -// children: [ -// GFButton( -// onPressed: null, -// child: Text("favorite"), -// icon: Icon(Icons.favorite_border), -// type: GFType.transparent, -// ), -// GFButton( -// onPressed: null, -// child: Text("share"), -// icon: Icon(Icons.share), -// type: GFType.outline, -// ), -// ], -// ), +// GFAvatar( +//// radius: 40.0, +// child: Text("de"), +// backgroundColor: Colors.pink, +//// backgroundImage: , +//// foregroundColor: Colors.deepOrangeAccent, +//// shape: GFShape.square, +//// size: GFSize.medium, +//// borderRadius: BorderRadius.circular(20.0), +// ), +// GFIconBadges( +// onPressed: null, +// child: GFIconButton( +// onPressed: null, +// icon: Icon(Icons.ac_unit), // ), -// -//// GFButtonBar( -//// mainAxisSize: MainAxisSize.min, -//// children: [ -//// GFButton(onPressed: null, child: Text("like"), icon: Icon(Icons.favorite_border), type: GFType.transparent,), -//// GFButton(onPressed: null, child: Text("comment"),), -//// GFButton(onPressed: null, child: Text("share"), icon: Icon(Icons.share), type: GFType.outline,), -//// ], -//// ), -//// -//// GFTitleBar( -//// avatar: GFAvatar( -//// child: Text("tb"), -//// ), -//// title: Text('title'), -//// subTitle: Text('subtitle'), -//// icon: GFIconButton( -//// onPressed: null, -//// type: GFType.transparent, -//// icon: Icon(Icons.favorite_border), -//// ), -//// ), -// -// GFImageOverlay( -// width: MediaQuery.of(context).size.width, -// margin: EdgeInsets.all(16.0), -// padding: EdgeInsets.all(16.0), -// child: Column( -// children: [ -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// new Text( -// 'Hello world', -// style: TextStyle(color: Colors.white), -// ), -// ], -// ), -//// color: Colors.orange, -// image: AssetImage("lib/assets/food.jpeg"), -// boxFit: BoxFit.cover, -// colorFilter: new ColorFilter.mode( -// Colors.black.withOpacity(0.6), BlendMode.darken), -// borderRadius: new BorderRadius.circular(5.0), -//// border: Border.all(color: Colors.pink, width: 2.0), +// counterChild: GFBadge( +// text: '12', +//// color: GFColor.dark, +//// shape: GFShape.circle, +//// size: GFSize.small, +//// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +//// textColor: GFColor.white, +//// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), +//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.orange, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), // ), -// -//// -//// GFAvatar( -////// radius: 40.0, -//// child: Text("de"), -//// backgroundColor: Colors.pink, -////// backgroundImage: , -////// foregroundColor: Colors.deepOrangeAccent, -////// shape: GFShape.square, -////// size: GFSize.medium, -////// borderRadius: BorderRadius.circular(20.0), -//// ), -//// GFIconBadges( -//// onPressed: null, -//// child: GFIconButton( -//// onPressed: null, -//// icon: Icon(Icons.ac_unit), +// ), +// GFIconButton( +// onPressed: null, +// icon: Icon(Icons.ac_unit), +//// iconSize: 12.0, +//// type: GFType.solid, +//// shape: GFShape.pills, +//// size: GFSize.large, +//// buttonBoxShadow: true, +//// color: GFColor.primary, +//// boxShadow: BoxShadow( +//// color: Colors.pink, +//// blurRadius: 2.0, +//// spreadRadius: 1.0, +//// offset: Offset.zero, //// ), -//// counterChild: GFBadge( -//// text: '12', -////// color: GFColor.dark, -////// shape: GFShape.circle, -////// size: GFSize.small, -////// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -////// textColor: GFColor.white, -////// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), -////// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.orange, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +//// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +// ), +// GFButtonBadge( +// onPressed: null, +//// position: GFIconPosition.start, +//// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +// text: 'goodies', +//// color: GFColor.danger, +//// shape: GFShape.pills, +//// type: GFType.outline, +//// size: GFSize.small, +// counterChild: GFBadge( +// child: Text("12"), +//// color: GFColor.dark, +//// shape: GFShape.circle, +//// size: GFSize.small, +//// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +//// textColor: GFColor.white, +//// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), +// ), +// ), +// GFBadge( +// text: '12', +//// color: GFColor.dark, +//// shape: GFShape.circle, +//// size: GFSize.small, +//// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +//// textColor: GFColor.white, +//// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), +// ), +// GFButton( +//// type: GFType.solid, +//// shape: GFShape.pills, +// text: 'goodies', +// onPressed: () {}, +//// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), +//// size: GFSize.large, +//// buttonBoxShadow: true, +//// blockButton: true, +//// fullWidthButton: true, +//// color: GFColor.primary, +//// textColor: GFColor.secondary, +//// icon: Icon(Icons.error, color: Colors.white,), +//// position: GFIconPosition.start, +//// boxShadow: BoxShadow( +//// color: Colors.pink, +//// blurRadius: 2.0, +//// spreadRadius: 1.0, +//// offset: Offset.zero, //// ), -//// ), -//// GFIconButton( -//// onPressed: null, -//// icon: Icon(Icons.ac_unit), -////// iconSize: 12.0, -////// type: GFType.solid, -////// shape: GFShape.pills, -////// size: GFSize.large, -////// buttonBoxShadow: true, -////// color: GFColor.primary, -////// boxShadow: BoxShadow( -////// color: Colors.pink, -////// blurRadius: 2.0, -////// spreadRadius: 1.0, -////// offset: Offset.zero, -////// ), -////// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -////// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), -//// ), -//// GFButtonBadge( -//// onPressed: null, -////// position: GFIconPosition.start, -////// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -////// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), -//// text: 'goodies', -////// color: GFColor.danger, -////// shape: GFShape.pills, -////// type: GFType.outline, -////// size: GFSize.small, -//// counterChild: GFBadge( -//// child: Text("12"), -////// color: GFColor.dark, -////// shape: GFShape.circle, -////// size: GFSize.small, -////// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -////// textColor: GFColor.white, -////// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), -//// ), -//// ), -//// GFBadge( -//// text: '12', -////// color: GFColor.dark, -////// shape: GFShape.circle, -////// size: GFSize.small, -////// border: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -////// textColor: GFColor.white, -////// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), -//// ), -//// GFButton( -////// type: GFType.solid, -////// shape: GFShape.pills, -//// text: 'goodies', -//// onPressed: () {}, -////// textStyle: TextStyle(fontWeight: FontWeight.w500, fontSize: 8.0), -////// size: GFSize.large, -////// buttonBoxShadow: true, -////// blockButton: true, -////// fullWidthButton: true, -////// color: GFColor.primary, -////// textColor: GFColor.secondary, -////// icon: Icon(Icons.error, color: Colors.white,), -////// position: GFIconPosition.start, -////// boxShadow: BoxShadow( -////// color: Colors.pink, -////// blurRadius: 2.0, -////// spreadRadius: 1.0, -////// offset: Offset.zero, -////// ), -////// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), -////// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), -//// ), -// ], -// ), -// )); -// } -//} +//// borderSide: BorderSide(color: Colors.pink, width: 1.0, style: BorderStyle.solid), +//// borderShape: RoundedRectangleBorder(side: BorderSide(color: Colors.pink, width: 2.0, style: BorderStyle.solid), borderRadius: BorderRadius.zero), +// ), + ], + ), + )); + } +} From 4a223e4e9feceb475f0f304d24d94e54b6964e99 Mon Sep 17 00:00:00 2001 From: deepikahr Date: Tue, 24 Dec 2019 17:49:22 +0530 Subject: [PATCH 4/4] Full screen GFSlider completed --- example/lib/main.dart | 242 ++++++++++++++++++++++-------------------- 1 file changed, 128 insertions(+), 114 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 3747781c..93595921 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -83,56 +83,70 @@ class _MyHomePageState extends State { ).toList(), ), - GFCard( - boxFit: BoxFit.cover, - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(0.67), BlendMode.darken), - image: Image.asset("lib/assets/food.jpeg"), -// imageOverlay: AssetImage("lib/assets/food.jpeg"), - titlePosition: GFPosition.end, - title: GFTitleBar( - avatar: GFAvatar( - child: Text("tb"), - ), - title: Text( - 'title', - style: TextStyle(color: Colors.grey), - ), - subTitle: Text( - 'subtitle', - style: TextStyle(color: Colors.grey), - ), - icon: GFIconButton( - onPressed: null, - icon: Icon(Icons.favorite_border), - type: GFType.transparent, - ), - ), - content: Text( - "Flutter " - "Flutter is Google's mobile UI framework for crafting" - " high-quality native interfaces on iOS and Android in " - "Flutter ", - style: TextStyle(color: Colors.grey), - ), - buttonBar: GFButtonBar( - mainAxisSize: MainAxisSize.min, - children: [ - GFButton( - onPressed: null, - child: Text("favorite"), - icon: Icon(Icons.favorite_border), - type: GFType.transparent, - ), - GFButton( - onPressed: null, - child: Text("share"), - icon: Icon(Icons.share), - type: GFType.outline, - ), - ], - ), - ), +// GFSlider( +// autoPlay: true, +// viewportFraction: 1.0, +// aspectRatio: MediaQuery.of(context).size.aspectRatio, +// items: imageList.map((url) { +// return Image.network( +// url, +// fit: BoxFit.cover, +// width: 1000.0, +// ); +// }, +// ).toList(), +// ), + +// GFCard( +// boxFit: BoxFit.cover, +// colorFilter: new ColorFilter.mode( +// Colors.black.withOpacity(0.67), BlendMode.darken), +// image: Image.asset("lib/assets/food.jpeg"), +//// imageOverlay: AssetImage("lib/assets/food.jpeg"), +// titlePosition: GFPosition.end, +// title: GFTitleBar( +// avatar: GFAvatar( +// child: Text("tb"), +// ), +// title: Text( +// 'title', +// style: TextStyle(color: Colors.grey), +// ), +// subTitle: Text( +// 'subtitle', +// style: TextStyle(color: Colors.grey), +// ), +// icon: GFIconButton( +// onPressed: null, +// icon: Icon(Icons.favorite_border), +// type: GFType.transparent, +// ), +// ), +// content: Text( +// "Flutter " +// "Flutter is Google's mobile UI framework for crafting" +// " high-quality native interfaces on iOS and Android in " +// "Flutter ", +// style: TextStyle(color: Colors.grey), +// ), +// buttonBar: GFButtonBar( +// mainAxisSize: MainAxisSize.min, +// children: [ +// GFButton( +// onPressed: null, +// child: Text("favorite"), +// icon: Icon(Icons.favorite_border), +// type: GFType.transparent, +// ), +// GFButton( +// onPressed: null, +// child: Text("share"), +// icon: Icon(Icons.share), +// type: GFType.outline, +// ), +// ], +// ), +// ), // GFButtonBar( // mainAxisSize: MainAxisSize.min, @@ -156,70 +170,70 @@ class _MyHomePageState extends State { // ), // ), - GFImageOverlay( - width: MediaQuery.of(context).size.width, - margin: EdgeInsets.all(16.0), - padding: EdgeInsets.all(16.0), - child: Column( - children: [ - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - new Text( - 'Hello world', - style: TextStyle(color: Colors.white), - ), - ], - ), -// color: Colors.orange, - image: AssetImage("lib/assets/food.jpeg"), - boxFit: BoxFit.cover, - colorFilter: new ColorFilter.mode( - Colors.black.withOpacity(0.6), BlendMode.darken), - borderRadius: new BorderRadius.circular(5.0), -// border: Border.all(color: Colors.pink, width: 2.0), - ), +// GFImageOverlay( +// width: MediaQuery.of(context).size.width, +// margin: EdgeInsets.all(16.0), +// padding: EdgeInsets.all(16.0), +// child: Column( +// children: [ +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// new Text( +// 'Hello world', +// style: TextStyle(color: Colors.white), +// ), +// ], +// ), +//// color: Colors.orange, +// image: AssetImage("lib/assets/food.jpeg"), +// boxFit: BoxFit.cover, +// colorFilter: new ColorFilter.mode( +// Colors.black.withOpacity(0.6), BlendMode.darken), +// borderRadius: new BorderRadius.circular(5.0), +//// border: Border.all(color: Colors.pink, width: 2.0), +// ), // // GFAvatar(