main.dart
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
theme: ThemeData(primarySwatch: Colors.blue),
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - GridView Disable Scroll")
),
body: bodyContent()
)
)
);
}
bodyContent(){
return GridView.count(
physics: const NeverScrollableScrollPhysics(), // disable scrolling
crossAxisCount: 3,
children: List.generate(125, (index){
return Card(
color: Colors.indigo.shade600,
child: Center(
child: Text(
"${index+1}",
style: const TextStyle(
color: Colors.white70,
fontWeight: FontWeight.bold
)
)
)
);
})
);
}
More flutter tutorials
- flutter – How to create horizontal GridView
- flutter – GridView horizontal scroll
- flutter – GridView in column
- flutter – GridView onTap
- flutter – How to use Card
- flutter – Card border radius
- flutter – Card height
- flutter – Card circle image
- flutter – Card circle image padding
- flutter – Card rounded corners image
- flutter – Column full width
- flutter – Column align left
- flutter – Column center
- flutter – Row center vertically
- flutter – Row background color