@@ -5,6 +5,7 @@ import 'package:didpay/features/pfis/pfi.dart';
5
5
import 'package:didpay/features/pfis/pfis_add_page.dart' ;
6
6
import 'package:didpay/features/pfis/pfis_notifier.dart' ;
7
7
import 'package:didpay/features/qr/qr_tabs.dart' ;
8
+ import 'package:didpay/features/vcs/vcs_add_page.dart' ;
8
9
import 'package:didpay/features/vcs/vcs_notifier.dart' ;
9
10
import 'package:didpay/l10n/app_localizations.dart' ;
10
11
import 'package:didpay/shared/modal/modal_manage_item.dart' ;
@@ -200,17 +201,17 @@ class AccountPage extends HookConsumerWidget {
200
201
),
201
202
),
202
203
),
203
- credentials.isEmpty
204
- ? TileContainer (child: _buildNoCredentialsTile (context))
205
- : ListView .builder (
206
- physics: const BouncingScrollPhysics (),
207
- shrinkWrap: true ,
208
- itemCount: credentials.length,
209
- itemBuilder: (context, index) => TileContainer (
204
+ ListView .builder (
205
+ physics: const BouncingScrollPhysics (),
206
+ shrinkWrap: true ,
207
+ itemCount: credentials.length + 1 ,
208
+ itemBuilder: (context, index) => index < credentials.length
209
+ ? TileContainer (
210
210
child:
211
211
_buildCredentialTile (context, ref, credentials[index]),
212
- ),
213
- ),
212
+ )
213
+ : TileContainer (child: _buildAddCredentialTile (context)),
214
+ ),
214
215
],
215
216
);
216
217
@@ -242,9 +243,9 @@ class AccountPage extends HookConsumerWidget {
242
243
),
243
244
);
244
245
245
- Widget _buildNoCredentialsTile (BuildContext context) => ListTile (
246
+ Widget _buildAddCredentialTile (BuildContext context) => ListTile (
246
247
title: Text (
247
- Loc .of (context).noCredentialsIssuedYet ,
248
+ Loc .of (context).addACredential ,
248
249
style: Theme .of (context).textTheme.titleSmall,
249
250
),
250
251
leading: Container (
@@ -254,11 +255,16 @@ class AccountPage extends HookConsumerWidget {
254
255
color: Theme .of (context).colorScheme.surfaceContainer,
255
256
borderRadius: BorderRadius .circular (Grid .xxs),
256
257
),
257
- child: Center (
258
- child:
259
- Icon (Icons .error, color: Theme .of (context).colorScheme.outline),
258
+ child: const Center (
259
+ child: Icon (Icons .add),
260
260
),
261
261
),
262
+ onTap: () {
263
+ Navigator .push (
264
+ context,
265
+ MaterialPageRoute (builder: (context) => const VcsAddPage ()),
266
+ );
267
+ },
262
268
);
263
269
264
270
Widget _buildFeatureFlagsList (
0 commit comments