Skip to content

Commit 0c15bc0

Browse files
committed
bumped to version 3.1.0
1 parent 9d459ab commit 0c15bc0

File tree

7 files changed

+140
-9
lines changed

7 files changed

+140
-9
lines changed

.github/pull_request_template.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
## What does this PR do?
2+
3+
<!-- **Please provide a clear and concise description of the changes in this PR.** Example: -->
4+
5+
- Adds/improves functionality for the carousel widget
6+
- Fixes bugs or issues
7+
- Adds new features like autoplay, infinite scrolling, etc.
8+
- Optimizes performance or enhances accessibility
9+
10+
### **Checklist**
11+
12+
#### Code Changes
13+
- [ ] I have added new features to the carousel widget (e.g., autoplay, indicator customization, etc.)
14+
- [ ] I have fixed existing issues (e.g., performance, edge cases)
15+
- [ ] I have improved the overall structure or optimized the codebase
16+
17+
#### Documentation
18+
- [ ] I have updated the README file or relevant documentation with the changes
19+
- [ ] I have added code usage examples or updated existing examples to reflect changes
20+
- [ ] I have updated the package version in the `pubspec.yaml` file
21+
22+
#### Testing
23+
24+
**General Tests**
25+
- [ ] The carousel widget works correctly with default settings
26+
- [ ] The carousel can handle a dynamic number of children (images, texts, etc.)
27+
- [ ] The carousel supports custom widgets for carousel items
28+
29+
**Autoplay Feature**
30+
- [ ] Autoplay starts when enabled and stops when disabled
31+
- [ ] Autoplay pauses when the user interacts (swipes/taps) with the carousel
32+
- [ ] Autoplay resumes after interaction
33+
34+
**Indicators and Customization**
35+
- [ ] The carousel displays indicators correctly and updates when navigating through slides
36+
- [ ] Custom indicators (colors, shapes, positions) are rendered correctly
37+
- [ ] Custom animations or transitions between slides work as expected
38+
39+
**Looping and Scrolling**
40+
- [ ] Infinite loop mode works smoothly without any jumps or glitches
41+
- [ ] The carousel scrolls smoothly horizontally and/or vertically
42+
- [ ] Pagination and snapping behavior works as expected
43+
44+
**Accessibility**
45+
- [ ] The carousel widget supports screen readers (e.g., `Semantics` labels added)
46+
- [ ] Users can navigate between items using a keyboard (if necessary)
47+
48+
**Responsiveness**
49+
- [ ] The carousel adapts to different screen sizes (mobile, tablet, desktop)
50+
- [ ] The carousel responds correctly to device orientation changes
51+
52+
**Error Handling**
53+
- [ ] The carousel handles empty/null items gracefully
54+
- [ ] The carousel handles large data sets without crashes or performance drops
55+
56+
#### Performance
57+
- [ ] I ran performance tests to ensure no regressions
58+
- [ ] The carousel renders efficiently, even with a large number of items
59+
60+
### How did you verify your code works?
61+
62+
<!-- **Please explain how you tested the code changes.** Example: -->
63+
64+
- I have written unit tests covering the new features
65+
- I ran manual tests to check various carousel configurations (autoplay, infinite loop, custom widgets)
66+
- I verified the carousel on different devices and screen sizes
67+
- All tests pass locally (`flutter test`)

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 3.1.0
4+
5+
- **Security**: Added `SECURITY.md` for vulnerability reporting and security best practices.
6+
- **Enhancement**: Added a `Pull Request template` to ensure thorough checks for new contributions.
7+
- **Fix**: [`issue #56`](https://github.com/nixrajput/flutter_carousel_widget/issues/56) fixed.
8+
- **Fix**: [`issue #55`](https://github.com/nixrajput/flutter_carousel_widget/issues/55) fixed.
9+
310
## 3.0.1
411

512
- **Improvement**: Added comments to the classes, controllers, states, options, enums, and indicators.

SECURITY.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
The following versions of the `flutter_carousel_widget` package are currently being supported with security updates:
6+
7+
| Version | Supported |
8+
|---------|--------------------|
9+
| 3.x.x | :white_check_mark: |
10+
| 2.x.x | :white_check_mark: |
11+
| 1.x.x | :x: |
12+
13+
If you are using an older, unsupported version, we recommend upgrading to the latest version to benefit from security fixes.
14+
15+
## Reporting a Vulnerability
16+
17+
We take security issues seriously. If you discover any security vulnerabilities or potential issues in the carousel widget package, please report them to us privately to allow us to investigate and address the issue before it is publicly disclosed.
18+
19+
### To report a vulnerability:
20+
21+
- **Email:** [`nkr.nikhil.nkr@gmail.com`, `nixlab.in@gmail.com`]
22+
- **Subject:** Security Issue in FlutterCarouselWidget Package
23+
- **Information to include:**
24+
- A description of the vulnerability
25+
- Steps to reproduce (if applicable)
26+
- The impact of the vulnerability
27+
- Any potential fixes or patches
28+
29+
Please **do not** publicly disclose security vulnerabilities until we have confirmed and addressed them. We will work quickly to investigate and fix the issue.
30+
31+
### Response Time:
32+
33+
We aim to respond to vulnerability reports within **48 hours** and will work closely with you to understand and resolve the issue as quickly as possible.
34+
35+
## Security Best Practices
36+
37+
When using the Flutter carousel widget package in your project, consider the following security best practices:
38+
39+
1. **Keep the package up to date:**
40+
Always use the latest version of the carousel widget package to ensure you have the most recent security fixes and updates.
41+
42+
2. **Review dependencies:**
43+
Ensure that all other dependencies in your project are up-to-date and free from vulnerabilities. Use tools like `pub outdated` to identify and update outdated packages.
44+
45+
3. **Input Validation:**
46+
When using dynamic content (e.g., image URLs, widgets) with the carousel, validate and sanitize any external data to prevent potential attacks like XSS or injection attacks.
47+
48+
4. **User Interaction:**
49+
Ensure that user interaction with the carousel widget (e.g., gestures, swipes) does not open the door for unintended behavior or exploits.
50+
51+
## Patching and Updates
52+
53+
We commit to regularly reviewing and updating the package with necessary security patches. Critical security vulnerabilities will be patched and released as soon as possible. If a critical fix is required, we will:
54+
55+
- Prioritize the vulnerability fix
56+
- Release a patch version immediately
57+
- Notify users through the release notes and the changelog
58+
59+
---
60+
61+
By adhering to these guidelines, you help ensure a more secure experience when using the `flutter_carousel_widget` package.

example/lib/views/standard.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,17 @@ class StandardCarouselDemo extends StatelessWidget {
77

88
@override
99
Widget build(BuildContext context) {
10-
final deviceSize = MediaQuery.of(context).size;
1110
return Scaffold(
1211
appBar: AppBar(title: const Text('Standard Carousel Demo')),
1312
body: Center(
1413
child: Padding(
1514
padding: const EdgeInsets.all(8.0),
1615
child: Container(
17-
constraints: BoxConstraints(maxHeight: deviceSize.width),
1816
child: FlutterCarousel(
1917
options: FlutterCarouselOptions(
2018
autoPlay: true,
2119
autoPlayInterval: const Duration(seconds: 3),
22-
height: deviceSize.height,
20+
height: 200,
2321
viewportFraction: 1.0,
2422
indicatorMargin: 12.0,
2523
enableInfiniteScroll: true,

lib/src/_expandable_carousel_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class _ExpandableCarouselWidgetState extends State<ExpandableCarousel>
428428
),
429429
},
430430
// Wrap the child widget with the gesture detector
431-
child: NotificationListener<ScrollEndNotification>(
431+
child: NotificationListener(
432432
onNotification: (dynamic notification) {
433433
if (widget.options.onScrolled != null &&
434434
notification is ScrollUpdateNotification) {

lib/src/_flutter_carousel_widget.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ class _FlutterCarouselState extends State<FlutterCarousel>
324324
),
325325
},
326326
// Wrap the child widget with the gesture detector
327-
child: NotificationListener<ScrollEndNotification>(
327+
child: NotificationListener(
328328
onNotification: (dynamic notification) {
329329
if (widget.options.onScrolled != null &&
330330
notification is ScrollUpdateNotification) {
@@ -469,15 +469,13 @@ class _FlutterCarouselState extends State<FlutterCarousel>
469469
_getEnlargeWrapper(
470470
child,
471471
height: distortionValue * dimen,
472-
width: distortionValue * dimen,
473472
scale: distortionValue,
474473
),
475474
);
476475
} else {
477476
return _getCenterWrapper(
478477
_getEnlargeWrapper(
479478
child,
480-
width: distortionValue * dimen,
481479
height: distortionValue * dimen,
482480
scale: distortionValue,
483481
),

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_carousel_widget
22
description: A customizable Flutter carousel widget with infinite scrolling, auto-scrolling, pre-built indicators, expandable widgets, auto-sized child support, and enlarged center page.
33

4-
version: 3.0.1
4+
version: 3.1.0
55

66
homepage: https://pub.dev/packages/flutter_carousel_widget
77
repository: https://github.com/nixrajput/flutter_carousel_widget
@@ -19,7 +19,7 @@ dev_dependencies:
1919
flutter_test:
2020
sdk: flutter
2121

22-
lints: ^4.0.0
22+
lints: ^5.0.0
2323

2424
topics:
2525
- carousel

0 commit comments

Comments
 (0)