|
| 1 | +import 'dart:io'; |
| 2 | + |
1 | 3 | import 'package:flutter/material.dart'; |
2 | 4 | import 'package:flutter_riverpod/flutter_riverpod.dart'; |
3 | 5 | import 'package:lucide_icons/lucide_icons.dart'; |
@@ -126,48 +128,82 @@ class _BillingScreenState extends ConsumerState<BillingScreen> { |
126 | 128 | ), |
127 | 129 | ), |
128 | 130 |
|
129 | | - // Get Storage Section |
130 | | - _buildSection( |
131 | | - context, |
132 | | - title: 'Get Storage', |
133 | | - child: Padding( |
134 | | - padding: const EdgeInsets.all(16), |
135 | | - child: Column( |
136 | | - crossAxisAlignment: CrossAxisAlignment.start, |
137 | | - children: [ |
138 | | - Text( |
139 | | - 'Select Network', |
140 | | - style: Theme.of(context).textTheme.labelMedium?.copyWith( |
141 | | - color: Theme.of(context).colorScheme.onSurfaceVariant, |
142 | | - ), |
143 | | - ), |
144 | | - const SizedBox(height: 8), |
145 | | - ChainSelector( |
146 | | - selectedChain: state.selectedChain, |
147 | | - onChainSelected: (chain) { |
148 | | - ref.read(billingProvider.notifier).selectChain(chain); |
149 | | - }, |
150 | | - ), |
151 | | - const SizedBox(height: 16), |
152 | | - SizedBox( |
153 | | - width: double.infinity, |
154 | | - child: FilledButton.icon( |
155 | | - onPressed: () => _showPurchaseDialog(), |
156 | | - icon: const Icon(LucideIcons.hardDrive), |
157 | | - label: const Text('Get Storage'), |
| 131 | + // Get Storage Section (hidden on iOS for App Store compliance) |
| 132 | + if (!Platform.isIOS) |
| 133 | + _buildSection( |
| 134 | + context, |
| 135 | + title: 'Get Storage', |
| 136 | + child: Padding( |
| 137 | + padding: const EdgeInsets.all(16), |
| 138 | + child: Column( |
| 139 | + crossAxisAlignment: CrossAxisAlignment.start, |
| 140 | + children: [ |
| 141 | + Text( |
| 142 | + 'Select Network', |
| 143 | + style: Theme.of(context).textTheme.labelMedium?.copyWith( |
| 144 | + color: Theme.of(context).colorScheme.onSurfaceVariant, |
| 145 | + ), |
158 | 146 | ), |
159 | | - ), |
160 | | - const SizedBox(height: 8), |
161 | | - Text( |
162 | | - 'Connect wallet, select amount, and confirm transfer', |
163 | | - style: Theme.of(context).textTheme.bodySmall?.copyWith( |
164 | | - color: Theme.of(context).colorScheme.onSurfaceVariant, |
165 | | - ), |
166 | | - ), |
167 | | - ], |
| 147 | + const SizedBox(height: 8), |
| 148 | + ChainSelector( |
| 149 | + selectedChain: state.selectedChain, |
| 150 | + onChainSelected: (chain) { |
| 151 | + ref.read(billingProvider.notifier).selectChain(chain); |
| 152 | + }, |
| 153 | + ), |
| 154 | + const SizedBox(height: 16), |
| 155 | + SizedBox( |
| 156 | + width: double.infinity, |
| 157 | + child: FilledButton.icon( |
| 158 | + onPressed: () => _showPurchaseDialog(), |
| 159 | + icon: const Icon(LucideIcons.hardDrive), |
| 160 | + label: const Text('Get Storage'), |
| 161 | + ), |
| 162 | + ), |
| 163 | + const SizedBox(height: 8), |
| 164 | + Text( |
| 165 | + 'Connect wallet, select amount, and confirm transfer', |
| 166 | + style: Theme.of(context).textTheme.bodySmall?.copyWith( |
| 167 | + color: Theme.of(context).colorScheme.onSurfaceVariant, |
| 168 | + ), |
| 169 | + ), |
| 170 | + ], |
| 171 | + ), |
| 172 | + ), |
| 173 | + ) |
| 174 | + else |
| 175 | + _buildSection( |
| 176 | + context, |
| 177 | + title: 'Get Storage', |
| 178 | + child: Padding( |
| 179 | + padding: const EdgeInsets.all(16), |
| 180 | + child: Column( |
| 181 | + children: [ |
| 182 | + Icon( |
| 183 | + LucideIcons.externalLink, |
| 184 | + size: 48, |
| 185 | + color: Theme.of(context).colorScheme.primary, |
| 186 | + ), |
| 187 | + const SizedBox(height: 12), |
| 188 | + Text( |
| 189 | + 'Manage your storage at fula.network', |
| 190 | + style: Theme.of(context).textTheme.bodyMedium?.copyWith( |
| 191 | + color: Theme.of(context).colorScheme.onSurface, |
| 192 | + ), |
| 193 | + textAlign: TextAlign.center, |
| 194 | + ), |
| 195 | + const SizedBox(height: 4), |
| 196 | + Text( |
| 197 | + 'Storage capacity can be acquired through the Fula Network web platform', |
| 198 | + style: Theme.of(context).textTheme.bodySmall?.copyWith( |
| 199 | + color: Theme.of(context).colorScheme.onSurfaceVariant, |
| 200 | + ), |
| 201 | + textAlign: TextAlign.center, |
| 202 | + ), |
| 203 | + ], |
| 204 | + ), |
168 | 205 | ), |
169 | 206 | ), |
170 | | - ), |
171 | 207 |
|
172 | 208 | // Credit History Section |
173 | 209 | _buildSection( |
|
0 commit comments