diff --git a/android/app/build.gradle b/android/app/build.gradle
index a66b903..54842fa 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion flutter.compileSdkVersion
+ compileSdkVersion 34
ndkVersion flutter.ndkVersion
compileOptions {
@@ -47,8 +47,8 @@ android {
applicationId "com.example.regroup"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
- minSdkVersion flutter.minSdkVersion
- targetSdkVersion flutter.targetSdkVersion
+ minSdkVersion 24
+ targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
diff --git a/android/build.gradle b/android/build.gradle
index 58a8c74..713d7f6 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
-task clean(type: Delete) {
+tasks.register("clean", Delete) {
delete rootProject.buildDir
}
diff --git a/assets/fonts/Helvetica-Font/Helvetica-Bold.ttf b/assets/fonts/Helvetica-Font/Helvetica-Bold.ttf
new file mode 100644
index 0000000..332b66c
Binary files /dev/null and b/assets/fonts/Helvetica-Font/Helvetica-Bold.ttf differ
diff --git a/assets/fonts/Helvetica-Font/Helvetica-BoldOblique.ttf b/assets/fonts/Helvetica-Font/Helvetica-BoldOblique.ttf
new file mode 100644
index 0000000..24c945f
Binary files /dev/null and b/assets/fonts/Helvetica-Font/Helvetica-BoldOblique.ttf differ
diff --git a/assets/fonts/Helvetica-Font/Helvetica-Oblique.ttf b/assets/fonts/Helvetica-Font/Helvetica-Oblique.ttf
new file mode 100644
index 0000000..30cab7d
Binary files /dev/null and b/assets/fonts/Helvetica-Font/Helvetica-Oblique.ttf differ
diff --git a/assets/fonts/Helvetica-Font/Helvetica.ttf b/assets/fonts/Helvetica-Font/Helvetica.ttf
new file mode 100644
index 0000000..718f22d
Binary files /dev/null and b/assets/fonts/Helvetica-Font/Helvetica.ttf differ
diff --git a/assets/fonts/Helvetica-Font/helvetica-compressed-5871d14b6903a.otf b/assets/fonts/Helvetica-Font/helvetica-compressed-5871d14b6903a.otf
new file mode 100644
index 0000000..0dbf421
Binary files /dev/null and b/assets/fonts/Helvetica-Font/helvetica-compressed-5871d14b6903a.otf differ
diff --git a/assets/fonts/Helvetica-Font/helvetica-light-587ebe5a59211.ttf b/assets/fonts/Helvetica-Font/helvetica-light-587ebe5a59211.ttf
new file mode 100644
index 0000000..ecc9264
Binary files /dev/null and b/assets/fonts/Helvetica-Font/helvetica-light-587ebe5a59211.ttf differ
diff --git a/assets/fonts/Helvetica-Font/helvetica-rounded-bold-5871d05ead8de.otf b/assets/fonts/Helvetica-Font/helvetica-rounded-bold-5871d05ead8de.otf
new file mode 100644
index 0000000..2d83a80
Binary files /dev/null and b/assets/fonts/Helvetica-Font/helvetica-rounded-bold-5871d05ead8de.otf differ
diff --git a/assets/images/png/onboarding1.png b/assets/images/png/onboarding1.png
new file mode 100644
index 0000000..ccc54cf
Binary files /dev/null and b/assets/images/png/onboarding1.png differ
diff --git a/assets/images/svg/mainsplash.svg b/assets/images/svg/mainsplash.svg
new file mode 100644
index 0000000..e88c1c8
--- /dev/null
+++ b/assets/images/svg/mainsplash.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/images/svg/onboarding1.svg b/assets/images/svg/onboarding1.svg
new file mode 100644
index 0000000..c5fc474
--- /dev/null
+++ b/assets/images/svg/onboarding1.svg
@@ -0,0 +1,16 @@
+
diff --git a/assets/images/svg/onboarding2.svg b/assets/images/svg/onboarding2.svg
new file mode 100644
index 0000000..ce8369c
--- /dev/null
+++ b/assets/images/svg/onboarding2.svg
@@ -0,0 +1,11 @@
+
diff --git a/lib/Utils/Common/CustomNextButton.dart b/lib/Utils/Common/CustomNextButton.dart
index 92181aa..7e6c678 100644
--- a/lib/Utils/Common/CustomNextButton.dart
+++ b/lib/Utils/Common/CustomNextButton.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
-class CustomNextButton extends StatelessWidget {
+class CustomButton extends StatelessWidget {
final String text;
final Function onPressed;
final Color backgroundColor;
@@ -9,11 +9,11 @@ class CustomNextButton extends StatelessWidget {
final double height;
final Color textColor;
- const CustomNextButton({
+ const CustomButton({
Key? key,
required this.text,
required this.onPressed,
- this.backgroundColor = const Color(0xFFC18948),
+ this.backgroundColor = const Color(0xFFD90B2E),
this.width = double.infinity,
this.height = 50.0,
this.textColor = Colors.white,
@@ -27,7 +27,7 @@ class CustomNextButton extends StatelessWidget {
},
style: ElevatedButton.styleFrom(
backgroundColor: backgroundColor,
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)),
minimumSize: Size(width, height),
),
child: FittedBox(
@@ -36,13 +36,95 @@ class CustomNextButton extends StatelessWidget {
text,
textAlign: TextAlign.center,
style: TextStyle(
- fontFamily: "Cambria",
+ fontFamily: "Helvetica",
fontWeight: FontWeight.w400,
- fontSize: 20.sp,
- color: Color(0xFFFFFFFF),
+ fontSize: 16.sp,
+ color: Color(0xFFFCFCFC),
),
),
),
);
}
}
+
+class CustomButton2 extends StatelessWidget {
+ final String text;
+ final Function onPressed;
+ // final Color backgroundColor;
+ final double width;
+ final double height;
+ final Color textColor;
+
+ const CustomButton2({
+ Key? key,
+ required this.text,
+ required this.onPressed,
+ // this.backgroundColor = const Color(0xFF434A53),
+ this.width = double.infinity,
+ this.height = 50.0,
+ this.textColor = Colors.white,
+ }) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return InkWell(
+ onTap: onPressed(),
+ child: Container(
+ width: double.infinity,
+ height: 50.h,
+ decoration: ShapeDecoration(
+ gradient: LinearGradient(
+ begin: Alignment(-1.00, 0.02),
+ end: Alignment(1, -0.02),
+ colors: [
+ Colors.white.withOpacity(0.09000000357627869),
+ Colors.white.withOpacity(0.11999999731779099)
+ ],
+ ),
+ shape: RoundedRectangleBorder(
+ side: BorderSide(width: 1, color: Colors.white.withOpacity(0.3)),
+ borderRadius: BorderRadius.circular(30),
+ ),
+ ),
+ child: Center(
+ child: Text(
+ text,
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ color: Color(0xFFFCFCFC),
+ fontSize: 16.sp,
+ fontFamily: 'Helvetica',
+ fontWeight: FontWeight.w400,
+ ),
+ ),
+ ),
+ ));
+
+ // ElevatedButton(
+ // onPressed: () {
+ // onPressed();
+ // },
+ // style: ElevatedButton.styleFrom(
+ // backgroundColor: Colors.white.withOpacity(0.09000000357627869),
+ // // Color(0XFFFFFFFF).withOpacity(0.54),
+ // shape: RoundedRectangleBorder(
+ // side: BorderSide(width: 1, color: Colors.white.withOpacity(0.3)),
+ // borderRadius: BorderRadius.circular(30)),
+ // minimumSize: Size(width, height),
+ // ),
+ // child: FittedBox(
+ // fit: BoxFit.contain,
+ // child: Text(
+ // text,
+ // textAlign: TextAlign.center,
+ // style: TextStyle(
+ // fontFamily: "Helvetica",
+ // fontWeight: FontWeight.w400,
+ // fontSize: 16.sp,
+ // color: Color(0xFFFCFCFC),
+ // ),
+ // ),
+ // ),
+ // );
+ }
+}
diff --git a/lib/Utils/Common/NoInternet.dart b/lib/Utils/Common/NoInternet.dart
index e881fe9..7cb61d7 100644
--- a/lib/Utils/Common/NoInternet.dart
+++ b/lib/Utils/Common/NoInternet.dart
@@ -14,11 +14,12 @@ class NoInternet extends StatefulWidget {
}
class _NoInternetState extends State {
+
Future checkInternet() async {
final connectivityResult = await (Connectivity().checkConnectivity());
- if (connectivityResult == ConnectivityResult.wifi ||
- connectivityResult == ConnectivityResult.mobile) {
+ if (connectivityResult.contains(ConnectivityResult.wifi) ||
+ connectivityResult.contains(ConnectivityResult.mobile) ) {
setState(() {
// _connectionStatus = connectivityResult.toString();
Get.back(result: true);
@@ -38,6 +39,7 @@ class _NoInternetState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
+ backgroundColor: Color(0xff222935),
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Container(
@@ -47,12 +49,12 @@ class _NoInternetState extends State {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
- Lottie.asset(
- "assets/images/nointernet.json",
- height: 230.h,
- // width: 300.w,
- // fit: BoxFit.cover
- ),
+ // Lottie.asset(
+ // "assets/images/nointernet.json",
+ // height: 230.h,
+ // // width: 300.w,
+ // // fit: BoxFit.cover
+ // ),
sizedBoxHeight(40.h),
Text(
'No Internet !',
@@ -65,7 +67,7 @@ class _NoInternetState extends State {
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
),
sizedBoxHeight(20.h),
- CustomNextButton(
+ CustomButton(
text: "Try again",
onPressed: () {
checkInternet();
diff --git a/lib/Utils/Common/blureffect.dart b/lib/Utils/Common/blureffect.dart
new file mode 100644
index 0000000..8c6d674
--- /dev/null
+++ b/lib/Utils/Common/blureffect.dart
@@ -0,0 +1,63 @@
+import 'dart:ui';
+
+import 'package:flutter/material.dart';
+
+class CommonBlurLeft extends StatelessWidget {
+ const CommonBlurLeft({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Positioned(
+ top: 150,
+ left: -50,
+ child: Container(
+ height: 200,
+ width: 200,
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ color: Color(0xFF001D54).withOpacity(0.5),
+ ),
+ child: BackdropFilter(
+ filter: ImageFilter.blur(sigmaX: 30, sigmaY: 30),
+ child: Container(
+ height: 200,
+ width: 200,
+ color: Colors.transparent,
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+class CommonBlurRight extends StatelessWidget {
+ const CommonBlurRight({
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Positioned(
+ top: 450,
+ right: -50,
+ child: Container(
+ height: 200,
+ width: 200,
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ color: Color(0xFF001D54).withOpacity(0.5),
+ ),
+ child: BackdropFilter(
+ filter: ImageFilter.blur(sigmaX: 30, sigmaY: 30),
+ child: Container(
+ height: 200,
+ width: 200,
+ color: Colors.transparent,
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/Utils/colors.dart b/lib/Utils/colors.dart
index d0660bc..99452fb 100644
--- a/lib/Utils/colors.dart
+++ b/lib/Utils/colors.dart
@@ -1,7 +1,10 @@
import 'package:flutter/material.dart';
class AppColors {
- static const white = Color(0xffFFFFFF);
static const black = Color(0xff0F0C0C);
+ static const white = Color(0xFFFCFCFC);
+
+
+
}
diff --git a/lib/Utils/texts.dart b/lib/Utils/texts.dart
index b1e5305..55c6665 100644
--- a/lib/Utils/texts.dart
+++ b/lib/Utils/texts.dart
@@ -10,6 +10,19 @@ Widget text30BlackM(String text) {
);
}
+Widget text22400white(String text) {
+ return Text(
+ text,
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontSize: 22.sp,
+ color: AppColors.white,
+ fontWeight: FontWeight.w400,
+ fontFamily: 'Helvetica'
+ ),
+ );
+}
+
Widget text20Black(String text) {
return Text(
text,
diff --git a/lib/main.dart b/lib/main.dart
index 49ce425..18a301b 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,4 +1,5 @@
import 'dart:async';
+import 'dart:developer';
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:device_info_plus/device_info_plus.dart';
@@ -44,39 +45,89 @@ class MyApp extends StatefulWidget {
}
class _MyAppState extends State with WidgetsBindingObserver {
- var _connectionStatus = ConnectivityResult.values.toString();
- late StreamSubscription> subscription;
- Connectivity connectivity = Connectivity();
+ // var _connectionStatus = ConnectivityResult.values.toString();
+ // late StreamSubscription> subscription;
+ // Connectivity connectivity = Connectivity();
+
+ List _connectionStatus = [ConnectivityResult.none];
+ final Connectivity _connectivity = Connectivity();
+ late StreamSubscription> _connectivitySubscription;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
+ initConnectivity();
- connectivity = Connectivity();
- checkInternet();
+ _connectivitySubscription =
+ _connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
+
+ // connectivity = Connectivity();
+ // checkInternet();
// if (Platform.isAndroid) {
// _getStoragePermission();
// }
// _getStoragePermission();
- subscription = connectivity.onConnectivityChanged
- .listen((List result) {
- _connectionStatus = result.toString();
- if (result == ConnectivityResult.wifi ||
- result == ConnectivityResult.mobile) {
- setState(() {
- _connectionStatus = result.toString();
+ // subscription = connectivity.onConnectivityChanged
+ // .listen((List result) {
+ // _connectionStatus = result.toString();
+ // if (result == ConnectivityResult.wifi ||
+ // result == ConnectivityResult.mobile) {
+ // setState(() {
+ // _connectionStatus = result.toString();
- Get.back(result: true);
- });
- } else {
+ // Get.back(result: true);
+ // });
+ // } else if (result == ConnectivityResult.none) {
+ // setState(() {
+ // _connectionStatus = result.toString();
+ // Get.toNamed(RouteName.nointernet);
+ // });
+ // }
+ // });
+ // print(_connectionStatus);
+ }
+
+ Future initConnectivity() async {
+ late List result;
+ // Platform messages may fail, so we use a try/catch PlatformException.
+ try {
+ result = await _connectivity.checkConnectivity();
+ } on PlatformException catch (e) {
+ log('Couldn\'t check connectivity status', error: e);
+ return;
+ }
+
+ // If the widget was removed from the tree while the asynchronous platform
+ // message was in flight, we want to discard the reply rather than calling
+ // setState to update our non-existent appearance.
+ if (!mounted) {
+ return Future.value(null);
+ }
+
+ return _updateConnectionStatus(result);
+ }
+
+ Future _updateConnectionStatus(List result) async {
+ // setState(() {
+ // _connectionStatus = result;
+ // });
+
+ if (result.contains(ConnectivityResult.wifi) || result.contains(ConnectivityResult.mobile)) {
setState(() {
- _connectionStatus = result.toString();
+ _connectionStatus = result;
+ Get.back(result: true);
+
+ });
+ } else {
+ setState(() {
+ _connectionStatus = result;
Get.toNamed(RouteName.nointernet);
});
- }
- });
- // print(_connectionStatus);
+ // Get.toNamed(RouteName.nointernet);
+ }
+ // ignore: avoid_print
+ print('Connectivity changed: $_connectionStatus');
}
Future _getStoragePermission() async {
@@ -115,31 +166,32 @@ class _MyAppState extends State with WidgetsBindingObserver {
}
}
- Future checkInternet() async {
- final connectivityResult = await (Connectivity().checkConnectivity());
+ // Future checkInternet() async {
+ // final connectivityResult = await (Connectivity().checkConnectivity());
- if (connectivityResult == ConnectivityResult.wifi ||
- connectivityResult == ConnectivityResult.mobile) {
- setState(() {
- _connectionStatus = connectivityResult.toString();
- });
- } else {
- setState(() {
- _connectionStatus = connectivityResult.toString();
- print(_connectionStatus.toString());
- Get.toNamed(RouteName.nointernet);
+ // if (connectivityResult == ConnectivityResult.wifi ||
+ // connectivityResult == ConnectivityResult.mobile) {
+ // setState(() {
+ // _connectionStatus = connectivityResult.toString();
+ // });
+ // } else {
+ // setState(() {
+ // _connectionStatus = connectivityResult.toString();
+ // print(_connectionStatus.toString());
+ // Get.toNamed(RouteName.nointernet);
- // Navigator.pushReplacementNamed(context, "/noInternet");
- });
- }
- }
+ // // Navigator.pushReplacementNamed(context, "/noInternet");
+ // });
+ // }
+ // }
@override
void dispose() {
super.dispose();
WidgetsBinding.instance.removeObserver(this);
- subscription.cancel();
+ // subscription.cancel();
+ _connectivitySubscription.cancel();
}
@override
@@ -160,7 +212,7 @@ class _MyAppState extends State with WidgetsBindingObserver {
//initialRoute: RouteName.mainScreen,
getPages: AppRoutes.appRoutes(),
),
- designSize: const Size(390, 844),
+ designSize: const Size(390, 848),
);
}
}
diff --git a/lib/onboarding/SplashScreen.dart b/lib/onboarding/SplashScreen.dart
new file mode 100644
index 0000000..872021f
--- /dev/null
+++ b/lib/onboarding/SplashScreen.dart
@@ -0,0 +1,164 @@
+import 'dart:async';
+import 'dart:developer';
+
+import 'package:connectivity_plus/connectivity_plus.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:get/get.dart';
+import 'package:regroup/Utils/Common/NoInternet.dart';
+import 'package:regroup/resources/routes/route_name.dart';
+// import 'package:shared_preferences/shared_preferences.dart';
+
+class SplashScreen extends StatefulWidget {
+ const SplashScreen({super.key});
+
+ @override
+ State createState() => _SplashScreenState();
+}
+
+class _SplashScreenState extends State {
+ // var _connectionStatus;
+ final Connectivity _connectivity = Connectivity();
+ List _connectionStatus = [ConnectivityResult.none];
+
+ Future checkInternet() async {
+ final connectivityResult = await (Connectivity().checkConnectivity());
+
+ if (connectivityResult == ConnectivityResult.wifi ||
+ connectivityResult == ConnectivityResult.mobile) {
+ setState(() {
+ _connectionStatus = connectivityResult;
+ });
+ } else {
+ setState(() {
+ _connectionStatus = connectivityResult;
+
+ // Navigator.pushReplacementNamed(context, "/noInternet");
+ });
+ }
+ }
+
+ Future initConnectivity() async {
+ late List result;
+ // Platform messages may fail, so we use a try/catch PlatformException.
+ try {
+ result = await _connectivity.checkConnectivity();
+ } on PlatformException catch (e) {
+ log('Couldn\'t check connectivity status', error: e);
+ return;
+ }
+
+ // If the widget was removed from the tree while the asynchronous platform
+ // message was in flight, we want to discard the reply rather than calling
+ // setState to update our non-existent appearance.
+ if (!mounted) {
+ return Future.value(null);
+ }
+
+ return _updateConnectionStatus(result);
+ }
+
+ Future _updateConnectionStatus(List result) async {
+ setState(() {
+ _connectionStatus = result;
+ });
+
+ // ignore: avoid_print
+ print('Connectivity changed: $_connectionStatus');
+ }
+
+ @override
+ void initState() {
+ // TODO: implement initState
+ super.initState();
+ // checkInternet();
+ initConnectivity();
+
+ log(_connectionStatus.toString());
+ Future.delayed(Duration(seconds: 2), () async {
+ if (_connectionStatus.contains(ConnectivityResult.none)) {
+ var result = await Get.to(NoInternet());
+ if (result != null && result) {
+ Timer(const Duration(seconds: 1), () async {
+ Get.toNamed(RouteName.onboarding1);
+ // SharedPreferences prefs = await SharedPreferences.getInstance();
+ // token = prefs.getString('token');
+ // myusername = prefs.getString('name');
+ // phonenumber = prefs.getString('contact_number');
+ // OnBoard = prefs.getBool('OnBoard') ?? false;
+ // if (OnBoard == false) {
+ // Get.toNamed(RouteName.sliderscreen1);
+ // } else {
+
+ // if (token == null || token!.isEmpty) {
+ // Get.offAndToNamed(RouteName.loginScreen);
+ // } else {
+ // GetProfile().GetProfileAPI().then((value) {
+ // Get.toNamed(RouteName.mainScreen, arguments: 0);
+ // }
+ // );
+ // }
+ // }
+ });
+ }
+ } else {
+ Timer(const Duration(seconds: 2), () async {
+ Get.toNamed(RouteName.onboarding1);
+ // SharedPreferences prefs = await SharedPreferences.getInstance();
+
+ // token = prefs.getString('token');
+ // myusername = prefs.getString('name');
+ // phonenumber = prefs.getString('contact_number');
+ // OnBoard = prefs.getBool('OnBoard') ?? false;
+ // if (OnBoard == false) {
+ // Get.toNamed(RouteName.sliderscreen1);
+ // } else {
+ // if (token == null || token!.isEmpty) {
+ // Get.offAndToNamed(RouteName.loginScreen);
+ // } else {
+ // GetProfile().GetProfileAPI().then((value) {
+ // Get.toNamed(RouteName.mainScreen, arguments: 0);
+ // });
+ // }
+ // }
+ });
+ }
+ });
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: const Color(0xff222935),
+ body: Container(
+ width: MediaQuery.of(context).size.width,
+ height: MediaQuery.of(context).size.height,
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ colors: [
+ Color(0xff009DAB).withOpacity(0.25),
+ Color(0xff35798C).withOpacity(0.44),
+ Color(0xffD90B2E).withOpacity(0.33),
+ Color(0xffD90B2E).withOpacity(0.52),
+ Color(0xffD90B2E).withOpacity(0.59),
+ ],
+ )),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ SvgPicture.asset("assets/images/svg/mainsplash.svg",
+ width: 211.w,
+ height: 211.h,
+ )
+
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/onboarding/onboarding1.dart b/lib/onboarding/onboarding1.dart
new file mode 100644
index 0000000..87f7a05
--- /dev/null
+++ b/lib/onboarding/onboarding1.dart
@@ -0,0 +1,222 @@
+import 'dart:ui';
+
+import 'package:flutter/material.dart';
+import 'package:flutter_screenutil/flutter_screenutil.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:glassmorphism/glassmorphism.dart';
+import 'package:regroup/Utils/Common/CustomNextButton.dart';
+import 'package:regroup/Utils/Common/sized_box.dart';
+import 'package:regroup/Utils/texts.dart';
+
+class Onboarding1 extends StatefulWidget {
+ const Onboarding1({super.key});
+
+ @override
+ State createState() => _Onboarding1State();
+}
+
+class _Onboarding1State extends State {
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ body: Stack(
+ children: [
+ Positioned(
+ top: 650,
+ left: 100,
+ child: Container(
+ height: 400,
+ width: 200,
+ decoration:
+ BoxDecoration(shape: BoxShape.circle, color: Colors.red
+ // Color(0xFF001D54).withOpacity(0.5),
+ ),
+ ),
+ ),
+ Container(
+ width: MediaQuery.of(context).size.width,
+ height: MediaQuery.of(context).size.height,
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.center,
+ end: Alignment.bottomCenter,
+ colors: [
+ Color(0xFF222935).withOpacity(0.12),
+ Color(0xFF222935).withOpacity(0.60),
+ Color(0XFF222B37),
+ Color(0xFF222935),
+ ],
+ ),
+ image: DecorationImage(
+ image: AssetImage("assets/images/png/onboarding1.png"),
+ fit: BoxFit.fill)),
+ child: Padding(
+ padding: EdgeInsets.symmetric(horizontal: 16.w),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Spacer(),
+ SvgPicture.asset(
+ "assets/images/svg/onboarding2.svg",
+ width: 104.w,
+ height: 104.h,
+ ),
+ const Spacer(
+ flex: 8,
+ ),
+ SizedBox(
+ width: 301.w,
+ height: 64.h,
+ child: text22400white(
+ "Find motivation and support from like-minded people"),
+ ),
+ sizedBoxHeight(10.h),
+ // GlassmorphicContainer(
+ // width: double.infinity,
+ // height: 130.h,
+ // borderRadius: 2,
+ // blur: 10,
+ // alignment: Alignment.bottomLeft,
+ // border: 2,
+ // linearGradient: LinearGradient(
+ // begin: Alignment.topLeft,
+ // end: Alignment.centerRight,
+ // colors: [
+ // // Color(0xFF222935).withOpacity(0.12),
+ // // Color(0xFF222935).withOpacity(0.60),
+ // // Color(0XFF222B37),
+ // // Color(0xFF222935),
+
+ // Color(0xFF009DAB40),
+ // Color(0xFF35798C6F),
+ // Color(0xFFD90B2E54),
+ // Color(0xFFD90B2E85),
+ // Color(0xFFD90B2E96),
+
+ // // Colors.green.withOpacity(0.9),
+ // // Colors.amber.withOpacity(0.1)
+ // ],
+ // ),
+ // borderGradient: LinearGradient(
+ // begin: Alignment.topLeft,
+ // end: Alignment.bottomRight,
+ // colors: [
+ // // Color(0xFFffffff).withOpacity(0.5),
+ // // Color((0xFFFFFFFF)).withOpacity(0.5),
+
+ // // Color(0xFF222935).withOpacity(0.12),
+ // // Color(0xFF222935).withOpacity(0.60),
+ // // Color(0XFF222B37),
+ // // Color(0xFF222935),
+
+ // Colors.green.withOpacity(0.1),
+ // Color((0xFFFFFFFF)).withOpacity(0.5),
+ // ],
+ // ),
+ // child: Column(
+ // children: [
+ // CustomButton(text: "Sign up", onPressed: () {}),
+ // sizedBoxHeight(30.h),
+ // CustomButton2(text: "Login", onPressed: () {}),
+ // ],
+ // )),
+ CustomButton(text: "Sign up", onPressed: () {}),
+ sizedBoxHeight(30.h),
+ CustomButton2(text: "Login", onPressed: () {}),
+ sizedBoxHeight(90.h),
+ ],
+ ),
+ ),
+ ),
+ // Positioned(
+ // bottom: -100,
+ // left: 100,
+ // child: Container(
+ // height: 200,
+ // width: 200,
+ // decoration:
+ // BoxDecoration(shape: BoxShape.circle, color: Colors.red
+ // // Color(0xFF001D54).withOpacity(0.5),
+ // ),
+ // ),
+ // ),
+ ],
+ ),
+ );
+
+ // Scaffold(
+ // backgroundColor: Color(0xff222935),
+ // body: Container(
+ // width: MediaQuery.of(context).size.width,
+ // height: MediaQuery.of(context).size.height,
+ // decoration: BoxDecoration(
+ // gradient: LinearGradient(
+ // begin: Alignment.center,
+ // end: Alignment.bottomCenter,
+ // colors: [
+ // Color(0xFF222935).withOpacity(0.12),
+ // Color(0xFF222935).withOpacity(0.60),
+ // Color(0XFF222B37),
+ // Color(0xFF222935),
+ // ],
+ // ),
+ // image: DecorationImage(
+ // image: AssetImage("assets/images/png/onboarding1.png"),
+ // fit: BoxFit.fill)),
+ // child: Stack(children: [
+ // Positioned.fill(
+ // child: Container(
+ // color: Colors.black.withOpacity(0.2),
+ // ),
+ // ),
+ // Positioned(
+ // bottom: -100,
+ // left: 100,
+ // child: BackdropFilter(
+ // filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
+ // child: Container(
+ // height: 200,
+ // width: 200,
+ // decoration: BoxDecoration(
+ // shape: BoxShape.circle,
+ // color: Color(0xFF001D54).withOpacity(0.5),
+ // ),
+ // ),
+ // ),
+ // ),
+ // Padding(
+ // padding: EdgeInsets.symmetric(horizontal: 16.w),
+ // child: Column(
+ // crossAxisAlignment: CrossAxisAlignment.center,
+ // mainAxisAlignment: MainAxisAlignment.start,
+ // children: [
+ // Spacer(),
+ // SvgPicture.asset(
+ // "assets/images/svg/onboarding2.svg",
+ // width: 104.w,
+ // height: 104.h,
+ // ),
+ // const Spacer(
+ // flex: 8,
+ // ),
+ // SizedBox(
+ // width: 301.w,
+ // height: 64.h,
+ // child: text22400white(
+ // "Find motivation and support from like-minded people"),
+ // ),
+ // sizedBoxHeight(50.h),
+ // CustomButton(text: "Sign up", onPressed: () {}),
+ // sizedBoxHeight(30.h),
+ // CustomButton2(text: "Login", onPressed: () {}),
+ // sizedBoxHeight(50.h),
+ // ],
+ // ),
+ // ),
+ // ]),
+ // ),
+ // );
+ }
+}
diff --git a/lib/resources/routes/route_name.dart b/lib/resources/routes/route_name.dart
index 41bdf9a..d7e4fa4 100644
--- a/lib/resources/routes/route_name.dart
+++ b/lib/resources/routes/route_name.dart
@@ -1,5 +1,6 @@
class RouteName {
static const String splashScreen = '/';
+ static const String onboarding1 = '/onboarding1';
static const String loginScreen = '/loginScreen';
static const String nointernet = '/nointernet';
diff --git a/lib/resources/routes/routes.dart b/lib/resources/routes/routes.dart
index d3b66cb..235a325 100644
--- a/lib/resources/routes/routes.dart
+++ b/lib/resources/routes/routes.dart
@@ -1,19 +1,24 @@
import 'package:get/get_navigation/src/routes/get_route.dart';
import 'package:regroup/Utils/Common/NoInternet.dart';
+import 'package:regroup/onboarding/onboarding1.dart';
+import 'package:regroup/onboarding/splashscreen.dart';
import 'package:regroup/resources/routes/route_name.dart';
class AppRoutes {
static appRoutes() => [
- GetPage(
+ GetPage(
+ name: RouteName.splashScreen,
+ page: () =>
+ const SplashScreen(),
+ ),
+ GetPage(
+ name: RouteName.onboarding1,
+ page: () =>
+ const Onboarding1(),
+ ),
+ GetPage(
name: RouteName.nointernet,
page: () => const NoInternet(),
),
- // GetPage(
- // name: RouteName.splashScreen,
- // page: () =>
- // const
- // SplashScreen(),
- // ),
-
];
}
\ No newline at end of file
diff --git a/pubspec.lock b/pubspec.lock
index 4a18632..4839982 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -264,6 +264,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.6.6"
+ glassmorphism:
+ dependency: "direct main"
+ description:
+ name: glassmorphism
+ sha256: c0f65ea2681d4ee6d4125b947946d983335cd44765e835cdc039894b076a6e31
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.0"
http:
dependency: transitive
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index cdfd5ce..98fade5 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -53,6 +53,7 @@ dependencies:
shimmer: ^3.0.0
device_info_plus: ^9.1.2
permission_handler: ^11.3.1
+ glassmorphism: ^3.0.0
dev_dependencies:
flutter_test:
@@ -77,8 +78,11 @@ flutter:
uses-material-design: true
# To add assets to your application, add an assets section, like this:
- # assets:
- # - images/a_dot_burr.jpeg
+ assets:
+ - assets/images/
+ - assets/icons/
+ - assets/images/png/
+ - assets/images/svg/
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
@@ -92,10 +96,10 @@ flutter:
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
- # fonts:
- # - family: Schyler
- # fonts:
- # - asset: fonts/Schyler-Regular.ttf
+ fonts:
+ - family: Helvetica
+ fonts:
+ - asset: assets/fonts/Helvetica-Font/Helvetica.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro