112 lines
4.1 KiB
Dart
112 lines
4.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:get/get_connect/http/src/utils/utils.dart';
|
|
import 'package:onufitness/constants/asset_constants.dart';
|
|
import 'package:onufitness/constants/color_constant.dart';
|
|
import 'package:onufitness/constants/text_constant.dart';
|
|
import 'package:onufitness/routes/route_constant.dart';
|
|
import 'package:onufitness/services/network_service/network_service.dart';
|
|
import 'package:onufitness/utils/helper_function.dart';
|
|
import 'package:onufitness/widgets/Buttons/custom_submit_button.dart';
|
|
import 'package:onufitness/widgets/network/no_network_widget.dart';
|
|
|
|
class GetStartedScreen extends StatelessWidget {
|
|
GetStartedScreen({super.key});
|
|
final NetworkController networkController = Get.find();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Obx(() {
|
|
if (!networkController.isConnected.value && !Get.isDialogOpen!) {
|
|
Future.delayed(Duration.zero, () {
|
|
Get.dialog(const NoInternetDialog(), barrierDismissible: false);
|
|
});
|
|
}
|
|
return Scaffold(
|
|
backgroundColor: Color(getStartedBackgroundBlackColor),
|
|
body: Stack(
|
|
children: [
|
|
Column(
|
|
children: [
|
|
SizedBox(
|
|
height: isTablet ? 0.62.sh : 0.64.sh,
|
|
width: 1.sw,
|
|
child: Image.asset(
|
|
AssetConstants.getStarted,
|
|
|
|
fit: BoxFit.fill,
|
|
//scale: 2,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
|
|
Positioned(
|
|
top: isTablet ? 0.52.sh : 0.53.sh,
|
|
left: 20.w,
|
|
right: 20.w,
|
|
child: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
Text(
|
|
"Welcome to\nOnUFitness",
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 40.sp,
|
|
fontWeight: FontWeight.w600,
|
|
height: 1,
|
|
),
|
|
),
|
|
SizedBox(height: 25.h),
|
|
Text(
|
|
"Where your body, mind, and community grow stronger together.",
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: regularSizeText,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
SizedBox(height: 20.h),
|
|
CustomSubmitButton(
|
|
backgroundColor: Color(primaryColor),
|
|
height: isTablet ? 65.h : 55.h,
|
|
text: "Join the Community",
|
|
textColor: Colors.black,
|
|
fontWeight: FontWeight.w600,
|
|
fontSize: isTablet ? 24.sp : 18.sp,
|
|
onPressed: () {
|
|
Get.toNamed(RouteConstant.signUpScreen);
|
|
},
|
|
),
|
|
SizedBox(height: 20.h),
|
|
TextButton(
|
|
onPressed: () {
|
|
Get.toNamed(RouteConstant.loginFirstScreen);
|
|
},
|
|
child: Text(
|
|
"Sign in",
|
|
style: TextStyle(
|
|
fontSize: isTablet ? 20.sp : 16.sp,
|
|
color: Colors.white,
|
|
decoration: TextDecoration.underline,
|
|
decorationStyle: TextDecorationStyle.dotted,
|
|
decorationColor: Colors.white,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
});
|
|
}
|
|
}
|