mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
shadow and text color
This commit is contained in:
@ -5,6 +5,7 @@ import 'package:syncrow_web/pages/access_management/bloc/access_state.dart';
|
|||||||
import 'package:syncrow_web/pages/access_management/model/password_model.dart';
|
import 'package:syncrow_web/pages/access_management/model/password_model.dart';
|
||||||
import 'package:syncrow_web/pages/common/hour_picker_dialog.dart';
|
import 'package:syncrow_web/pages/common/hour_picker_dialog.dart';
|
||||||
import 'package:syncrow_web/services/access_mang_api.dart';
|
import 'package:syncrow_web/services/access_mang_api.dart';
|
||||||
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
import 'package:syncrow_web/utils/constants/app_enum.dart';
|
import 'package:syncrow_web/utils/constants/app_enum.dart';
|
||||||
import 'package:syncrow_web/utils/snack_bar.dart';
|
import 'package:syncrow_web/utils/snack_bar.dart';
|
||||||
|
|
||||||
@ -26,7 +27,8 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
List<PasswordModel> filteredData = [];
|
List<PasswordModel> filteredData = [];
|
||||||
List<PasswordModel> data = [];
|
List<PasswordModel> data = [];
|
||||||
|
|
||||||
Future<void> _onFetchTableData(FetchTableData event, Emitter<AccessState> emit) async {
|
Future<void> _onFetchTableData(
|
||||||
|
FetchTableData event, Emitter<AccessState> emit) async {
|
||||||
try {
|
try {
|
||||||
emit(AccessLoaded());
|
emit(AccessLoaded());
|
||||||
data = await AccessMangApi().fetchVisitorPassword();
|
data = await AccessMangApi().fetchVisitorPassword();
|
||||||
@ -39,19 +41,28 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updateTabsCount() {
|
void updateTabsCount() {
|
||||||
int toBeEffectiveCount =
|
int toBeEffectiveCount = data
|
||||||
data.where((item) => item.passwordStatus.value == 'To be effective').length;
|
.where((item) => item.passwordStatus.value == 'To be effective')
|
||||||
int effectiveCount = data.where((item) => item.passwordStatus.value == 'Effective').length;
|
.length;
|
||||||
int expiredCount = data.where((item) => item.passwordStatus.value == 'Expired').length;
|
int effectiveCount =
|
||||||
|
data.where((item) => item.passwordStatus.value == 'Effective').length;
|
||||||
|
int expiredCount =
|
||||||
|
data.where((item) => item.passwordStatus.value == 'Expired').length;
|
||||||
tabs[1] = 'To Be Effective ($toBeEffectiveCount)';
|
tabs[1] = 'To Be Effective ($toBeEffectiveCount)';
|
||||||
tabs[2] = 'Effective ($effectiveCount)';
|
tabs[2] = 'Effective ($effectiveCount)';
|
||||||
tabs[3] = 'Expired ($expiredCount)';
|
tabs[3] = 'Expired ($expiredCount)';
|
||||||
}
|
}
|
||||||
|
|
||||||
int selectedIndex = 0;
|
int selectedIndex = 0;
|
||||||
final List<String> tabs = ['All', 'To Be Effective (0)', 'Effective (0)', 'Expired'];
|
final List<String> tabs = [
|
||||||
|
'All',
|
||||||
|
'To Be Effective (0)',
|
||||||
|
'Effective (0)',
|
||||||
|
'Expired'
|
||||||
|
];
|
||||||
|
|
||||||
Future selectFilterTap(TabChangedEvent event, Emitter<AccessState> emit) async {
|
Future selectFilterTap(
|
||||||
|
TabChangedEvent event, Emitter<AccessState> emit) async {
|
||||||
try {
|
try {
|
||||||
emit(AccessLoaded());
|
emit(AccessLoaded());
|
||||||
selectedIndex = event.selectedIndex;
|
selectedIndex = event.selectedIndex;
|
||||||
@ -73,6 +84,23 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
initialDate: DateTime.now(),
|
initialDate: DateTime.now(),
|
||||||
firstDate: DateTime.now().add(const Duration(days: -5095)),
|
firstDate: DateTime.now().add(const Duration(days: -5095)),
|
||||||
lastDate: DateTime.now().add(const Duration(days: 2095)),
|
lastDate: DateTime.now().add(const Duration(days: 2095)),
|
||||||
|
builder: (BuildContext context, Widget? child) {
|
||||||
|
return Theme(
|
||||||
|
data: ThemeData.light().copyWith(
|
||||||
|
colorScheme: ColorScheme.light(
|
||||||
|
primary: ColorsManager.blackColor,
|
||||||
|
onPrimary: Colors.white,
|
||||||
|
onSurface: ColorsManager.grayColor,
|
||||||
|
),
|
||||||
|
textButtonTheme: TextButtonThemeData(
|
||||||
|
style: TextButton.styleFrom(
|
||||||
|
foregroundColor: Colors.blue,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: child!,
|
||||||
|
);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
if (picked != null) {
|
if (picked != null) {
|
||||||
final TimeOfDay? timePicked = await showHourPicker(
|
final TimeOfDay? timePicked = await showHourPicker(
|
||||||
@ -88,16 +116,20 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
timePicked.hour,
|
timePicked.hour,
|
||||||
timePicked.minute,
|
timePicked.minute,
|
||||||
);
|
);
|
||||||
final int selectedTimestamp = selectedDateTime.millisecondsSinceEpoch ~/ 1000;
|
final int selectedTimestamp =
|
||||||
|
selectedDateTime.millisecondsSinceEpoch ~/ 1000;
|
||||||
if (event.isStart) {
|
if (event.isStart) {
|
||||||
if (expirationTimeTimeStamp != null && selectedTimestamp > expirationTimeTimeStamp!) {
|
if (expirationTimeTimeStamp != null &&
|
||||||
CustomSnackBar.displaySnackBar('Effective Time cannot be later than Expiration Time.');
|
selectedTimestamp > expirationTimeTimeStamp!) {
|
||||||
|
CustomSnackBar.displaySnackBar(
|
||||||
|
'Effective Time cannot be later than Expiration Time.');
|
||||||
} else {
|
} else {
|
||||||
startTime = selectedDateTime.toString().split('.').first;
|
startTime = selectedDateTime.toString().split('.').first;
|
||||||
effectiveTimeTimeStamp = selectedTimestamp;
|
effectiveTimeTimeStamp = selectedTimestamp;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (effectiveTimeTimeStamp != null && selectedTimestamp < effectiveTimeTimeStamp!) {
|
if (effectiveTimeTimeStamp != null &&
|
||||||
|
selectedTimestamp < effectiveTimeTimeStamp!) {
|
||||||
CustomSnackBar.displaySnackBar(
|
CustomSnackBar.displaySnackBar(
|
||||||
'Expiration Time cannot be earlier than Effective Time.');
|
'Expiration Time cannot be earlier than Effective Time.');
|
||||||
} else {
|
} else {
|
||||||
@ -110,7 +142,8 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
emit(ChangeTimeState());
|
emit(ChangeTimeState());
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _filterData(FilterDataEvent event, Emitter<AccessState> emit) async {
|
Future<void> _filterData(
|
||||||
|
FilterDataEvent event, Emitter<AccessState> emit) async {
|
||||||
emit(AccessLoaded());
|
emit(AccessLoaded());
|
||||||
try {
|
try {
|
||||||
// Convert search text to lower case for case-insensitive search
|
// Convert search text to lower case for case-insensitive search
|
||||||
@ -119,29 +152,40 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
filteredData = data.where((item) {
|
filteredData = data.where((item) {
|
||||||
bool matchesCriteria = true;
|
bool matchesCriteria = true;
|
||||||
// Convert timestamp to DateTime and extract date component
|
// Convert timestamp to DateTime and extract date component
|
||||||
DateTime effectiveDate =
|
DateTime effectiveDate = DateTime.fromMillisecondsSinceEpoch(
|
||||||
DateTime.fromMillisecondsSinceEpoch(int.parse(item.effectiveTime.toString()) * 1000)
|
int.parse(item.effectiveTime.toString()) * 1000)
|
||||||
.toUtc()
|
.toUtc()
|
||||||
.toLocal();
|
.toLocal();
|
||||||
DateTime invalidDate =
|
DateTime invalidDate = DateTime.fromMillisecondsSinceEpoch(
|
||||||
DateTime.fromMillisecondsSinceEpoch(int.parse(item.invalidTime.toString()) * 1000)
|
int.parse(item.invalidTime.toString()) * 1000)
|
||||||
.toUtc()
|
.toUtc()
|
||||||
.toLocal();
|
.toLocal();
|
||||||
DateTime effectiveDateAndTime = DateTime(effectiveDate.year, effectiveDate.month,
|
DateTime effectiveDateAndTime = DateTime(
|
||||||
effectiveDate.day, effectiveDate.hour, effectiveDate.minute);
|
effectiveDate.year,
|
||||||
DateTime invalidDateAndTime = DateTime(invalidDate.year, invalidDate.month, invalidDate.day,
|
effectiveDate.month,
|
||||||
invalidDate.hour, invalidDate.minute);
|
effectiveDate.day,
|
||||||
|
effectiveDate.hour,
|
||||||
|
effectiveDate.minute);
|
||||||
|
DateTime invalidDateAndTime = DateTime(
|
||||||
|
invalidDate.year,
|
||||||
|
invalidDate.month,
|
||||||
|
invalidDate.day,
|
||||||
|
invalidDate.hour,
|
||||||
|
invalidDate.minute);
|
||||||
|
|
||||||
// Filter by password name, making the search case-insensitive
|
// Filter by password name, making the search case-insensitive
|
||||||
if (searchText.isNotEmpty) {
|
if (searchText.isNotEmpty) {
|
||||||
final bool matchesName = item.passwordName.toString().toLowerCase().contains(searchText);
|
final bool matchesName =
|
||||||
|
item.passwordName.toString().toLowerCase().contains(searchText);
|
||||||
if (!matchesName) {
|
if (!matchesName) {
|
||||||
matchesCriteria = false;
|
matchesCriteria = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (searchEmailText.isNotEmpty) {
|
if (searchEmailText.isNotEmpty) {
|
||||||
final bool matchesName =
|
final bool matchesName = item.authorizerEmail
|
||||||
item.authorizerEmail.toString().toLowerCase().contains(searchEmailText);
|
.toString()
|
||||||
|
.toLowerCase()
|
||||||
|
.contains(searchEmailText);
|
||||||
if (!matchesName) {
|
if (!matchesName) {
|
||||||
matchesCriteria = false;
|
matchesCriteria = false;
|
||||||
}
|
}
|
||||||
@ -149,9 +193,11 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
// Filter by start date only
|
// Filter by start date only
|
||||||
if (event.startTime != null && event.endTime == null) {
|
if (event.startTime != null && event.endTime == null) {
|
||||||
DateTime startDateTime =
|
DateTime startDateTime =
|
||||||
DateTime.fromMillisecondsSinceEpoch(event.startTime! * 1000).toUtc().toLocal();
|
DateTime.fromMillisecondsSinceEpoch(event.startTime! * 1000)
|
||||||
startDateTime = DateTime(startDateTime.year, startDateTime.month, startDateTime.day,
|
.toUtc()
|
||||||
startDateTime.hour, startDateTime.minute);
|
.toLocal();
|
||||||
|
startDateTime = DateTime(startDateTime.year, startDateTime.month,
|
||||||
|
startDateTime.day, startDateTime.hour, startDateTime.minute);
|
||||||
if (effectiveDateAndTime.isBefore(startDateTime)) {
|
if (effectiveDateAndTime.isBefore(startDateTime)) {
|
||||||
matchesCriteria = false;
|
matchesCriteria = false;
|
||||||
}
|
}
|
||||||
@ -159,9 +205,11 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
// Filter by end date only
|
// Filter by end date only
|
||||||
if (event.endTime != null && event.startTime == null) {
|
if (event.endTime != null && event.startTime == null) {
|
||||||
DateTime startDateTime =
|
DateTime startDateTime =
|
||||||
DateTime.fromMillisecondsSinceEpoch(event.endTime! * 1000).toUtc().toLocal();
|
DateTime.fromMillisecondsSinceEpoch(event.endTime! * 1000)
|
||||||
startDateTime = DateTime(startDateTime.year, startDateTime.month, startDateTime.day,
|
.toUtc()
|
||||||
startDateTime.hour, startDateTime.minute);
|
.toLocal();
|
||||||
|
startDateTime = DateTime(startDateTime.year, startDateTime.month,
|
||||||
|
startDateTime.day, startDateTime.hour, startDateTime.minute);
|
||||||
if (invalidDateAndTime.isAfter(startDateTime)) {
|
if (invalidDateAndTime.isAfter(startDateTime)) {
|
||||||
matchesCriteria = false;
|
matchesCriteria = false;
|
||||||
}
|
}
|
||||||
@ -170,13 +218,17 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
// Filter by both start date and end date
|
// Filter by both start date and end date
|
||||||
if (event.startTime != null && event.endTime != null) {
|
if (event.startTime != null && event.endTime != null) {
|
||||||
DateTime startDateTime =
|
DateTime startDateTime =
|
||||||
DateTime.fromMillisecondsSinceEpoch(event.startTime! * 1000).toUtc().toLocal();
|
DateTime.fromMillisecondsSinceEpoch(event.startTime! * 1000)
|
||||||
|
.toUtc()
|
||||||
|
.toLocal();
|
||||||
DateTime endDateTime =
|
DateTime endDateTime =
|
||||||
DateTime.fromMillisecondsSinceEpoch(event.endTime! * 1000).toUtc().toLocal();
|
DateTime.fromMillisecondsSinceEpoch(event.endTime! * 1000)
|
||||||
startDateTime = DateTime(startDateTime.year, startDateTime.month, startDateTime.day,
|
.toUtc()
|
||||||
startDateTime.hour, startDateTime.minute);
|
.toLocal();
|
||||||
endDateTime = DateTime(endDateTime.year, endDateTime.month, endDateTime.day,
|
startDateTime = DateTime(startDateTime.year, startDateTime.month,
|
||||||
endDateTime.hour, endDateTime.minute);
|
startDateTime.day, startDateTime.hour, startDateTime.minute);
|
||||||
|
endDateTime = DateTime(endDateTime.year, endDateTime.month,
|
||||||
|
endDateTime.day, endDateTime.hour, endDateTime.minute);
|
||||||
if (effectiveDateAndTime.isBefore(startDateTime) ||
|
if (effectiveDateAndTime.isBefore(startDateTime) ||
|
||||||
invalidDateAndTime.isAfter(endDateTime)) {
|
invalidDateAndTime.isAfter(endDateTime)) {
|
||||||
matchesCriteria = false;
|
matchesCriteria = false;
|
||||||
@ -184,11 +236,14 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Filter by selected tab index
|
// Filter by selected tab index
|
||||||
if (event.selectedTabIndex == 1 && item.passwordStatus.value != 'To be effective') {
|
if (event.selectedTabIndex == 1 &&
|
||||||
|
item.passwordStatus.value != 'To be effective') {
|
||||||
matchesCriteria = false;
|
matchesCriteria = false;
|
||||||
} else if (event.selectedTabIndex == 2 && item.passwordStatus.value != 'Effective') {
|
} else if (event.selectedTabIndex == 2 &&
|
||||||
|
item.passwordStatus.value != 'Effective') {
|
||||||
matchesCriteria = false;
|
matchesCriteria = false;
|
||||||
} else if (event.selectedTabIndex == 3 && item.passwordStatus.value != 'Expired') {
|
} else if (event.selectedTabIndex == 3 &&
|
||||||
|
item.passwordStatus.value != 'Expired') {
|
||||||
matchesCriteria = false;
|
matchesCriteria = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,12 +269,14 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String timestampToDate(dynamic timestamp) {
|
String timestampToDate(dynamic timestamp) {
|
||||||
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(int.parse(timestamp) * 1000);
|
DateTime dateTime =
|
||||||
|
DateTime.fromMillisecondsSinceEpoch(int.parse(timestamp) * 1000);
|
||||||
return "${dateTime.year}/${dateTime.month.toString().padLeft(2, '0')}/${dateTime.day.toString().padLeft(2, '0')} "
|
return "${dateTime.year}/${dateTime.month.toString().padLeft(2, '0')}/${dateTime.day.toString().padLeft(2, '0')} "
|
||||||
" ${dateTime.hour.toString().padLeft(2, '0')}:${dateTime.minute.toString().padLeft(2, '0')}";
|
" ${dateTime.hour.toString().padLeft(2, '0')}:${dateTime.minute.toString().padLeft(2, '0')}";
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> onTabChanged(TabChangedEvent event, Emitter<AccessState> emit) async {
|
Future<void> onTabChanged(
|
||||||
|
TabChangedEvent event, Emitter<AccessState> emit) async {
|
||||||
try {
|
try {
|
||||||
emit(AccessLoaded());
|
emit(AccessLoaded());
|
||||||
selectedIndex = event.selectedIndex;
|
selectedIndex = event.selectedIndex;
|
||||||
@ -228,14 +285,19 @@ class AccessBloc extends Bloc<AccessEvent, AccessState> {
|
|||||||
filteredData = data;
|
filteredData = data;
|
||||||
break;
|
break;
|
||||||
case 1: // To Be Effective
|
case 1: // To Be Effective
|
||||||
filteredData =
|
filteredData = data
|
||||||
data.where((item) => item.passwordStatus.value == "To Be Effective").toList();
|
.where((item) => item.passwordStatus.value == "To Be Effective")
|
||||||
|
.toList();
|
||||||
break;
|
break;
|
||||||
case 2: // Effective
|
case 2: // Effective
|
||||||
filteredData = data.where((item) => item.passwordStatus.value == "Effective").toList();
|
filteredData = data
|
||||||
|
.where((item) => item.passwordStatus.value == "Effective")
|
||||||
|
.toList();
|
||||||
break;
|
break;
|
||||||
case 3: // Expired
|
case 3: // Expired
|
||||||
filteredData = data.where((item) => item.passwordStatus.value == "Expired").toList();
|
filteredData = data
|
||||||
|
.where((item) => item.passwordStatus.value == "Expired")
|
||||||
|
.toList();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
filteredData = data;
|
filteredData = data;
|
||||||
|
@ -27,7 +27,8 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
final isLargeScreen = isLargeScreenSize(context);
|
final isLargeScreen = isLargeScreenSize(context);
|
||||||
final isSmallScreen = isSmallScreenSize(context);
|
final isSmallScreen = isSmallScreenSize(context);
|
||||||
final isHalfMediumScreen = isHafMediumScreenSize(context);
|
final isHalfMediumScreen = isHafMediumScreenSize(context);
|
||||||
final padding = isLargeScreen ? const EdgeInsets.all(30) : const EdgeInsets.all(15);
|
final padding =
|
||||||
|
isLargeScreen ? const EdgeInsets.all(30) : const EdgeInsets.all(15);
|
||||||
|
|
||||||
return WebScaffold(
|
return WebScaffold(
|
||||||
enableMenuSidebar: false,
|
enableMenuSidebar: false,
|
||||||
@ -37,23 +38,10 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
style: Theme.of(context).textTheme.headlineLarge,
|
style: Theme.of(context).textTheme.headlineLarge,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
centerBody: Wrap(
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(left: MediaQuery.of(context).size.width * 0.09),
|
|
||||||
child: Align(
|
|
||||||
alignment: Alignment.bottomLeft,
|
|
||||||
child: Text(
|
|
||||||
'Physical Access',
|
|
||||||
style: Theme.of(context).textTheme.headlineMedium!.copyWith(color: Colors.white),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
rightBody: const NavigateHomeGridView(),
|
rightBody: const NavigateHomeGridView(),
|
||||||
scaffoldBody: BlocProvider(
|
scaffoldBody: BlocProvider(
|
||||||
create: (BuildContext context) => AccessBloc()..add(FetchTableData()),
|
create: (BuildContext context) =>
|
||||||
|
AccessBloc()..add(FetchTableData()),
|
||||||
child: BlocConsumer<AccessBloc, AccessState>(
|
child: BlocConsumer<AccessBloc, AccessState>(
|
||||||
listener: (context, state) {},
|
listener: (context, state) {},
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
@ -107,11 +95,14 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
return [
|
return [
|
||||||
item.passwordName,
|
item.passwordName,
|
||||||
item.passwordType.value,
|
item.passwordType.value,
|
||||||
accessBloc.timestampToDate(item.effectiveTime),
|
accessBloc
|
||||||
accessBloc.timestampToDate(item.invalidTime),
|
.timestampToDate(item.effectiveTime),
|
||||||
|
accessBloc
|
||||||
|
.timestampToDate(item.invalidTime),
|
||||||
item.deviceName.toString(),
|
item.deviceName.toString(),
|
||||||
item.authorizerEmail.toString(),
|
item.authorizerEmail.toString(),
|
||||||
accessBloc.timestampToDate(item.invalidTime),
|
accessBloc
|
||||||
|
.timestampToDate(item.invalidTime),
|
||||||
item.passwordStatus.value,
|
item.passwordStatus.value,
|
||||||
];
|
];
|
||||||
}).toList(),
|
}).toList(),
|
||||||
@ -122,7 +113,8 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
})));
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
Wrap _buildVisitorAdminPasswords(BuildContext context, AccessBloc accessBloc) {
|
Wrap _buildVisitorAdminPasswords(
|
||||||
|
BuildContext context, AccessBloc accessBloc) {
|
||||||
return Wrap(
|
return Wrap(
|
||||||
spacing: 10,
|
spacing: 10,
|
||||||
runSpacing: 10,
|
runSpacing: 10,
|
||||||
@ -147,8 +139,9 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
},
|
},
|
||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
child: Text(
|
child: Text(
|
||||||
'+ Create Visitor Password ',
|
'Create Visitor Password ',
|
||||||
style: context.textTheme.titleSmall!.copyWith(color: Colors.white, fontSize: 12),
|
style: context.textTheme.titleSmall!
|
||||||
|
.copyWith(color: Colors.white, fontSize: 12),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
@ -160,7 +153,8 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
backgroundColor: ColorsManager.whiteColors,
|
backgroundColor: ColorsManager.whiteColors,
|
||||||
child: Text(
|
child: Text(
|
||||||
'Admin Password',
|
'Admin Password',
|
||||||
style: context.textTheme.titleSmall!.copyWith(color: Colors.black, fontSize: 12),
|
style: context.textTheme.titleSmall!
|
||||||
|
.copyWith(color: Colors.black, fontSize: 12),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -185,8 +179,10 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
description: '',
|
description: '',
|
||||||
onSubmitted: (value) {
|
onSubmitted: (value) {
|
||||||
accessBloc.add(FilterDataEvent(
|
accessBloc.add(FilterDataEvent(
|
||||||
emailAuthorizer: accessBloc.emailAuthorizer.text.toLowerCase(),
|
emailAuthorizer:
|
||||||
selectedTabIndex: BlocProvider.of<AccessBloc>(context).selectedIndex,
|
accessBloc.emailAuthorizer.text.toLowerCase(),
|
||||||
|
selectedTabIndex:
|
||||||
|
BlocProvider.of<AccessBloc>(context).selectedIndex,
|
||||||
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
||||||
startTime: accessBloc.effectiveTimeTimeStamp,
|
startTime: accessBloc.effectiveTimeTimeStamp,
|
||||||
endTime: accessBloc.expirationTimeTimeStamp));
|
endTime: accessBloc.expirationTimeTimeStamp));
|
||||||
@ -204,8 +200,10 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
description: '',
|
description: '',
|
||||||
onSubmitted: (value) {
|
onSubmitted: (value) {
|
||||||
accessBloc.add(FilterDataEvent(
|
accessBloc.add(FilterDataEvent(
|
||||||
emailAuthorizer: accessBloc.emailAuthorizer.text.toLowerCase(),
|
emailAuthorizer:
|
||||||
selectedTabIndex: BlocProvider.of<AccessBloc>(context).selectedIndex,
|
accessBloc.emailAuthorizer.text.toLowerCase(),
|
||||||
|
selectedTabIndex:
|
||||||
|
BlocProvider.of<AccessBloc>(context).selectedIndex,
|
||||||
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
||||||
startTime: accessBloc.effectiveTimeTimeStamp,
|
startTime: accessBloc.effectiveTimeTimeStamp,
|
||||||
endTime: accessBloc.expirationTimeTimeStamp));
|
endTime: accessBloc.expirationTimeTimeStamp));
|
||||||
@ -234,7 +232,8 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
onSearch: () {
|
onSearch: () {
|
||||||
accessBloc.add(FilterDataEvent(
|
accessBloc.add(FilterDataEvent(
|
||||||
emailAuthorizer: accessBloc.emailAuthorizer.text.toLowerCase(),
|
emailAuthorizer: accessBloc.emailAuthorizer.text.toLowerCase(),
|
||||||
selectedTabIndex: BlocProvider.of<AccessBloc>(context).selectedIndex,
|
selectedTabIndex:
|
||||||
|
BlocProvider.of<AccessBloc>(context).selectedIndex,
|
||||||
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
||||||
startTime: accessBloc.effectiveTimeTimeStamp,
|
startTime: accessBloc.effectiveTimeTimeStamp,
|
||||||
endTime: accessBloc.expirationTimeTimeStamp));
|
endTime: accessBloc.expirationTimeTimeStamp));
|
||||||
@ -262,8 +261,10 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
description: '',
|
description: '',
|
||||||
onSubmitted: (value) {
|
onSubmitted: (value) {
|
||||||
accessBloc.add(FilterDataEvent(
|
accessBloc.add(FilterDataEvent(
|
||||||
emailAuthorizer: accessBloc.emailAuthorizer.text.toLowerCase(),
|
emailAuthorizer:
|
||||||
selectedTabIndex: BlocProvider.of<AccessBloc>(context).selectedIndex,
|
accessBloc.emailAuthorizer.text.toLowerCase(),
|
||||||
|
selectedTabIndex:
|
||||||
|
BlocProvider.of<AccessBloc>(context).selectedIndex,
|
||||||
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
||||||
startTime: accessBloc.effectiveTimeTimeStamp,
|
startTime: accessBloc.effectiveTimeTimeStamp,
|
||||||
endTime: accessBloc.expirationTimeTimeStamp));
|
endTime: accessBloc.expirationTimeTimeStamp));
|
||||||
@ -287,7 +288,8 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
onSearch: () {
|
onSearch: () {
|
||||||
accessBloc.add(FilterDataEvent(
|
accessBloc.add(FilterDataEvent(
|
||||||
emailAuthorizer: accessBloc.emailAuthorizer.text.toLowerCase(),
|
emailAuthorizer: accessBloc.emailAuthorizer.text.toLowerCase(),
|
||||||
selectedTabIndex: BlocProvider.of<AccessBloc>(context).selectedIndex,
|
selectedTabIndex:
|
||||||
|
BlocProvider.of<AccessBloc>(context).selectedIndex,
|
||||||
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
passwordName: accessBloc.passwordName.text.toLowerCase(),
|
||||||
startTime: accessBloc.effectiveTimeTimeStamp,
|
startTime: accessBloc.effectiveTimeTimeStamp,
|
||||||
endTime: accessBloc.expirationTimeTimeStamp));
|
endTime: accessBloc.expirationTimeTimeStamp));
|
||||||
|
@ -81,7 +81,10 @@ class DateTimeWebWidget extends StatelessWidget {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 30,
|
width: 30,
|
||||||
),
|
),
|
||||||
const Icon(Icons.arrow_right_alt),
|
const Icon(
|
||||||
|
Icons.arrow_right_alt,
|
||||||
|
color: ColorsManager.grayColor,
|
||||||
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 30,
|
width: 30,
|
||||||
),
|
),
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||||
|
import 'package:syncrow_web/utils/style.dart';
|
||||||
|
|
||||||
class StatefulTextField extends StatefulWidget {
|
class StatefulTextField extends StatefulWidget {
|
||||||
const StatefulTextField(
|
const StatefulTextField(
|
||||||
@ -25,13 +26,15 @@ class StatefulTextField extends StatefulWidget {
|
|||||||
class _StatefulTextFieldState extends State<StatefulTextField> {
|
class _StatefulTextFieldState extends State<StatefulTextField> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return CustomTextField(
|
return Container(
|
||||||
title: widget.title,
|
child: CustomTextField(
|
||||||
controller: widget.controller,
|
title: widget.title,
|
||||||
hintText: widget.hintText,
|
controller: widget.controller,
|
||||||
width: widget.width,
|
hintText: widget.hintText,
|
||||||
elevation: widget.elevation,
|
width: widget.width,
|
||||||
onSubmittedFun: widget.onSubmitted);
|
elevation: widget.elevation,
|
||||||
|
onSubmittedFun: widget.onSubmitted),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,17 +76,20 @@ class CustomTextField extends StatelessWidget {
|
|||||||
child: Container(
|
child: Container(
|
||||||
width: width,
|
width: width,
|
||||||
height: 45,
|
height: 45,
|
||||||
decoration: BoxDecoration(
|
decoration: containerDecoration,
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(8),
|
// decoration: BoxDecoration(
|
||||||
),
|
// color: Colors.white,
|
||||||
|
// borderRadius: BorderRadius.circular(8),
|
||||||
|
// ),
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
style: const TextStyle(color: Colors.black),
|
style: const TextStyle(color: Colors.black),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: hintText,
|
hintText: hintText,
|
||||||
hintStyle: const TextStyle(fontSize: 12),
|
hintStyle: const TextStyle(fontSize: 12),
|
||||||
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
contentPadding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 12, vertical: 10),
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
),
|
),
|
||||||
onFieldSubmitted: (_) {
|
onFieldSubmitted: (_) {
|
||||||
|
@ -39,11 +39,17 @@ class CustomWebTextField extends StatelessWidget {
|
|||||||
if (isRequired)
|
if (isRequired)
|
||||||
Text(
|
Text(
|
||||||
'* ',
|
'* ',
|
||||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(color: Colors.red),
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.bodyMedium!
|
||||||
|
.copyWith(color: Colors.red),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
textFieldName,
|
textFieldName,
|
||||||
style: Theme.of(context).textTheme.bodySmall!.copyWith(color: Colors.black, fontSize: 13),
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.bodySmall!
|
||||||
|
.copyWith(color: Colors.black, fontSize: 13),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -53,10 +59,10 @@ class CustomWebTextField extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
description ?? '',
|
description ?? '',
|
||||||
style: Theme.of(context)
|
style: Theme.of(context).textTheme.bodySmall!.copyWith(
|
||||||
.textTheme
|
fontSize: 9,
|
||||||
.bodySmall!
|
fontWeight: FontWeight.w400,
|
||||||
.copyWith(fontSize: 9, fontWeight: FontWeight.w400, color: ColorsManager.textGray),
|
color: ColorsManager.textGray),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -66,21 +72,15 @@ class CustomWebTextField extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: height ?? 35,
|
height: height ?? 35,
|
||||||
decoration: containerDecoration.copyWith(color: const Color(0xFFF5F6F7), boxShadow: [
|
decoration: containerDecoration,
|
||||||
BoxShadow(
|
|
||||||
color: Colors.grey.withOpacity(0.3),
|
|
||||||
spreadRadius: 2,
|
|
||||||
blurRadius: 3,
|
|
||||||
offset: const Offset(1, 1), // changes position of shadow
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
validator: validator,
|
validator: validator,
|
||||||
controller: controller,
|
controller: controller,
|
||||||
style: const TextStyle(color: Colors.black),
|
style: const TextStyle(color: Colors.black),
|
||||||
decoration: textBoxDecoration()!.copyWith(
|
decoration: textBoxDecoration()!.copyWith(
|
||||||
errorStyle: const TextStyle(height: 0),
|
errorStyle: const TextStyle(height: 0),
|
||||||
hintStyle: context.textTheme.titleSmall!.copyWith(color: Colors.grey, fontSize: 12),
|
hintStyle: context.textTheme.titleSmall!
|
||||||
|
.copyWith(color: Colors.grey, fontSize: 12),
|
||||||
hintText: hintText ?? 'Please enter'),
|
hintText: hintText ?? 'Please enter'),
|
||||||
onFieldSubmitted: onSubmitted,
|
onFieldSubmitted: onSubmitted,
|
||||||
),
|
),
|
||||||
|
@ -57,12 +57,15 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
'Low Battery ($lowBatteryCount)',
|
'Low Battery ($lowBatteryCount)',
|
||||||
];
|
];
|
||||||
|
|
||||||
final buttonLabel = (selectedDevices.length > 1) ? 'Batch Control' : 'Control';
|
final buttonLabel =
|
||||||
|
(selectedDevices.length > 1) ? 'Batch Control' : 'Control';
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: isLargeScreenSize(context) ? const EdgeInsets.all(30) : const EdgeInsets.all(15),
|
padding: isLargeScreenSize(context)
|
||||||
|
? const EdgeInsets.all(30)
|
||||||
|
: const EdgeInsets.all(15),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@ -71,7 +74,9 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
tabs: tabs,
|
tabs: tabs,
|
||||||
selectedIndex: selectedIndex,
|
selectedIndex: selectedIndex,
|
||||||
onTabChanged: (index) {
|
onTabChanged: (index) {
|
||||||
context.read<DeviceManagementBloc>().add(SelectedFilterChanged(index));
|
context
|
||||||
|
.read<DeviceManagementBloc>()
|
||||||
|
.add(SelectedFilterChanged(index));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
@ -93,11 +98,14 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else if (selectedDevices.length > 1) {
|
} else if (selectedDevices.length > 1) {
|
||||||
final productTypes = selectedDevices.map((device) => device.productType).toSet();
|
final productTypes = selectedDevices
|
||||||
|
.map((device) => device.productType)
|
||||||
|
.toSet();
|
||||||
if (productTypes.length == 1) {
|
if (productTypes.length == 1) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => DeviceBatchControlDialog(
|
builder: (context) =>
|
||||||
|
DeviceBatchControlDialog(
|
||||||
devices: selectedDevices,
|
devices: selectedDevices,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -111,7 +119,9 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: isControlButtonEnabled ? Colors.white : Colors.grey,
|
color: isControlButtonEnabled
|
||||||
|
? Colors.white
|
||||||
|
: Colors.grey,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -122,13 +132,17 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: isLargeScreenSize(context) ? const EdgeInsets.all(30) : const EdgeInsets.all(15),
|
padding: isLargeScreenSize(context)
|
||||||
|
? const EdgeInsets.all(30)
|
||||||
|
: const EdgeInsets.all(15),
|
||||||
child: DynamicTable(
|
child: DynamicTable(
|
||||||
withSelectAll: true,
|
withSelectAll: true,
|
||||||
cellDecoration: containerDecoration,
|
cellDecoration: containerDecoration,
|
||||||
onRowSelected: (index, isSelected, row) {
|
onRowSelected: (index, isSelected, row) {
|
||||||
final selectedDevice = devicesToShow[index];
|
final selectedDevice = devicesToShow[index];
|
||||||
context.read<DeviceManagementBloc>().add(SelectDevice(selectedDevice));
|
context
|
||||||
|
.read<DeviceManagementBloc>()
|
||||||
|
.add(SelectDevice(selectedDevice));
|
||||||
},
|
},
|
||||||
withCheckBox: true,
|
withCheckBox: true,
|
||||||
size: MediaQuery.of(context).size,
|
size: MediaQuery.of(context).size,
|
||||||
@ -151,17 +165,26 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
device.uuid ?? '',
|
device.uuid ?? '',
|
||||||
device.unit?.name ?? '',
|
device.unit?.name ?? '',
|
||||||
device.room?.name ?? '',
|
device.room?.name ?? '',
|
||||||
device.batteryLevel != null ? '${device.batteryLevel}%' : '-',
|
device.batteryLevel != null
|
||||||
formatDateTime(DateTime.fromMillisecondsSinceEpoch((device.createTime ?? 0) * 1000)),
|
? '${device.batteryLevel}%'
|
||||||
|
: '-',
|
||||||
|
formatDateTime(DateTime.fromMillisecondsSinceEpoch(
|
||||||
|
(device.createTime ?? 0) * 1000)),
|
||||||
device.online == true ? 'Online' : 'Offline',
|
device.online == true ? 'Online' : 'Offline',
|
||||||
formatDateTime(DateTime.fromMillisecondsSinceEpoch((device.updateTime ?? 0) * 1000)),
|
formatDateTime(DateTime.fromMillisecondsSinceEpoch(
|
||||||
|
(device.updateTime ?? 0) * 1000)),
|
||||||
];
|
];
|
||||||
}).toList(),
|
}).toList(),
|
||||||
onSelectionChanged: (selectedRows) {
|
onSelectionChanged: (selectedRows) {
|
||||||
context.read<DeviceManagementBloc>().add(UpdateSelection(selectedRows));
|
context
|
||||||
|
.read<DeviceManagementBloc>()
|
||||||
|
.add(UpdateSelection(selectedRows));
|
||||||
},
|
},
|
||||||
initialSelectedIds:
|
initialSelectedIds: context
|
||||||
context.read<DeviceManagementBloc>().selectedDevices.map((device) => device.uuid!).toList(),
|
.read<DeviceManagementBloc>()
|
||||||
|
.selectedDevices
|
||||||
|
.map((device) => device.uuid!)
|
||||||
|
.toList(),
|
||||||
isEmpty: devicesToShow.isEmpty,
|
isEmpty: devicesToShow.isEmpty,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -4,6 +4,7 @@ import 'package:syncrow_web/pages/common/text_field/custom_text_field.dart';
|
|||||||
import 'package:syncrow_web/pages/device_managment/all_devices/bloc/device_managment_bloc.dart';
|
import 'package:syncrow_web/pages/device_managment/all_devices/bloc/device_managment_bloc.dart';
|
||||||
import 'package:syncrow_web/pages/common/buttons/search_reset_buttons.dart';
|
import 'package:syncrow_web/pages/common/buttons/search_reset_buttons.dart';
|
||||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||||
|
import 'package:syncrow_web/utils/style.dart';
|
||||||
|
|
||||||
class DeviceSearchFilters extends StatefulWidget {
|
class DeviceSearchFilters extends StatefulWidget {
|
||||||
const DeviceSearchFilters({super.key});
|
const DeviceSearchFilters({super.key});
|
||||||
@ -12,7 +13,8 @@ class DeviceSearchFilters extends StatefulWidget {
|
|||||||
State<DeviceSearchFilters> createState() => _DeviceSearchFiltersState();
|
State<DeviceSearchFilters> createState() => _DeviceSearchFiltersState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _DeviceSearchFiltersState extends State<DeviceSearchFilters> with HelperResponsiveLayout {
|
class _DeviceSearchFiltersState extends State<DeviceSearchFilters>
|
||||||
|
with HelperResponsiveLayout {
|
||||||
final TextEditingController communityController = TextEditingController();
|
final TextEditingController communityController = TextEditingController();
|
||||||
final TextEditingController unitNameController = TextEditingController();
|
final TextEditingController unitNameController = TextEditingController();
|
||||||
final TextEditingController productNameController = TextEditingController();
|
final TextEditingController productNameController = TextEditingController();
|
||||||
@ -34,7 +36,8 @@ class _DeviceSearchFiltersState extends State<DeviceSearchFilters> with HelperRe
|
|||||||
const SizedBox(width: 20),
|
const SizedBox(width: 20),
|
||||||
_buildSearchField("Unit Name", unitNameController, 200),
|
_buildSearchField("Unit Name", unitNameController, 200),
|
||||||
const SizedBox(width: 20),
|
const SizedBox(width: 20),
|
||||||
_buildSearchField("Device Name / Product Name", productNameController, 300),
|
_buildSearchField(
|
||||||
|
"Device Name / Product Name", productNameController, 300),
|
||||||
const SizedBox(width: 20),
|
const SizedBox(width: 20),
|
||||||
_buildSearchResetButtons(),
|
_buildSearchResetButtons(),
|
||||||
],
|
],
|
||||||
@ -59,19 +62,22 @@ class _DeviceSearchFiltersState extends State<DeviceSearchFilters> with HelperRe
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildSearchField(String title, TextEditingController controller, double width) {
|
Widget _buildSearchField(
|
||||||
return StatefulTextField(
|
String title, TextEditingController controller, double width) {
|
||||||
title: title,
|
return Container(
|
||||||
width: width,
|
child: StatefulTextField(
|
||||||
elevation: 2,
|
title: title,
|
||||||
controller: controller,
|
width: width,
|
||||||
onSubmitted: () {
|
elevation: 2,
|
||||||
context.read<DeviceManagementBloc>().add(SearchDevices(
|
controller: controller,
|
||||||
productName: productNameController.text,
|
onSubmitted: () {
|
||||||
unitName: unitNameController.text,
|
context.read<DeviceManagementBloc>().add(SearchDevices(
|
||||||
community: communityController.text,
|
productName: productNameController.text,
|
||||||
searchField: true));
|
unitName: unitNameController.text,
|
||||||
},
|
community: communityController.text,
|
||||||
|
searchField: true));
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,4 +42,4 @@ abstract class ColorsManager {
|
|||||||
static const Color textGreen = Color(0xFF008905);
|
static const Color textGreen = Color(0xFF008905);
|
||||||
static const Color yaGreen = Color(0xFFFFBF44);
|
static const Color yaGreen = Color(0xFFFFBF44);
|
||||||
}
|
}
|
||||||
//0036E6
|
//background: #999999;
|
||||||
|
@ -33,12 +33,11 @@ InputDecoration? textBoxDecoration({bool suffixIcon = false}) =>
|
|||||||
BoxDecoration containerDecoration = BoxDecoration(
|
BoxDecoration containerDecoration = BoxDecoration(
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.grey.withOpacity(0.5),
|
color: Colors.grey.withOpacity(0.3),
|
||||||
spreadRadius: 5,
|
spreadRadius: 2,
|
||||||
blurRadius: 8,
|
blurRadius: 4,
|
||||||
offset: const Offset(0, 3), // changes position of shadow
|
offset: const Offset(0, 5), // changes position of shadow
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
color: ColorsManager.boxColor,
|
color: ColorsManager.boxColor,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(10)));
|
borderRadius: const BorderRadius.all(Radius.circular(10)));
|
||||||
|
|
||||||
|
24
pubspec.lock
24
pubspec.lock
@ -292,18 +292,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.5"
|
version: "10.0.4"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_flutter_testing
|
name: leak_tracker_flutter_testing
|
||||||
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.5"
|
version: "3.0.3"
|
||||||
leak_tracker_testing:
|
leak_tracker_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -340,18 +340,18 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.11.1"
|
version: "0.8.0"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.12.0"
|
||||||
nested:
|
nested:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -561,10 +561,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.2"
|
version: "0.7.0"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -609,10 +609,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.2.5"
|
version: "14.2.1"
|
||||||
web:
|
web:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
Reference in New Issue
Block a user