smart_gridded_pageview 0.0.3 copy "smart_gridded_pageview: ^0.0.3" to clipboard
smart_gridded_pageview: ^0.0.3 copied to clipboard

Automatically wrap the content, produce the height according to the content, and support page turning custom indicator

Automatically wrap the content, produce the height according to the content, and support page turning custom indicator

Pageview is unable to adapt to the height of the content, and this control solves this problem, the effect of this control as shown in the picture, support to set the minimum height, in order to solve the problem of the height of each page caused by different height, in addition to support custom indicators,
pageview 是无法自适应内容高度的,而本控件解决了这个问题,本控件的效果如 图片所示,支持设置最小高度,以便解决每一页高度不同导致的高度跳动问题,另外也支持自定义指示器,

Features #

y this ispic

Getting started #

GridPageView( column: 5, minheight: 0, row: 2, children: [] )

Usage #



    GridPageView(
                column: 5,
                minheight: 0,
                row: 2,
                columnSpacing: 5,
                indicatorBuild: (controller, focused, index) {
                  return GestureDetector(
                      onTap: () {
                        // setState(() {
                        //           _currentPage = i;
                        //         });

                        controller.animateToPage(index,
                            duration: const Duration(milliseconds: 200),
                            curve: Curves.linear);
                      },
                      child: Container(
                          padding: const EdgeInsets.all(5),
                          height: 50,
                          color: focused ? Colors.red : Colors.grey));
                },
                children: 'abcdefghijklmnopqrstuvwxyz'
                    .codeUnits
                    .asMap()
                    .entries
                    .map((e) {
                  return Container(
                      color: e.key % 2 == 0 ? Colors.blue : Colors.yellow,
                      height: 30,
                      child: Text(
                          "${e.key} = ${e.value}/${String.fromCharCodes([
                            e.value
                          ])}"));
                }).toList())

                

or

If you don't need custom indicators, you can do so using the following code

  GridPageView(
                column: 5,
                minheight: 5,
                row: 2,
                children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
                    .asMap()
                    .entries
                    .map((e) {
                  return Container(
                      color: e.key % 2 == 0 ? Colors.blue : Colors.yellow,
                      height: 30,
                      child: Text("${e.key} = ${e.value}"));
                }).toList())


GridPageView(
                column: 5,
                minheight: 5,
                row: 2,
                children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
                    .asMap()
                    .entries
                    .map((e) {
                  return Container(
                      color: e.key % 2 == 0 ? Colors.blue : Colors.yellow,
                      height: 30,
                      child: Text("${e.key} = ${e.value}"));
                }).toList())

Additional information #

TODO: Tell users more about the package: where to find more information, how to contribute to the package, how to file issues, what response they can expect from the package authors, and more.

grid pageview #

Automatically wrap the content, produce the height according to the content, and support page turning custom indicator

Pageview is unable to adapt to the height of the content, and this control solves this problem, the effect of this control as shown in the picture, support to set the minimum height, in order to solve the problem of the height of each page caused by different height, in addition to support custom indicators,
pageview 是无法自适应内容高度的,而本控件依赖了另外一个插件解决了这个问题,本控件的效果如上图 图片所示,支持设置最小高度,以便解决每一页高度不同导致的高度跳动问题,另外也支持自定义指示器。 截图为example文件夹的lib/main.dart运行之后的效果

qq group:748171411

0
likes
100
pub points
31%
popularity

Publisher

verified publisherlozn.top

Automatically wrap the content, produce the height according to the content, and support page turning custom indicator

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

expandable_page_view, flutter

More

Packages that depend on smart_gridded_pageview