Comments (3)
Hi, thanks for the feature request. Currently, such a feature is not planned because that would result in maintaining all the parameters in the scroll views as flutter updates them.
But it's still possible to use the options with this package using the ResponsiveGridListBuilder
. It essentially provides the same responsive features as the List / SliverList, but abstracts them a bit. See the README for more information.
You can use it with any scroll view or column like so:
import 'package:flutter/material.dart';
import 'package:responsive_grid_list/responsive_grid_list.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Responsive Grid List Demo',
debugShowCheckedModeBanner: false,
home: DemoPage(),
);
}
}
class DemoPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
// Generate a list of 100 cards containing a text widget with it's index
// and render it using a ResponsiveGridListBuilder
return Scaffold(
appBar: AppBar(title: const Text("SingleChildScrollViewDemo")),
body: ResponsiveGridListBuilder(
horizontalGridMargin: 50,
verticalGridMargin: 50,
minItemWidth: 100,
gridItems: List.generate(
100,
(index) => Container(
color: Colors.lightBlue,
child: Padding(
padding: const EdgeInsets.all(32),
child: Text(
'$index',
textAlign: TextAlign.center,
style: const TextStyle(color: Colors.white),
),
),
),
),
builder: (BuildContext context, List<Widget> items) {
return SingleChildScrollView(
reverse: false,
// ...
// You can pass all parameters the used scroll view offers
child: Column(children: items),
);
},
),
);
}
}
from responsive_grid_list.
Can you add at least a ScrollController to get position.pixels?
from responsive_grid_list.
I'll check that use case some time in the future. Maybe there is a good solution which does not result in maintaining all these parameters and still getting access to them.
from responsive_grid_list.
Related Issues (14)
- ShrinkWrap the GridList HOT 2
- AlwaysScrollableScrollPhysics for scrolling HOT 3
- Max number of items per row HOT 7
- ResponsiveGridList padding issue when scaffold with no AppBar HOT 1
- Propuesta HOT 1
- Load more HOT 1
- Please add a future for enable/disable scrolling HOT 3
- Flutter 3.3. - No way to use PrimaryScrollController on Desktop/Web platforms HOT 2
- dynamic height aka masonry/staggered HOT 1
- Example on lazy loading HOT 1
- Include a way to align the widgets HOT 1
- Is this package is lazy render? HOT 1
- How to use ResponsiveGridListBuilder ? HOT 1
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 responsive_grid_list.