@@ -15,6 +15,7 @@ enum GridListState { short, long, extraShort }
1515
1616class GridList <T > extends StatelessWidget {
1717 static const double tileSize = 60 ;
18+ static const double smallTileSize = 50 ;
1819 static double getTileBorderRadius (double tileSize) => tileSize / 4.0 ;
1920
2021 const GridList ({
@@ -61,6 +62,7 @@ class GridList<T> extends StatelessWidget {
6162 Widget _buildGridList (BuildContext context) {
6263 final WalletConnectModalThemeData themeData =
6364 WalletConnectModalTheme .getData (context);
65+ final size = MediaQuery .of (context).size;
6466
6567 final bool longBottomSheet = platformUtils.instance.isLongBottomSheet (
6668 MediaQuery .of (context).orientation,
@@ -74,11 +76,11 @@ class GridList<T> extends StatelessWidget {
7476 switch (state) {
7577 case GridListState .short:
7678 itemCount = min (8 , value.length);
77- height = longBottomSheet ? 120 : 240 ;
79+ height = longBottomSheet ? 120 : (size.height * 0.3 ) ;
7880 break ;
7981 case GridListState .long:
8082 itemCount = value.length;
81- height = longBottomSheet ? 240 : 600 ;
83+ height = longBottomSheet ? 240 : (size.height * 0.6 ) ;
8284 break ;
8385 case GridListState .extraShort:
8486 itemCount = min (4 , value.length);
@@ -130,6 +132,9 @@ class GridList<T> extends StatelessWidget {
130132 onSelect: () => onSelect (value[index].data),
131133 child: WalletImage (
132134 imageUrl: value[index].image,
135+ imageSize: size.height < 700.0
136+ ? GridList .smallTileSize
137+ : GridList .tileSize,
133138 ),
134139 );
135140 }
@@ -147,6 +152,7 @@ class GridList<T> extends StatelessWidget {
147152 ) {
148153 final WalletConnectModalThemeData themeData =
149154 WalletConnectModalTheme .getData (context);
155+ final size = MediaQuery .of (context).size;
150156
151157 List <Widget > images = [];
152158
@@ -169,7 +175,8 @@ class GridList<T> extends StatelessWidget {
169175 onSelect: viewLongList ?? () {},
170176 child: Container (
171177 width: GridList .tileSize,
172- height: GridList .tileSize,
178+ height:
179+ size.height < 700.0 ? GridList .smallTileSize : GridList .tileSize,
173180 padding: const EdgeInsets .all (2.0 ),
174181 decoration: BoxDecoration (
175182 color: themeData.background200,
0 commit comments