Comments (4)
Hi @aisivan36 ,
Bug has been fixed and now you can update and use the latest version (1.0.5) of the flutter_carousel_widget
.
I have tested the latest version of the package and it's working fine on my side.
I hope this update should resolve your issue.
Thanks.
@nixrajput
from flutter_carousel_widget.
Hi @aisivan36
I'd be happy to resolve and fix your issue related to the package.
Can you share your code snippet and full error description.
Also mention which version you're using?
Thanks
from flutter_carousel_widget.
Hi @aisivan36 I'd be happy to resolve and fix your issue related to the package.
Can you share your code snippet and full error description. Also mention which version you're using?
Thanks
Here is the whole widget that I use
Widget build(BuildContext context) {
final heights = MediaQuery.of(context).size.height * 0.56;
final widths = MediaQuery.of(context).size.width;
final positionHeight = MediaQuery.of(context).size.height * 0.4;
return SizedBox(
height: heights,
child: Stack(
children: [
/// Background blur image on every each
CachedNetworkImage(
imageUrl: widget.movies[current].backdrop,
fit: BoxFit.cover,
height: heights,
),
Positioned(
child: ClipRRect(
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 50, sigmaY: 100),
child: Container(
height: heights,
width: widths,
color: const Color.fromARGB(61, 0, 0, 0),
// color: Colors.black.withOpacity(0.5),
alignment: Alignment.topCenter,
child: SafeArea(
/// MovieDB title
child: Container(
child: Padding(
padding: const EdgeInsets.only(
left: 50, right: 50, top: 9, bottom: 9),
child: Padding(
padding: const EdgeInsets.only(top: 1.0, bottom: 1.0),
child: Text(
'MovieDB',
style: heading.copyWith(
color: Theme.of(context).primaryColor,
),
),
),
),
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(13),
bottomRight: Radius.circular(13)),
color: Color.fromARGB(134, 20, 199, 44),
// border: Border(
// bottom: BorderSide(
// color: Colors.grey,
// width: 0.6,
// ),
// ),
),
),
//
),
),
),
),
),
Positioned(
bottom: 0,
left: 0,
right: 0,
top: 0,
child: Container(
height: positionHeight,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.bottomCenter,
end: Alignment.topCenter,
colors: [
Colors.black38.withOpacity(1),
Colors.black38.withOpacity(1),
Colors.black38.withOpacity(.7),
Colors.black38.withOpacity(.6),
Colors.black38.withOpacity(.4),
Colors.black38.withOpacity(.3),
Colors.black38.withOpacity(0.5),
Colors.black38.withOpacity(0.3),
Colors.black38.withOpacity(0.0),
Colors.black38.withOpacity(0.0),
],
),
),
),
),
Positioned(
bottom: 0,
height: positionHeight,
width: widths,
child: DelayedDisplay(
delay: const Duration(microseconds: 800),
child: SizedBox(
height: 350,
width: 460,
child: CarouselSlider(
options: CarouselOptions(
// pageSnapping: true,
// disableCenter: true,
height: positionHeight,
aspectRatio: 16 / 9,
viewportFraction: 0.85,
enlargeCenterPage: true,
enlargeStrategy: CenterPageEnlargeStrategy.height,
onPageChanged: (index, reason) {
setState(() {
current = index;
});
},
),
carouselController: carouselController,
items: widget.movies.map((movie) {
return Builder(
builder: (BuildContext context) {
return InkWell(
onTap: () {
pushNewScreen(
context,
MovieDetailScreen(
backdrop: movie.backdrop,
id: movie.id,
));
},
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
boxShadow: kElevationToShadow[8],
borderRadius: BorderRadius.circular(10),
),
child: DelayedDisplay(
delay: const Duration(microseconds: 800),
slidingBeginOffset:
const Offset(0.0, -0.01),
child: ClipRRect(
borderRadius: BorderRadius.circular(10),
child: CachedNetworkImage(
imageUrl: movie.backdrop,
width: double.infinity,
height: (MediaQuery.of(context)
.size
.height *
.38) *
.6,
progressIndicatorBuilder: (context,
url, downloadProgress) =>
Container(
color: Colors.grey.shade900,
),
fit: BoxFit.cover),
),
),
),
const SizedBox(height: 20),
if (current == widget.movies.indexOf(movie))
DelayedDisplay(
delay: const Duration(microseconds: 800),
slidingBeginOffset:
const Offset(0.0, -0.10),
child: Text(
movie.title,
maxLines: 2,
textAlign: TextAlign.center,
style: const TextStyle(
overflow: TextOverflow.ellipsis,
fontSize: 18.0,
color: Colors.white,
fontWeight: FontWeight.bold),
),
),
const SizedBox(height: 6),
if (current == widget.movies.indexOf(movie))
Expanded(
flex: 1,
child: DelayedDisplay(
delay: const Duration(microseconds: 900),
slidingBeginOffset:
const Offset(0.0, -0.10),
child: Text(
movie.releaseDate,
style: normalText.copyWith(
color: Colors.white60,
fontSize: 16),
),
),
),
],
),
),
);
},
);
}).toList(),
),
),
),
),
],
),
);
}
from flutter_carousel_widget.
That was I use Carousel Slider, but it's the same happened with your custom flutter carousel widget actually no difference, got the same error when enabling enlargeCenterPage: true
it caused the error message that given above
from flutter_carousel_widget.
Related Issues (20)
- Stateful widget not being restored with ValueKey HOT 4
- Indicator not working properly for last item when using padEnds : false with viewportFraction less than 1
- carouselController is missing from CarouselOptions function definition HOT 1
- how remove 'setState' error log? HOT 2
- set custom slide indicator HOT 1
- [Bug]: [3.7.12] page changed reason is always controller. HOT 1
- [Bug]: Infinite-scrolling carousels get out of sync with their indicators.
- [Feature Request]: Maximum height value HOT 2
- [Feature Request]: Make image transitions smooth HOT 1
- License HOT 2
- [Bug]: Indicator remains half-filled when padEnds: false HOT 1
- Portrait images do not fill the available space on iPad
- [Bug]: it crashes
- Feature: Tap indicator change slider HOT 3
- [Bug]: The original package is not listed in the license. HOT 1
- [Feature Request]: Itens with shadowed borders
- [Feature Request]: Expose SlideIndicator contract
- [Bug]: initialPage parameter should affect the slide indicators HOT 1
- [Feature Request]: Add Test Cases
- A method to know center item
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_carousel_widget.