step 3 : login proses
This commit is contained in:
101
lib/app/constant.dart
Normal file
101
lib/app/constant.dart
Normal file
@@ -0,0 +1,101 @@
|
||||
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 inputanGrey = const Color(0xff637381);
|
||||
static Color bgButton = const Color(0xFF0098DA);
|
||||
static Color bgRed = const Color(0xffFF4842).withOpacity(0.08);
|
||||
static Color bgGrey = const Color(0xffF9F9F9);
|
||||
static Color bgBlue = Colors.blue;
|
||||
static Color bgIcon = const Color(0xffA8CF45);
|
||||
static Color textCardGrey = const Color.fromRGBO(0, 0, 0, 0.60);
|
||||
|
||||
static Color textBlack = const Color(0xff212B36);
|
||||
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 titleRiwayat({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualYPhone(context: context, y: 20),
|
||||
fontWeight: FontWeight.w500,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle cardText({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualYPhone(context: context, y: 14),
|
||||
fontWeight: FontWeight.w400,
|
||||
);
|
||||
}
|
||||
|
||||
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 titlePosisiHP({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualYPhone(context: context, y: 18),
|
||||
fontWeight: FontWeight.normal,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle titleInputan600({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualYPhone(context: context, y: 16),
|
||||
fontWeight: FontWeight.w600,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle titleButton500({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualYPhone(context: context, y: 15),
|
||||
fontWeight: FontWeight.w500,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user