From c1d0213284c03ea88cb335b8e99d48ab58db38fb Mon Sep 17 00:00:00 2001 From: Abdullah Ahmed Soomro Date: Mon, 3 Apr 2023 14:43:35 +0500 Subject: [PATCH] UI Create PIN Code Screen - UI Completed --- assets/icons/password.png | Bin 0 -> 2120 bytes .../screen/app_lock_screens/app_lock.dart | 51 +++++++++++++ .../app_lock_screens/lock_type_screen.dart | 48 ++++++++++++ .../app_lock_screens/pin_code_screen.dart | 64 ++++++++++++++++ lib/presentation/shared/elevated_buttons.dart | 10 ++- lib/presentation/shared/tile.dart | 70 ++++++++++++++++++ lib/presentation/theme/ultramarine_light.dart | 2 +- pubspec.lock | 8 ++ pubspec.yaml | 1 + 9 files changed, 251 insertions(+), 3 deletions(-) create mode 100644 assets/icons/password.png create mode 100644 lib/presentation/screen/app_lock_screens/app_lock.dart create mode 100644 lib/presentation/screen/app_lock_screens/lock_type_screen.dart create mode 100644 lib/presentation/screen/app_lock_screens/pin_code_screen.dart diff --git a/assets/icons/password.png b/assets/icons/password.png new file mode 100644 index 0000000000000000000000000000000000000000..70fda38712412083588155091e2ef2c317abf1ed GIT binary patch literal 2120 zcmaJ?c{me{1KwnY8X-qx$QdR?eXNo>a$h6&!jxMq=KdTrDM!fWzHhl!ZpG&)X`2ZN z;Um}2oog1#_xb(*dw$RJ9?$#!|32??3p0HPCzKNa06+{4bWvxHKchZ7+nG{jijL2W zBf!8u5CDK1|ChjuJDD|SB`^@BuMKFRi>#dmRu7~p5&(Fedj6Ly2mk=j8tNjgLxEcb zDz?J<7h^n_54GWOghduO2NiAP^g;R*)Qj%a%Hpa-4kA?|s+UECULGBJ zx7fiqO=e@qoA$@h8Jlf$)geu)@e-8ocn+&VB_%=5zz9_)=fXSOaY+6qrla%4@6$Wc z{)gmo#0gl2U9l3(^oUlZ32cPy2S&F#47uk=b{wq!rulyN(!9&;l~QndMxS}R(HM78 z_<-0Tw=?k~HFe$6-942Wqt0i(r!ZK)qMi^tP6yuo7ELX>Ve3NB!q)^3(9{Z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p}6-hfKP1dqexlDMf@%@KdLd`FlK_7wIE@a#X zFEvy4gHwhvD$=XGZ`r2T3+xDXRfe(2Na;{WS!q74DJ#70o&^hjrLLJQWUrEGz!P*Q z{}JOwEXHh|GDBOlEeAL1H90fPD1CeOw&56DsE#zKTn#8lR5865{tyou1jQU?xI8V-n!Baht8((VDu90H`NOzGvQ3H5UC_X9?NgPpBa2z8j3*fN_K zxCzG-gJaP>(yN^19C=ex+jS%DQ}k~(uHPg4SMk}G3>N6eueyAx-`Hl}Sn?bg%32KY z(O~;uoJnq8?s?f4pvFjF)|DlC&wTp*Vkz$IsRW`03zsQnGSH*fr{K*^a`h%k3_o1Q zXN0(%(XZ&Ndyfa*yGTapI;jZH>g30%)j-?F@mZEt=^sHP!eX^w{CyzqRSkC$p(ROv zu8L!aGY9Smr*|BF!UX#cc0#Q(x=dN#>(dio{b_q5qGS z=;U!=mQlr( + (color != null) ? color! : themeColorStyle.primaryColor), + ), child: Text(label), ), ); diff --git a/lib/presentation/shared/tile.dart b/lib/presentation/shared/tile.dart index 08d40834..e8a902c6 100644 --- a/lib/presentation/shared/tile.dart +++ b/lib/presentation/shared/tile.dart @@ -123,3 +123,73 @@ class UxerShipTile extends StatelessWidget { ); } } + +class AppLockTile extends StatefulWidget { + final String title; + + const AppLockTile({Key? key, required this.title}) : super(key: key); + + @override + State createState() => _AppLockTileState(); +} + +class _AppLockTileState extends State { + bool isSwitchOn = false; + + @override + Widget build(BuildContext context) { + final ThemeColorStyle themeColorStyle = context.themeColorStyle; + final TextTheme textTheme = context.textTheme; + return Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + border: Border.all(color: themeColorStyle.octonaryColor), + ), + padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8), + child: Row( + children: [ + Text( + widget.title, + style: textTheme.bodyLarge!.copyWith( + fontWeight: FontWeight.w400, + color: themeColorStyle.secondaryColor, + ), + ), + const Spacer(), + Theme( + data: ThemeData(useMaterial3: true).copyWith( + colorScheme: Theme.of(context) + .colorScheme + .copyWith(outline: Colors.transparent), + ), + child: SizedBox( + height: 30, + width: 38, + child: FittedBox( + fit: BoxFit.fill, + + /// Change InActiveTrackColor of Switch + child: Switch( + value: isSwitchOn, + trackColor: MaterialStateProperty.resolveWith((states) { + if (states.contains(MaterialState.selected)) { + return themeColorStyle.senaryColor; + } + return themeColorStyle.octonaryColor.withOpacity(0.7); + }), + thumbColor: MaterialStateProperty.all(Colors.white), + // inactiveTrackColor: Colors.white, + onChanged: (value) { + setState(() { + isSwitchOn = value; + }); + }, + ), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/presentation/theme/ultramarine_light.dart b/lib/presentation/theme/ultramarine_light.dart index 295d2320..bd807c3d 100644 --- a/lib/presentation/theme/ultramarine_light.dart +++ b/lib/presentation/theme/ultramarine_light.dart @@ -33,7 +33,7 @@ class UltramarineLightTheme extends BaseTheme { tertiaryColor: Color(0xFF8B8B8B), quaternaryColor: Color(0xFF7B7CFF), quinaryColor: Color(0xFFFFFFFF), - senaryColor: Color(0xFFFF3932), + senaryColor: Color(0xff32C74F), septenaryColor: Color(0xFFF1F2F4), octonaryColor: Color(0xFFBCBCBC), nonaryColor: Color(0xFFE31414), diff --git a/pubspec.lock b/pubspec.lock index 6a3ed48a..3d053eec 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -581,6 +581,14 @@ packages: url: "https://pub.dev" source: hosted version: "5.1.0" + pin_code_fields: + dependency: "direct main" + description: + name: pin_code_fields + sha256: c8652519d14688f3fe2a8288d86910a46aa0b9046d728f292d3bf6067c31b4c7 + url: "https://pub.dev" + source: hosted + version: "7.4.0" platform: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 3c3c9934..56408ce9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,6 +32,7 @@ dependencies: flutter_launcher_icons: ^0.11.0 flutter_form_builder: ^7.7.0 form_builder_validators: ^8.4.0 + pin_code_fields: ^7.4.0 dev_dependencies: flutter_test: