Я пытаюсь создать BottomSheet, где в сетке отображаются разные смайлики, изображения и гифки. Для этого я использую виджет CustomScrollView с SliverPadding и SliverGrid. Моя проблема в том, что я не могу настроить размер изображений и гифок в сетке. Размер смайликов можно легко изменить с помощью свойства fontSize.
Вот мой код на данный момент:
CustomScrollView(
physics: NeverScrollableScrollPhysics(),
primary: false,
slivers: <Widget>[
SliverPadding(
padding: const EdgeInsets.only(top: 40.0),
sliver: SliverGrid.count(
crossAxisSpacing: 50.0,
crossAxisCount: 3,
children: <Widget>[
GestureDetector(
child: const Text('????', textAlign: TextAlign.center, style: TextStyle(fontSize: 30.0)),
onTap: (){
postLike(widget.list[widget.index].reference, widget.currentUser, "like");
Navigator.pop(context);
},
),
GestureDetector(
child: const Text('????', textAlign: TextAlign.center, style: TextStyle(fontSize: 30.0)),
onTap: (){
postLike(widget.list[widget.index].reference, widget.currentUser, "laugh");
Navigator.pop(context);
},
),
GestureDetector(
child: const Text('????', textAlign: TextAlign.center, style: TextStyle(fontSize: 30.0)),
onTap: (){
postLike(widget.list[widget.index].reference, widget.currentUser, "surprised");
Navigator.pop(context);
},
),
GestureDetector(
child: const Text('????', textAlign: TextAlign.center, style: TextStyle(fontSize: 30.0)),
onTap: (){
postLike(widget.list[widget.index].reference, widget.currentUser, "hot");
Navigator.pop(context);
},
),
GestureDetector(
child: const Text('????????', textAlign: TextAlign.center, style: TextStyle(fontSize: 30.0)),
onTap: (){
postLike(widget.list[widget.index].reference, widget.currentUser, "thumbsUp");
Navigator.pop(context);
},
),
GestureDetector(
child: const Text('????????', textAlign: TextAlign.center, style: TextStyle(fontSize: 30.0)),
onTap: (){
postLike(widget.list[widget.index].reference, widget.currentUser, "nice");
Navigator.pop(context);
},
),
GestureDetector(
child: SizedBox(
height: 20,
width: 20,
child: Image.asset('assets/kiss.gif', height: 20, width: 20, fit: BoxFit.fill)),
onTap: (){
postLike(widget.list[widget.index].reference, widget.currentUser, "nice");
Navigator.pop(context);
},
),
],
),
),
],
)
А вот как это выглядит в настоящий момент (губы поцелуя на самом деле движутся):
Как видите, поцелуй - это слишком много, но я не могу отрегулировать его размер. Будь то высота и ширина или упаковка в SizedBox, ничего не работало.
Любые идеи?
С наилучшими пожеланиями.