Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shahi5472/Custom-Horizontal-ListView
As a Flutter Developer, one common issue we encounter is related to horizontal lists. Sometimes, it becomes challenging to maintain dynamic item heights within such lists. However, I have a solution that I'd like to share. By using this code, the horizontal list should now have dynamically sized items, making it more flexible to accommodate various
https://github.com/shahi5472/Custom-Horizontal-ListView
dart flutter flutterapps
Last synced: 3 months ago
JSON representation
As a Flutter Developer, one common issue we encounter is related to horizontal lists. Sometimes, it becomes challenging to maintain dynamic item heights within such lists. However, I have a solution that I'd like to share. By using this code, the horizontal list should now have dynamically sized items, making it more flexible to accommodate various
- Host: GitHub
- URL: https://github.com/shahi5472/Custom-Horizontal-ListView
- Owner: shahi5472
- License: mit
- Created: 2023-07-30T14:25:43.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-07-30T17:16:25.000Z (over 1 year ago)
- Last Synced: 2024-08-01T12:18:06.513Z (6 months ago)
- Topics: dart, flutter, flutterapps
- Language: Dart
- Homepage: https://pub.dev/packages/custom_horizontal_list_view
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Features
As a Flutter Developer, one common issue we encounter is related to horizontal lists. Sometimes,
it becomes challenging to maintain dynamic item heights within such lists. However,
I have a solution that I'd like to share. By using this code, the horizontal
list should now have dynamically sized items, making it more flexible to accommodate various
content heights.## Import it
Now in your Dart code, you can use:
```dart
import 'package:custom_horizontal_list_view/custom_horizontal_list_view.dart';
```This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):
```dart
dependencies:
custom_horizontal_list_view: ^1.0.0
```## Example Code
```dart
CustomHorizontalView(
spaceView: SizedBox(width: 10),
padding: EdgeInsetsDirectional.symmetric(horizontal: 20),
items: List.generate(
10,
(index) {
return Text("INDEX : $index");
},
),
);
```## Additional information
```dart
import 'package:custom_horizontal_list_view/custom_horizontal_list_view.dart';CustomHorizontalListView(
items: [],
spaceView: SizedBox(width: 10),
padding: EdgeInsets.zero,
crossAxisAlignment: CrossAxisAlignment.start,
reverse: false,
physics: BouncingScrollPhysics(),
controller: ScrollController(),
),
```