-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
swciitg
committed
Aug 19, 2024
1 parent
8ade2c9
commit f860ec8
Showing
6 changed files
with
24 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import 'package:onestop_dev/globals/size_config.dart'; | ||
import 'package:onestop_kit/onestop_kit.dart'; | ||
|
||
class MySpaces { | ||
static double get horizontalScreenPadding => | ||
(4.86 * SizeConfig.horizontalBlockSize!); | ||
|
||
static double get listTileLeftPadding => | ||
(0.06 * (SizeConfig.screenWidth! - 2 * 10)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import 'package:flutter/material.dart'; | ||
|
||
class SizeConfig { | ||
static MediaQueryData? _mediaQueryData; | ||
static double? screenWidth; | ||
static double? screenHeight; | ||
static double? horizontalBlockSize; | ||
static double? verticalBlockSize; | ||
|
||
void init(BuildContext context) { | ||
_mediaQueryData = MediaQuery.of(context); | ||
screenWidth = _mediaQueryData?.size.width; | ||
screenHeight = _mediaQueryData?.size.height; | ||
horizontalBlockSize = (screenWidth)! / 100; | ||
verticalBlockSize = (screenHeight)! / 100; | ||
} | ||
} | ||
// import 'package:flutter/material.dart'; | ||
// | ||
// class SizeConfig { | ||
// static MediaQueryData? _mediaQueryData; | ||
// static double? screenWidth; | ||
// static double? screenHeight; | ||
// static double? horizontalBlockSize; | ||
// static double? verticalBlockSize; | ||
// | ||
// void init(BuildContext context) { | ||
// _mediaQueryData = MediaQuery.of(context); | ||
// screenWidth = _mediaQueryData?.size.width; | ||
// screenHeight = _mediaQueryData?.size.height; | ||
// horizontalBlockSize = (screenWidth)! / 100; | ||
// verticalBlockSize = (screenHeight)! / 100; | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters