Untitled
unknown
dart
4 years ago
5.5 kB
4
Indexable
e.url.length < 2 ? e.url.first.contains("mp4") || e.url.first.contains('MOV') ? VideoWidget( url: e.url.first, ) : Column( mainAxisSize: MainAxisSize.min, children: [ CarouselSlider.builder( itemCount: e.url.length, itemBuilder: (context, index, realIndex) { return FancyShimmerImage( imageUrl: e.url[index], width: Get.width, boxFit: BoxFit.cover, ); }, options: CarouselOptions( viewportFraction: 1.0, enableInfiniteScroll: false, aspectRatio: 1 / 1, onPageChanged: (index, reason) { feedController.onPageChanged( index, reason, e.id); }), ), ], ) : e.url[1].contains("mp4") || e.url[1].contains('MOV') ? VideoWidget( url: e.url[1], ) : CarouselSlider.builder( itemCount: e.url.length, itemBuilder: (context, index, realIndex) { return FancyShimmerImage( imageUrl: e.url[index], width: Get.width, boxFit: BoxFit.cover, ); }, options: CarouselOptions( viewportFraction: 1.0, enableInfiniteScroll: false, aspectRatio: 1 / 1, onPageChanged: (index, reason) { feedController.onPageChanged( index, reason, e.id); }), ) , ], ), ), e.url.length > 1 && !e.url[1].contains("mp4") && !e.url[1].contains('MOV') ? Row( mainAxisAlignment: MainAxisAlignment.center, children: [ DotsIndicator( dotsCount: e.url.length, position: e.index.toDouble(), decorator: DotsDecorator( color: Colors.grey[300], // Inactive color activeColor: Colors.grey[600], ), ), ], ).marginOnly(bottom: 10.0) : SizedBox(), e.description != null ? Directionality( textDirection: TextDirection.ltr, child: Container( child: Row( children: [ Flexible( child: ReadMoreText( e.description, style: Get.textTheme.bodyText2.copyWith( fontWeight: FontWeight.w600, fontSize: 12, ), trimLines: 1, colorClickableText: Colors.black, trimMode: TrimMode.Line, trimCollapsedText: 'more'.tr, trimExpandedText: 'less'.tr, lessStyle: TextStyle( color: Colors.grey[400], fontSize: 14, fontWeight: FontWeight.normal, ), moreStyle: TextStyle( color: Colors.grey[400], fontSize: 14, fontWeight: FontWeight.normal, ), ), ), ], ) ).paddingOnly(top: 10, left: 22, right: 22, bottom: 10), ) : SizedBox()
Editor is loading...