@@ -14,6 +14,7 @@ enum GridListState { short, long, extraShort }
1414
1515class GridList <T > extends StatelessWidget {
1616 static const double tileSize = 60 ;
17+ static const double smallTileSize = 50 ;
1718 static double getTileBorderRadius (double tileSize) => tileSize / 4.0 ;
1819
1920 const GridList ({
@@ -60,6 +61,7 @@ class GridList<T> extends StatelessWidget {
6061 Widget _buildGridList (BuildContext context) {
6162 final WalletConnectModalThemeData themeData =
6263 WalletConnectModalTheme .getData (context);
64+ final size = MediaQuery .of (context).size;
6365
6466 final bool longBottomSheet = platformUtils.instance.isLongBottomSheet (
6567 MediaQuery .of (context).orientation,
@@ -73,11 +75,11 @@ class GridList<T> extends StatelessWidget {
7375 switch (state) {
7476 case GridListState .short:
7577 itemCount = min (8 , value.length);
76- height = longBottomSheet ? 120 : 240 ;
78+ height = longBottomSheet ? 120 : (size.height * 0.3 ) ;
7779 break ;
7880 case GridListState .long:
7981 itemCount = value.length;
80- height = longBottomSheet ? 240 : 600 ;
82+ height = longBottomSheet ? 240 : (size.height * 0.6 ) ;
8183 break ;
8284 case GridListState .extraShort:
8385 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