Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
swciitg committed Aug 19, 2024
1 parent 8ade2c9 commit f860ec8
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 22 deletions.
2 changes: 2 additions & 0 deletions lib/globals/my_spaces.dart
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));
}
34 changes: 17 additions & 17 deletions lib/globals/size_config.dart
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;
// }
// }
2 changes: 1 addition & 1 deletion lib/pages/login/login.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:onestop_dev/globals/size_config.dart';
import 'package:onestop_dev/pages/login/welcome.dart';
import 'package:onestop_dev/widgets/login/login_webview.dart';
import 'package:onestop_kit/onestop_kit.dart';

class LoginPage extends StatefulWidget {
static String id = "/login";
Expand Down
4 changes: 2 additions & 2 deletions lib/pages/login/welcome.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import 'package:flutter/material.dart';
import 'package:onestop_dev/globals/my_spaces.dart';
import 'package:onestop_dev/widgets/login/login_button.dart';
import 'package:onestop_dev/widgets/login/welcome_header.dart';

import '../../globals/size_config.dart';
import 'package:onestop_kit/onestop_kit.dart';

class WelcomePage extends StatelessWidget {
static String id = "/login2";
final Function setLoading;

const WelcomePage({Key? key, required this.setLoading}) : super(key: key);

@override
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ packages:
description:
path: "."
ref: HEAD
resolved-ref: c4f94cfcbc97674f0870337f4cb86384cfa01e30
resolved-ref: bed214def4d7ca091faed823cbe9975ce613766a
url: "https://github.com/swciitg/onestop_kit.git"
source: git
version: "0.0.1"
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 3.0.5+67
version: 3.0.6+68

environment:
sdk: ">=2.17.0 <3.0.0"
Expand Down

0 comments on commit f860ec8

Please sign in to comment.