@@ -5,6 +5,7 @@ import 'package:didpay/features/pfis/pfi.dart';
55import 'package:didpay/features/pfis/pfis_add_page.dart' ;
66import 'package:didpay/features/pfis/pfis_notifier.dart' ;
77import 'package:didpay/features/qr/qr_tabs.dart' ;
8+ import 'package:didpay/features/vcs/vcs_add_page.dart' ;
89import 'package:didpay/features/vcs/vcs_notifier.dart' ;
910import 'package:didpay/l10n/app_localizations.dart' ;
1011import 'package:didpay/shared/modal/modal_manage_item.dart' ;
@@ -200,17 +201,17 @@ class AccountPage extends HookConsumerWidget {
200201 ),
201202 ),
202203 ),
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 (
210210 child:
211211 _buildCredentialTile (context, ref, credentials[index]),
212- ),
213- ),
212+ )
213+ : TileContainer (child: _buildAddCredentialTile (context)),
214+ ),
214215 ],
215216 );
216217
@@ -242,9 +243,9 @@ class AccountPage extends HookConsumerWidget {
242243 ),
243244 );
244245
245- Widget _buildNoCredentialsTile (BuildContext context) => ListTile (
246+ Widget _buildAddCredentialTile (BuildContext context) => ListTile (
246247 title: Text (
247- Loc .of (context).noCredentialsIssuedYet ,
248+ Loc .of (context).addACredential ,
248249 style: Theme .of (context).textTheme.titleSmall,
249250 ),
250251 leading: Container (
@@ -254,11 +255,16 @@ class AccountPage extends HookConsumerWidget {
254255 color: Theme .of (context).colorScheme.surfaceContainer,
255256 borderRadius: BorderRadius .circular (Grid .xxs),
256257 ),
257- child: Center (
258- child:
259- Icon (Icons .error, color: Theme .of (context).colorScheme.outline),
258+ child: const Center (
259+ child: Icon (Icons .add),
260260 ),
261261 ),
262+ onTap: () {
263+ Navigator .push (
264+ context,
265+ MaterialPageRoute (builder: (context) => const VcsAddPage ()),
266+ );
267+ },
262268 );
263269
264270 Widget _buildFeatureFlagsList (
0 commit comments