mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
CardView: Make it responsive
This commit is contained in:
@ -34,14 +34,14 @@ class CardView extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
var gridView = StaggeredGridView.countBuilder(
|
var gridView = StaggeredGridView.extentBuilder(
|
||||||
crossAxisCount: 4,
|
|
||||||
itemCount: folder.notes.length,
|
itemCount: folder.notes.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
var note = folder.notes[index];
|
var note = folder.notes[index];
|
||||||
return NoteTile(note, noteSelectedFunction);
|
return NoteTile(note, noteSelectedFunction);
|
||||||
},
|
},
|
||||||
staggeredTileBuilder: (int i) => const StaggeredTile.fit(2),
|
maxCrossAxisExtent: 200.0,
|
||||||
|
staggeredTileBuilder: (int i) => const StaggeredTile.fit(1),
|
||||||
mainAxisSpacing: 8.0,
|
mainAxisSpacing: 8.0,
|
||||||
crossAxisSpacing: 8.0,
|
crossAxisSpacing: 8.0,
|
||||||
padding: const EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 16.0),
|
padding: const EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 16.0),
|
||||||
|
Reference in New Issue
Block a user