Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abdalftahsalem/pagination_scroll_get
A Flutter package than allow expand and collapse text dynamically horizontal or vertical.
https://github.com/abdalftahsalem/pagination_scroll_get
Last synced: about 2 months ago
JSON representation
A Flutter package than allow expand and collapse text dynamically horizontal or vertical.
- Host: GitHub
- URL: https://github.com/abdalftahsalem/pagination_scroll_get
- Owner: AbdAlftahSalem
- License: mit
- Created: 2023-06-19T16:12:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-17T17:04:15.000Z (over 1 year ago)
- Last Synced: 2023-07-18T10:44:39.151Z (over 1 year ago)
- Language: C++
- Homepage: https://pub.dev/packages/pagination_scroll_get
- Size: 40 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# readmore
A Flutter package than allow expand and collapse text dynamically horizontal or vertical.
## usage:
add to your pubspec
```
pagination_scroll_get: ^0.0.1
```and import:
```
import 'package:pagination_scroll_get/pagination_scroll.dart';
``````dart
class MyApp extends StatelessWidget {
MyApp({super.key});ScrollController scrollController = ScrollController();
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Material App',
home: Scaffold(
appBar: AppBar(),
body: GetBuilder(
init: GetData(),
builder: (logic) {
return logic.apiCallStatus == ApiCallStatus.loading
? const Center(child: CupertinoActivityIndicator()
)
: PaginationScrollScreen(
showWidget: ListView.separated(
controller: scrollController,
itemCount: logic.posts.length,
scrollDirection: Axis.horizontal,
itemBuilder: (context, index) => Container(
margin: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 12,
),
decoration:
BoxDecoration(color: Colors.white, boxShadow: [
BoxShadow(color: Colors.grey.withOpacity(0.2)),
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 16),
Text(
logic.posts[index].title,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
),
),
const SizedBox(height: 16),
Text(
logic.posts[index].body,
style: const TextStyle(
fontSize: 16,
),
),
],
),
),
separatorBuilder: (context, index) => const SizedBox(
height: 20,
),
),
scrollController: scrollController,
loadingFunction: () => logic.loadMoreData(),
scrollDirection: Axis.horizontal,
);
},
),
),
);
}
}```