merged login and home

This commit is contained in:
amirrezaghabeli
2025-08-03 09:44:43 +03:30
parent 24e14b325a
commit 7aa082c6c8
40 changed files with 979 additions and 49 deletions
+31
View File
@@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
class SizeConfig {
static double screenWidth = 0.0;
static double screenHeight = 0.0;
static late TextScaler textScaler;
static void init(BuildContext context) {
screenWidth = MediaQuery.sizeOf(context).width;
screenHeight = MediaQuery.sizeOf(context).height;
textScaler = MediaQuery.of(context).textScaler;
}
}
extension SizeDoubleExt on double {
double h() {
final double screenHeight = SizeConfig.screenHeight;
final double res = (this / 917.0) * screenHeight;
return res;
}
double w() {
final double screenWidth = SizeConfig.screenWidth;
final double res = (this / 412.0) * screenWidth;
return res;
}
double sp() {
return h();
}
}