step 3 : hapus ai_barcode_scanner, ai barcode, update permission_handler, flutter_map,latlong2
This commit is contained in:
122
lib/app/constant.dart
Normal file
122
lib/app/constant.dart
Normal file
@@ -0,0 +1,122 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class Constant {
|
||||
static String tokenName = "kdr-kurir";
|
||||
// static String baseUrl = "http://devkedungdororaya.aplikasi.web.id/one-api/";
|
||||
|
||||
static String baseUrl = "http://kd-kurir.aplikasi.web.id/one-api/";
|
||||
static String baseBirtUrl = "http://kd-kurir.aplikasi.web.id/";
|
||||
|
||||
static double designHeight = 844;
|
||||
static double designWidth = 390;
|
||||
|
||||
static String version = "1.01";
|
||||
|
||||
//size convertion
|
||||
static double getActualX({
|
||||
required BuildContext context,
|
||||
required double x,
|
||||
}) {
|
||||
return x / designWidth * MediaQuery.of(context).size.width;
|
||||
}
|
||||
|
||||
static double getActualY({
|
||||
required BuildContext context,
|
||||
required double y,
|
||||
}) {
|
||||
return y / designHeight * MediaQuery.of(context).size.height;
|
||||
}
|
||||
|
||||
//color identity
|
||||
static Color backgroundWhite = const Color(0xffFFFFFF);
|
||||
static Color textBlack = const Color(0xFF070708);
|
||||
static Color textGrey = const Color(0xFF919EAB);
|
||||
static Color primaryBlue = const Color(0xFF005AA9);
|
||||
static Color backgroundBlue = const Color(0xFF1890FF).withOpacity(0.25);
|
||||
static Color iconBlue = const Color(0xFF3366FF);
|
||||
static Color primaryGreen = const Color(0xFF229A16);
|
||||
static Color backgroundGreen = const Color(0xFF54D62C).withOpacity(0.25);
|
||||
static Color primaryOrange = const Color(0xFFB78103);
|
||||
static Color backgroundOrange = const Color(0xFFFFC107).withOpacity(0.25);
|
||||
static Color primaryRed = const Color(0xFFB72136);
|
||||
static Color primaryYellow = const Color(0xFFFFC107);
|
||||
static Color primaryPurple = const Color(0xFFBF07FF);
|
||||
static Color backgroundPurple = const Color(0xFFBF07FF).withOpacity(0.25);
|
||||
static Color textSecondary = const Color(0xFF637381);
|
||||
|
||||
// sindhu
|
||||
static Color textPrimary = const Color(0xff212B36);
|
||||
static Color primaryMain = const Color(0xff3366FF);
|
||||
static Color errorDark = const Color(0xffB72136);
|
||||
// static Color dropdownTextColor = const Color(0xff005AA9);
|
||||
static Color blueButton = const Color(0xff005AA9);
|
||||
static Color primaryDark = const Color(0xff005AA9);
|
||||
static Color buttonIsNotActive = const Color(0xffDFE3E8);
|
||||
static Color historyCardColor = const Color(0xff54D62C).withOpacity(0.08);
|
||||
static Color historyCardColorPending =
|
||||
const Color(0xffFF0D05).withOpacity(0.08);
|
||||
|
||||
// typography
|
||||
static TextStyle heading2({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualY(context: context, y: 28),
|
||||
height: 1.5,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle body1({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualY(context: context, y: 16),
|
||||
height: 1.5,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle caption1({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualY(context: context, y: 12),
|
||||
height: 1.5,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle buttonLarge({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualY(context: context, y: 15),
|
||||
height: 1.5,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle heading4({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualY(context: context, y: 18),
|
||||
height: 1.5,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle body3({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualY(context: context, y: 14),
|
||||
height: 1.5,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle caption2({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualY(context: context, y: 10),
|
||||
height: 1.5,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle heading3({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualY(context: context, y: 20),
|
||||
height: 1.5,
|
||||
);
|
||||
}
|
||||
|
||||
static TextStyle body2({required BuildContext context}) {
|
||||
return TextStyle(
|
||||
fontSize: Constant.getActualY(context: context, y: 14),
|
||||
height: 1.5,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user