mobileapplicationPassvault/lib/constant/constantfile.dart

33 lines
1.1 KiB
Dart
Raw Normal View History

2024-04-12 05:23:32 +00:00
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter_passvault/view_pages/hex_color.dart';
class ApiConstants {
static String newKonectarurl = 'https://passvault.konectar.io/api';
static Color backgroundcolor = HexColor("#2b9af3");
static Color orangecolor = HexColor("#f96731");
static String fontFamily = 'source-sans-pro.regular.ttf';
static String ssoUrl = 'https://sso.konectar.io/auth/realms/konectar';
// bool get isTablet(BuildContext context) {
// final double deviceWidth = MediaQuery.of(context).size.width;
// final double deviceHeight = MediaQuery.of(context).size.height;
// final diagonalSize =
// sqrt((deviceWidth * deviceWidth) + (deviceHeight * deviceHeight));
// return diagonalSize >
// 600; // You can adjust this threshold based on your design considerations.
// }
bool get isTablet {
final firstView = WidgetsBinding.instance.platformDispatcher.views.first;
final logicalShortestSide =
firstView.physicalSize.shortestSide / firstView.devicePixelRatio;
// print("size:${logicalShortestSide > 600} tablet ");
return logicalShortestSide > 800;
}
}