nggepe / simple_grid

Inspired by bootstrap , This is dynamic grid layout that you can use Like a bootstrap grid, and the size is following material UI break points. But, don't to worry you can customize your break point like here. This package purely using mediaquery, don't worry about the render.
MIT License
16 stars 0 forks source link

34th element breaks sequence of elements. #17

Open ilandblack opened 2 days ago

ilandblack commented 2 days ago

34th element breaks sequence of elements. 12th becomes 1st, 34th -> 22

Flutter 3.24.5 Dart 3.5.4 simple_grid 0.1.4

image

Code to reproduce:

class Test extends StatelessWidget {
  const Test ({
    Key? key,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SingleChildScrollView(
        physics: const AlwaysScrollableScrollPhysics(),
        child: Padding(
          padding: const EdgeInsets.all(kDefaultPadding),
          child: SpGrid(
            width: MediaQuery.of(context).size.width,
            spacing: kDefaultPadding / 2,
            runSpacing: kDefaultPadding,
            children: [
              for (int i = 1; i <= 34; i++)
                SpGridItem(
                  sm: 12,
                  lg: 4,
                  child: Container(
                    height: 50,
                    color: Color(0xFF000000),
                    child: Center(child: Text('$i')),
                  ),
                ),
            ],
          ),
        ),
      ),
    );
  }
}

BTW Thanks for the lib. Best grid i found.

nggepe commented 1 day ago

thank you for reporting this issue. I'll check it soon