91 lines
2.2 KiB
Dart
91 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
var kFontSizeDouble = 15.0;
|
|
|
|
var kTextSyleLittleGrey = TextStyle(
|
|
fontSize: 12.0,
|
|
color: Colors.grey.shade800,
|
|
);
|
|
|
|
var kTextSyleHeaderGrey = TextStyle(
|
|
fontSize: 25.0,
|
|
color: Colors.grey.shade800,
|
|
);
|
|
|
|
var kElevatetButtonStyleDrawer = ElevatedButton.styleFrom(
|
|
backgroundColor: Colors.blueGrey,
|
|
foregroundColor: Colors.white,
|
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
|
textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
|
);
|
|
|
|
//DropDown Styles
|
|
var kInputDecorationDropDownMenue = InputDecoration(
|
|
//prefixIcon: Icon(Icons.date_range),
|
|
hintText: 'User'.toUpperCase(),
|
|
contentPadding: const EdgeInsets.all(10),
|
|
hintStyle: TextStyle(letterSpacing: 2, fontSize: kFontSizeDouble),
|
|
filled: true,
|
|
fillColor: Colors.grey.shade400,
|
|
errorStyle: const TextStyle(color: Colors.yellow),
|
|
);
|
|
|
|
SnackbarController kDisplaySnackBarRed(String szInfoText) {
|
|
return Get.snackbar(
|
|
'Info',
|
|
szInfoText,
|
|
backgroundColor: Colors.red[600],
|
|
snackPosition: SnackPosition.TOP,
|
|
colorText: Colors.white,
|
|
snackStyle: SnackStyle.GROUNDED,
|
|
);
|
|
}
|
|
|
|
SnackbarController kDisplaySnackBarGreen(String szInfoText) {
|
|
return Get.snackbar(
|
|
'Info',
|
|
szInfoText,
|
|
backgroundColor: Colors.green[600],
|
|
snackPosition: SnackPosition.TOP,
|
|
colorText: Colors.black,
|
|
snackStyle: SnackStyle.GROUNDED,
|
|
);
|
|
}
|
|
|
|
//Setting Wait for Delete
|
|
List<Map<String, dynamic>> kListMapSetting = [
|
|
{'ContainerID': '', 'Info': ''},
|
|
];
|
|
|
|
//Switching PROD/DEV
|
|
String kStringEnvironment = '?';
|
|
|
|
Future<String?> kShowPopupDialog(
|
|
String title,
|
|
String content,
|
|
String buttonLeftText,
|
|
String buttonRightText,
|
|
) async {
|
|
return await Get.dialog<String>(
|
|
AlertDialog(
|
|
title: Text(title),
|
|
content: Text(content),
|
|
actions: [
|
|
TextButton(
|
|
onPressed: () {
|
|
Navigator.of(Get.overlayContext!).pop('Abbrechen');
|
|
},
|
|
child: Text(buttonLeftText),
|
|
),
|
|
TextButton(
|
|
onPressed: () {
|
|
Navigator.of(Get.overlayContext!).pop('OK');
|
|
},
|
|
child: Text(buttonRightText),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|