diff --git a/assets/images/png/Delete.png b/assets/images/png/Delete.png new file mode 100644 index 0000000..661d0c5 Binary files /dev/null and b/assets/images/png/Delete.png differ diff --git a/lib/resources/routes/route_name.dart b/lib/resources/routes/route_name.dart index 8bcc989..6bf17ca 100644 --- a/lib/resources/routes/route_name.dart +++ b/lib/resources/routes/route_name.dart @@ -38,7 +38,7 @@ class RouteName { static const String termsandcondition = '/termsandcondition'; static const String privacypolicy = '/privacypolicy'; static const String aboutus = '/aboutus'; - + static const String settings = '/settings'; static const String faqscreen = '/faqscreen'; //contact us diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart index c8be6fb..8e680e3 100644 --- a/lib/resources/routes/routes.dart +++ b/lib/resources/routes/routes.dart @@ -5,6 +5,7 @@ import 'package:traderscircuit/view/MainScreen/ExploreUnseen.dart'; import 'package:traderscircuit/view/Sidemenu/AboutUs.dart'; import 'package:traderscircuit/view/Sidemenu/FaqScreen.dart'; import 'package:traderscircuit/view/Sidemenu/PrivacyPolicy.dart'; +import 'package:traderscircuit/view/Sidemenu/Settings.dart'; import 'package:traderscircuit/view/Sidemenu/TermsAndCondition.dart'; import 'package:traderscircuit/view/Sidemenu/contactUs/contact_us_main.dart'; import 'package:traderscircuit/view/Sidemenu/myProfile/my_profile_screen.dart'; @@ -149,6 +150,12 @@ class AppRoutes { page: () => const FaqScreen(), ), + GetPage( + name: RouteName.settings, + page: () => const Settings(), + ), + + //contact us GetPage( name: RouteName.contactUsMain, @@ -163,5 +170,6 @@ class AppRoutes { name: RouteName.myProfileScreen, page: () => const MyProfileScreen(), ) + ]; } diff --git a/lib/view/Sidemenu/Settings.dart b/lib/view/Sidemenu/Settings.dart new file mode 100644 index 0000000..ac776fb --- /dev/null +++ b/lib/view/Sidemenu/Settings.dart @@ -0,0 +1,174 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:traderscircuit/Utils/Common/CommonAppbar.dart'; +import 'package:traderscircuit/Utils/text.dart'; +import 'package:traderscircuit/view/onBoarding/splashScreen1.dart'; + +class Settings extends StatefulWidget { + const Settings({super.key}); + + @override + State createState() => _SettingsState(); +} + +class _SettingsState extends State { + bool isSwitched = false; + + void _toggleSwitch(bool value) { + setState(() { + isSwitched = value; + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: CommonAppbar( + titleTxt: "Settings", + ), + backgroundColor: Colors.black, + extendBody: true, + body: Stack( + children: [ + CommonBlurLeft(), + CommonBlurRight(), + Stack( + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16), + child: ListView( + physics: BouncingScrollPhysics(), + // mainAxisAlignment: MainAxisAlignment.start, + // crossAxisAlignment: CrossAxisAlignment.start, + + children: [ + // CommonDropdownBtn(hint: "hint", items: ["hi", "hii"]), + SizedBox( + height: 10.h, + ), + Row( + children: [ + text20W400("Dark Mode"), + Spacer(), + Switch( + value: isSwitched, + onChanged: _toggleSwitch, + activeTrackColor: Colors.green, + activeColor: Colors.white, + inactiveTrackColor: Colors.white, + inactiveThumbColor: Colors.black, + ), + ], + ), + SizedBox( + height: 40.h, + ), + Row( + children: [ + text18W500("Setup your security"), + Spacer(), + Icon( + Icons.arrow_forward_ios_rounded, + color: Colors.white, + size: 24, + ) + ], + ), + SizedBox( + height: 50.h, + ), + text25W600("Notifications"), + SizedBox( + height: 30.h, + ), + Row( + children: [ + text20W400("WhatsApp Notifications"), + Spacer(), + Switch( + value: isSwitched, + onChanged: _toggleSwitch, + activeTrackColor: Colors.green, + activeColor: Colors.white, + inactiveTrackColor: Colors.white, + inactiveThumbColor: Colors.black, + ), + ], + ), + SizedBox( + height: 40.h, + ), + Row( + children: [ + text20W400("In - App Notifications"), + Spacer(), + Switch( + value: isSwitched, + onChanged: _toggleSwitch, + activeTrackColor: Colors.green, + activeColor: Colors.white, + inactiveTrackColor: Colors.white, + inactiveThumbColor: Colors.black, + ), + ], + ), + SizedBox( + height: 40.h, + ), + Row( + children: [ + text20W400("Push Notifications"), + Spacer(), + Switch( + value: isSwitched, + onChanged: _toggleSwitch, + activeTrackColor: Colors.green, + activeColor: Colors.white, + inactiveTrackColor: Colors.white, + inactiveThumbColor: Colors.black, + ), + ], + ), + SizedBox( + height: 40.h, + ), + Row( + children: [ + text20W400("E-mail Notifications"), + Spacer(), + Switch( + value: isSwitched, + onChanged: _toggleSwitch, + activeTrackColor: Colors.green, + activeColor: Colors.white, + inactiveTrackColor: Colors.white, + inactiveThumbColor: Colors.black, + ), + ], + ), + SizedBox( + height: 60.h, + ), + Row( + children: [ + Image.asset( + "assets/images/png/Delete.png", + width: 20, + height: 22, + ), + SizedBox( + width: 15.w, + ), + text20W400("Delete Account") + ], + ), + ], + ), + ), + ], + ), + ], + ), + ); + } +} diff --git a/lib/view/Sidemenu/Sidemenu.dart b/lib/view/Sidemenu/Sidemenu.dart index 5ccafa4..82941b9 100644 --- a/lib/view/Sidemenu/Sidemenu.dart +++ b/lib/view/Sidemenu/Sidemenu.dart @@ -431,7 +431,7 @@ void navigateTo(int index, BuildContext context) { break; case 6: { - // Get.toNamed(RouteName.settings); + Get.toNamed(RouteName.settings); } break; diff --git a/pubspec.lock b/pubspec.lock index ac31d40..54cbdad 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -85,10 +85,12 @@ packages: dependency: transitive description: name: cross_file - sha256: "2f9d2cbccb76127ba28528cb3ae2c2326a122446a83de5a056aaa3880d3882c5" + + sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e url: "https://pub.dev" source: hosted - version: "0.3.3+7" + version: "0.3.3+8" + crypto: dependency: transitive description: @@ -276,10 +278,10 @@ packages: dependency: transitive description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.2.0" http_parser: dependency: transitive description: @@ -292,26 +294,26 @@ packages: dependency: "direct main" description: name: image_cropper - sha256: "542c3453109d16bcc388e43ae2276044d2cd6a6d20c68bdcff2c94ab9363ea15" + sha256: f4bad5ed2dfff5a7ce0dfbad545b46a945c702bb6182a921488ef01ba7693111 url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "5.0.1" image_cropper_for_web: dependency: transitive description: name: image_cropper_for_web - sha256: "89c936aa772a35b69ca67b78049ae9fa163a4fb8da2f6dee3893db8883fb49d2" + sha256: "865d798b5c9d826f1185b32e5d0018c4183ddb77b7b82a931e1a06aa3b74974e" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.0.0" image_cropper_platform_interface: dependency: transitive description: name: image_cropper_platform_interface - sha256: b232175c132b2f7ede3e1f101652bcd635cb4079a77c6dded8e6d32e6578d685 + sha256: ee160d686422272aa306125f3b6fb1c1894d9b87a5e20ed33fa008e7285da11e url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "5.0.0" image_picker: dependency: "direct main" description: @@ -396,10 +398,12 @@ packages: dependency: "direct main" description: name: lottie - sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216 + + sha256: ce2bb2605753915080e4ee47f036a64228c88dc7f56f7bc1dbe912d75b55b1e2 url: "https://pub.dev" source: hosted - version: "2.7.0" + version: "3.1.0" + matcher: dependency: transitive description: @@ -710,5 +714,7 @@ packages: source: hosted version: "6.3.0" sdks: - dart: ">=3.1.0 <4.0.0" - flutter: ">=3.13.0" + + dart: ">=3.2.0 <4.0.0" + flutter: ">=3.16.0" + diff --git a/pubspec.yaml b/pubspec.yaml index e84b270..d42cccb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -22,13 +22,22 @@ dependencies: pin_code_fields: ^8.0.1 fluttertoast: ^8.0.9 dropdown_button2: ^2.1.4 + + + + gap: ^3.0.1 image_picker: ^1.0.7 dotted_border: ^2.1.0 - image_cropper: ^4.0.1 + image_cropper: ^5.0.1 + + + gap: ^3.0.1 + file_picker: ^8.0.0+1 lottie: ^2.7.0 + dev_dependencies: flutter_test: sdk: flutter