#GridView #flutter #slowtech
The main axis direction of a grid is the direction in which it scrolls (the scrollDirection).
The most commonly used grid layouts are GridView.count, which creates a layout with a fixed number of tiles in the cross axis, and GridView.extent, which creates a layout with tiles that have a maximum cross-axis extent. A custom SliverGridDelegate can produce an arbitrary 2D arrangement of children, including arrangements that are unaligned or overlapping.
To create a grid with a large (or infinite) number of children, use the GridView.builder constructor with either a SliverGridDelegateWithFixedCrossAxisCount or a SliverGridDelegateWithMaxCrossAxisExtent for the gridDelegate.
To use a custom SliverChildDelegate, use GridView.custom.
To create a linear array of children, use a ListView.
To control the initial scroll offset of the scroll view, provide a controller with its ScrollController.initialScrollOffset property set.
Transitioning to CustomScrollView
A GridView is basically a CustomScrollView with a single SliverGrid in its CustomScrollView.slivers property.
If GridView is no longer sufficient, for example because the scroll view is to have both a grid and a list, or because the grid is to be combined with a SliverAppBar, etc, it is straight-forward to port code from using GridView to using CustomScrollView directly.
The key, scrollDirection, reverse, controller, primary, physics, and shrinkWrap properties on GridView map directly to the identically named properties on CustomScrollView.
The CustomScrollView.slivers property should be a list containing just a SliverGrid.
The childrenDelegate property on GridView corresponds to the SliverGrid.delegate property, and the gridDelegate property on the GridView corresponds to the SliverGrid.gridDelegate property.
The GridView, GridView.count, and GridView.extent constructors' children arguments correspond to the childrenDelegate being a SliverChildListDelegate with that same argument. The GridView.builder constructor's itemBuilder and childCount arguments correspond to the childrenDelegate being a SliverChildBuilderDelegate with the matching arguments.
The GridView.count and GridView.extent constructors create custom grid delegates, and have equivalently named constructors on SliverGrid to ease the transition: SliverGrid.count and SliverGrid.extent respectively.
The padding property corresponds to having a SliverPadding in the CustomScrollView.slivers property instead of the grid itself, and having the SliverGrid instead be a child of the SliverPadding.
By default, ListView will automatically pad the list's scrollable extremities to avoid partial obstructions indicated by MediaQuery's padding. To avoid this behavior, override with a zero padding property.
Once code has been ported to use CustomScrollView, other slivers, such as SliverList or SliverAppBar, can be put in the CustomScrollView.slivers list.
👨💻Flutter Course
1. Text View widget in flutter
2. Button widget in flutter
3. Edit Text widget in flutter
4. Radio Button & Radio group widgets in flutter
5. Check box widget in flutter
6. Switch widget in flutter
7. Toggle Button widget in flutter
8. Rating Bar widget in flutter
9. Seek Bar widget in flutter
10. Progress Bar widget in flutter
11. Spinner widget in flutter
12. Time picker widget in flutter
13. Date Picker widget in flutter
14. Simple and Custom Toast widget in flutter
15. Alert Dialog in flutter
🔥Menu Bars
1. Action Bar in flutter
2. Option Menu in flutter
3. Context Menu in flutter
4. Popup Menu in flutter
🔥 Intents
1. Explicit intents in flutter
2. Implicit Intents in flutter
3. Share in flutter
4. Call in flutter
5. Message in flutter
🔥Advanced
1. Splash Screen in flutter
2. List View in flutter
3. Grid View in flutter
4. Tab View in flutter
5. Video View in flutter
6. Audio View in flutter
7. Image slider in flutter
8. Send SMS in flutter
9. Send Email in flutter
10. Send Call in flutter
11. Blue Tooth in flutter
12. Map Navigation in flutter
13. Text Switcher in flutter
14. Image Switcher in flutter
15. Stack View in flutter
16. Bottom Sheet in flutter
17. Navigation Drawer in flutter
18. Notification in flutter
19. Tab View in flutter
20. Sql Lite Database in flutter
🔥Ecommerce App Project in flutter
#xml file,
design layout designing,
#E-commerce Application development
#Cooking application designing
#poetry Application development
#university Management App
🔥Android app development full course:
• Introduction to android app development #1...
🔥Freelancing complete course:
• Create first gig on Fiverr part1 || Full c...
🔥Flutter Mobile app development course:
• Flutter introduction for Mobile developmen...
🔥Android Apps with source code:
• eCommerce App development With source co...