@@ -3,6 +3,8 @@ import 'package:walletconnect_modal_flutter/constants/constants.dart';
33import 'package:walletconnect_modal_flutter/models/listings.dart' ;
44import 'package:walletconnect_modal_flutter/pages/wallet_list_long_page.dart' ;
55import 'package:walletconnect_modal_flutter/services/explorer/explorer_service_singleton.dart' ;
6+ import 'package:walletconnect_modal_flutter/services/utils/platform/i_platform_utils.dart' ;
7+ import 'package:walletconnect_modal_flutter/services/utils/platform/platform_utils_singleton.dart' ;
68import 'package:walletconnect_modal_flutter/services/utils/widget_stack/widget_stack_singleton.dart' ;
79import 'package:walletconnect_modal_flutter/services/walletconnect_modal/i_walletconnect_modal_service.dart' ;
810import 'package:walletconnect_modal_flutter/widgets/grid_list/grid_list.dart' ;
@@ -20,39 +22,50 @@ class QRCodeAndWalletListPage extends StatelessWidget {
2022 Widget build (BuildContext context) {
2123 final IWalletConnectModalService service =
2224 WalletConnectModalProvider .of (context).service;
23-
25+ final pType = platformUtils.instance. getPlatformType ();
2426 return WalletConnectModalNavBar (
2527 title: const WalletConnectModalNavbarTitle (
2628 title: 'Connect your wallet' ,
2729 ),
28- child: Column (
29- mainAxisSize: MainAxisSize .min,
30- children: < Widget > [
31- QRCodeWidget (
32- service: service,
33- logoPath: 'assets/walletconnect_logo_white.png' ,
34- ),
35- GridList (
36- state: GridListState .extraShort,
37- provider: explorerService.instance! ,
38- viewLongList: () {
39- widgetStack.instance.add (
40- const WalletListLongPage (),
41- );
42- },
43- onSelect: (WalletData data) {
44- service.connectWallet (
45- walletData: data,
46- );
47- },
48- createListItem: (info, iconSize) {
49- return GridListWalletItem (
50- listItem: info,
51- imageSize: iconSize,
52- );
53- },
30+ child: ConstrainedBox (
31+ constraints: BoxConstraints (
32+ maxWidth: (pType == PlatformType .mobile) ? double .infinity : 360 ,
33+ maxHeight: (pType == PlatformType .mobile) ? double .infinity : 482 ,
34+ ),
35+ child: SingleChildScrollView (
36+ child: Column (
37+ mainAxisSize: MainAxisSize .min,
38+ children: < Widget > [
39+ QRCodeWidget (
40+ service: service,
41+ logoPath: 'assets/walletconnect_logo_white.png' ,
42+ ),
43+ Visibility (
44+ visible: (pType == PlatformType .mobile),
45+ child: GridList (
46+ state: GridListState .extraShort,
47+ provider: explorerService.instance! ,
48+ viewLongList: () {
49+ widgetStack.instance.add (
50+ const WalletListLongPage (),
51+ );
52+ },
53+ onSelect: (WalletData data) {
54+ service.connectWallet (
55+ walletData: data,
56+ );
57+ },
58+ createListItem: (info, iconSize) {
59+ return GridListWalletItem (
60+ listItem: info,
61+ imageSize: iconSize,
62+ );
63+ },
64+ ),
65+ ),
66+ ],
5467 ),
55- ] ,
68+ ) ,
5669 ),
5770 );
5871 }
0 commit comments