folder structure changes
This commit is contained in:
@@ -24,7 +24,6 @@ class AppStrings {
|
||||
|
||||
//Home
|
||||
static const String home = 'Home';
|
||||
|
||||
static const String partnership = 'Partnership';
|
||||
static const String selfApply = 'Self-apply';
|
||||
static const String contracting = 'Contracting';
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user