Initial commit

This commit is contained in:
jahongireshonqulov
2025-10-17 19:42:02 +05:00
commit 9fbdabafb4
1420 changed files with 28021 additions and 0 deletions

View File

@@ -0,0 +1,115 @@
import 'package:flutter/material.dart';
import 'package:grostore/app_lang.dart';
import 'package:grostore/configs/app_config.dart';
import 'package:grostore/configs/style_config.dart';
import 'package:grostore/configs/theme_config.dart';
import 'package:grostore/custom_ui/Button.dart';
import 'package:grostore/helpers/common_functions.dart';
import 'package:grostore/helpers/route.dart';
import 'package:grostore/screens/auth/login.dart';
import 'package:grostore/screens/auth/registration.dart';
import '../../helpers/device_info_helper.dart';
class AuthPageModel extends StatelessWidget {
const AuthPageModel({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.symmetric(horizontal: StyleConfig.padding),
width: getWidth(context),
height: getHeight(context),
decoration: BoxDecoration(
//color: ThemeConfig.splashBackgrund,
image: DecorationImage(
image: AssetImage(getAssetImage("splash_background.png")))),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Spacer(),
Image.asset(
getAssetLogo("img_logo2.png"),
width: 150,
height: 150,
),
// const SizedBox(
// height: 10,
// ),
// Text(
// AppConfig.appName,
// style: StyleConfig.fs30fwEBold(),
// textAlign: TextAlign.center,
// ),
// const SizedBox(
// height: 64,
// ),
Text(
AppLang.local(context).welcome_to_back,
style: StyleConfig.fs22fwEBold,
textAlign: TextAlign.center,
),
const SizedBox(
height: 10,
),
Text(
AppLang.local(context)
.energetically_streamline_one_to_one_web_readiness_before_extensive_meta_services,
style: StyleConfig.fs12cLightfwNormal,
textAlign: TextAlign.center,
),
const Spacer(),
Row(
children: [
Button(
shape: RoundedRectangleBorder(
borderRadius: const BorderRadius.all(Radius.circular(5)),
side: BorderSide(
color: ThemeConfig.red
)
),
// StyleConfig.buttonRadius(5),
minWidth: getWidth(context) * 0.42,
// color: ThemeConfig.secondaryColor,
padding: EdgeInsets.symmetric(
horizontal: StyleConfig.padding14,
vertical: StyleConfig.padding14),
child: Text(
AppLang.local(context).login,
style: StyleConfig.fs14cRedfwNormal,
),
onPressed: (){
MakeRoute.go(context, const Login());
},
),
const Spacer(),
Button(
shape: RoundedRectangleBorder(
borderRadius: const BorderRadius.all(Radius.circular(5)),
side: BorderSide(
color: ThemeConfig.red
)
),
// StyleConfig.buttonRadius(5),
minWidth: getWidth(context) * 0.42,
// color: ThemeConfig.secondaryColor,
padding: EdgeInsets.symmetric(
horizontal: StyleConfig.padding14,
vertical: StyleConfig.padding14),
onPressed: (){
MakeRoute.go(context, Registration());
},
child: Text(
AppLang.local(context).register,
style: StyleConfig.fs14cRedfwNormal,
),
),
],
),
const Spacer(),
],
),
);
}
}

View File

@@ -0,0 +1,105 @@
import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart';
import 'package:grostore/app_lang.dart';
import 'package:grostore/configs/style_config.dart';
import 'package:grostore/configs/theme_config.dart';
import 'package:grostore/custom_ui/Button.dart';
import 'package:grostore/helpers/device_info_helper.dart';
import 'package:grostore/helpers/route.dart';
import 'package:grostore/helpers/shared_value_helper.dart';
import 'package:grostore/presenters/landing_page_presenter.dart';
import 'package:grostore/screens/landing_pages/page_model.dart';
import 'package:grostore/screens/landing_pages/auth_model.dart';
import 'package:grostore/screens/main.dart';
import 'package:provider/provider.dart';
class LandingPage extends StatefulWidget {
const LandingPage({Key? key}) : super(key: key);
@override
State<LandingPage> createState() => _LandingPageState();
}
class _LandingPageState extends State<LandingPage> {
@override
void initState() {
// );
//show_landing_page.update((p0) => false);
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
Provider.of<LandingPagePresenter>(context).setContext(context);
Provider.of<LandingPagePresenter>(context).iniState();
return Consumer<LandingPagePresenter>(
builder: (context,data,child) {
return Scaffold(
body: Column(
children: [
SizedBox(
height: getHeight(context)*0.88,
child: CarouselSlider(
carouselController:data.controller ,
items: data.pages,
options: CarouselOptions(
autoPlay: false,
height: MediaQuery.of(context).size.height,
initialPage: 0,
enableInfiniteScroll: false,
viewportFraction: 1.0,
onPageChanged: (index, reason) {
data.indexChange(index);
},
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: data.pages.map((page) {
int index = data.pages.indexOf(page);
return AnimatedContainer(
duration: const Duration(milliseconds: 100),
width:data.currentIndex == index? 20:5,
height:5,
margin:const EdgeInsets.symmetric(horizontal: 4),
decoration: BoxDecoration(
// shape: BoxShape.circle,
borderRadius: BorderRadius.circular(5),
color: data.currentIndex == index ? ThemeConfig.red : Colors.grey,
),
);
}).toList(),
),
const Spacer(),
Padding(
padding: EdgeInsets.symmetric(horizontal: StyleConfig.padding),
child: Button(
shape: StyleConfig.buttonRadius(5.0),
color: ThemeConfig.red,
padding: EdgeInsets.symmetric(vertical: StyleConfig.padding14),
minWidth: getWidth(context),
onPressed: (){
if(data.currentIndex==3) {
MakeRoute.goName(context, "/main");
} else {
data.onChangeSlider();
}
},
child: Text(data.currentIndex==3?AppLang.local(context).skip:AppLang.local(context).next,style: StyleConfig.fs12cWhitefwBold,),),
),
const SizedBox(height: 14,)
],
),
);
}
);
}
}

View File

@@ -0,0 +1,38 @@
import 'package:flutter/material.dart';
import 'package:grostore/app_lang.dart';
import 'package:grostore/configs/style_config.dart';
import 'package:grostore/helpers/common_functions.dart';
import 'package:grostore/helpers/device_info_helper.dart';
class PageModel extends StatelessWidget {
String img,headerTxt,txt;
PageModel({Key? key,required this.img,required this.headerTxt,required this.txt}) : super(key: key);
@override
Widget build(BuildContext context) {
AppLang.setContext(context);
return SizedBox(
child: Center(
child: Column(
children: [
Image.asset(getAssetImage(img),height: getHeight(context)*0.7,width: getWidth(context),fit: BoxFit.cover,),
Padding(
padding: EdgeInsets.symmetric(horizontal:StyleConfig.padding),
child: Column(
children: [
Text(headerTxt,style: StyleConfig.fs18BlackfwBold,textAlign: TextAlign.center,),
SizedBox(height: 10,),
Text(txt,style: StyleConfig.fs12cLightfwEBold,textAlign: TextAlign.center,),
],
),
),
],
),
),
);
}
}