75 lines
2.2 KiB
Dart
75 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class Constant {
|
|
// static double designHeight = 1024;
|
|
// static double designWidth = 1440;
|
|
|
|
// base url
|
|
static String baseURL = "http://devone.aplikasi.web.id/";
|
|
|
|
static String bearerName = "scan-ktp";
|
|
|
|
static double designHeightPhone = 844;
|
|
static double designWidthPhone = 390;
|
|
|
|
// color theme
|
|
static Color textTrueBlack = const Color(0xff000000);
|
|
static Color textBlack = const Color(0xff212B36);
|
|
static Color textLightGrey = const Color(0xff919EAB);
|
|
static Color textOrange = const Color(0xffF15A29);
|
|
static Color textDarkGrey = const Color(0xff637381);
|
|
static Color bgAddressPresensi = const Color.fromRGBO(241, 90, 41, 0.08);
|
|
static Color textWhite = Color(0xffFDFDFD);
|
|
static Color textRed = Color(0xffFF4842);
|
|
// background upload file
|
|
static Color bgUploadFile = Color.fromRGBO(207, 207, 207, 0.20);
|
|
|
|
// size convertion
|
|
static double getActualXPhone({
|
|
required BuildContext context,
|
|
required double x,
|
|
}) {
|
|
return x / designWidthPhone * MediaQuery.of(context).size.width;
|
|
}
|
|
|
|
static double getActualYPhone({
|
|
required BuildContext context,
|
|
required double y,
|
|
}) {
|
|
return y / designHeightPhone * MediaQuery.of(context).size.height;
|
|
}
|
|
|
|
// typography
|
|
static TextStyle title_700({required BuildContext context}) {
|
|
return TextStyle(
|
|
fontSize: Constant.getActualYPhone(context: context, y: 36),
|
|
fontWeight: FontWeight.w700,
|
|
);
|
|
}
|
|
|
|
static TextStyle title_400({required BuildContext context}) {
|
|
return TextStyle(
|
|
fontSize: Constant.getActualYPhone(context: context, y: 16),
|
|
fontWeight: FontWeight.w400,
|
|
);
|
|
}
|
|
|
|
static TextStyle titleInputan500({required BuildContext context}) {
|
|
return TextStyle(
|
|
fontSize: Constant.getActualYPhone(context: context, y: 16),
|
|
fontWeight: FontWeight.w500,
|
|
);
|
|
}
|
|
|
|
static TextStyle titleButton500({required BuildContext context}) {
|
|
return TextStyle(
|
|
fontSize: Constant.getActualYPhone(context: context, y: 15),
|
|
fontWeight: FontWeight.w500,
|
|
);
|
|
}
|
|
|
|
static Color inputanGrey = const Color(0xff637381);
|
|
static Color bgButton = const Color(0xFF0098DA);
|
|
static Color bgRed = const Color(0xffFF4842).withOpacity(0.08);
|
|
}
|