diff --git a/lib/pages/account_info.dart b/lib/pages/account_info.dart index 9544857d..208517db 100644 --- a/lib/pages/account_info.dart +++ b/lib/pages/account_info.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:noel_notes/appwrite/auth_api.dart'; import 'package:noel_notes/component/icons/unicon_icons.dart'; +import 'package:noel_notes/pages/verify_carousel.dart'; import 'package:provider/provider.dart'; class AccountPage extends StatefulWidget { @@ -107,9 +108,13 @@ class _AccountPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.center, children: [ - const IconButton( - onPressed: null, - icon: Icon( + IconButton( + onPressed: () => Navigator.of(context).push( + MaterialPageRoute( + builder: (context) => const VerifyCarousel(), + ), + ), + icon: const Icon( Unicon.shield_check, color: Colors.green, ), diff --git a/lib/pages/register.dart b/lib/pages/register.dart index f6ac3b77..0ce6e359 100644 --- a/lib/pages/register.dart +++ b/lib/pages/register.dart @@ -1,3 +1,5 @@ +// ignore_for_file: use_build_context_synchronously + import 'package:appwrite/appwrite.dart'; import 'package:flutter/material.dart'; import 'package:noel_notes/appwrite/auth_api.dart'; diff --git a/lib/pages/verify_carousel.dart b/lib/pages/verify_carousel.dart index 732e738a..f4fc9348 100644 --- a/lib/pages/verify_carousel.dart +++ b/lib/pages/verify_carousel.dart @@ -1,6 +1,4 @@ -import 'package:carousel_slider/carousel_controller.dart'; import 'package:carousel_slider/carousel_slider.dart'; -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; class VerifyCarousel extends StatefulWidget { @@ -26,7 +24,8 @@ class _VerifyCarouselState extends State { items: list, carouselController: _controller, options: CarouselOptions( - autoPlay: true, + enableInfiniteScroll: false, + autoPlay: false, enlargeCenterPage: true, aspectRatio: 2.0, onPageChanged: (index, reason) { @@ -46,13 +45,11 @@ class _VerifyCarouselState extends State { width: 12.0, height: 12.0, margin: const EdgeInsets.symmetric( - vertical: 8.0, horizontal: 4.0), + vertical: 8.0, horizontal: 4.0,), decoration: BoxDecoration( shape: BoxShape.circle, - color: (Theme.of(context).brightness == Brightness.dark - ? Colors.white - : Colors.black) - .withOpacity(_current == entry.key ? 0.9 : 0.4), + color: Theme.of(context).colorScheme.primary + .withOpacity(_current == entry.key ? 1 : 0.4), ), ), );