reduced snaxkbar time
This commit is contained in:
parent
7fb5a5217a
commit
26611d3650
@ -38,7 +38,7 @@ void showAppSnackbar({
|
|||||||
snackPosition: SnackPosition.BOTTOM,
|
snackPosition: SnackPosition.BOTTOM,
|
||||||
margin: const EdgeInsets.all(16),
|
margin: const EdgeInsets.all(16),
|
||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
duration: const Duration(minutes: 1),
|
duration: const Duration(seconds: 5),
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
iconData,
|
iconData,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
@ -194,8 +194,11 @@ class _DocumentUploadBottomSheetState extends State<DocumentUploadBottomSheet> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final sheetTitle = widget.isEmployee
|
||||||
|
? "Upload Employee Document"
|
||||||
|
: "Upload Project Document";
|
||||||
return BaseBottomSheet(
|
return BaseBottomSheet(
|
||||||
title: "Upload Document",
|
title: sheetTitle,
|
||||||
onCancel: () => Navigator.pop(context),
|
onCancel: () => Navigator.pop(context),
|
||||||
onSubmit: _handleSubmit,
|
onSubmit: _handleSubmit,
|
||||||
child: Form(
|
child: Form(
|
||||||
|
@ -2,6 +2,7 @@ import 'dart:convert';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:marco/helpers/services/api_endpoints.dart';
|
import 'package:marco/helpers/services/api_endpoints.dart';
|
||||||
|
import 'package:marco/helpers/services/storage/local_storage.dart';
|
||||||
import 'package:marco/helpers/utils/mixins/ui_mixin.dart';
|
import 'package:marco/helpers/utils/mixins/ui_mixin.dart';
|
||||||
import 'package:marco/helpers/widgets/my_text.dart';
|
import 'package:marco/helpers/widgets/my_text.dart';
|
||||||
import 'package:marco/images.dart';
|
import 'package:marco/images.dart';
|
||||||
@ -205,31 +206,35 @@ class TenantCardList extends StatelessWidget {
|
|||||||
return const Center(child: CircularProgressIndicator(strokeWidth: 2));
|
return const Center(child: CircularProgressIndicator(strokeWidth: 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (controller.tenants.isEmpty) {
|
final hasTenants = controller.tenants.isNotEmpty;
|
||||||
return Center(
|
|
||||||
child: MyText(
|
|
||||||
"No dashboards available for your account.",
|
|
||||||
fontSize: 14,
|
|
||||||
color: Colors.black54,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
...controller.tenants.map(
|
if (!hasTenants) ...[
|
||||||
|
MyText(
|
||||||
|
"No dashboards available for your account.",
|
||||||
|
fontSize: 14,
|
||||||
|
color: Colors.black54,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
],
|
||||||
|
|
||||||
|
if (hasTenants) ...controller.tenants.map(
|
||||||
(tenant) => _TenantCard(
|
(tenant) => _TenantCard(
|
||||||
tenant: tenant,
|
tenant: tenant,
|
||||||
onTap: () => onTenantSelected(tenant.id),
|
onTap: () => onTenantSelected(tenant.id),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
|
|
||||||
TextButton.icon(
|
TextButton.icon(
|
||||||
onPressed: () => Get.back(),
|
onPressed: () async {
|
||||||
icon:
|
await LocalStorage.logout();
|
||||||
const Icon(Icons.arrow_back, size: 20, color: Colors.redAccent),
|
},
|
||||||
|
icon: const Icon(Icons.arrow_back, size: 20, color: Colors.redAccent),
|
||||||
label: MyText(
|
label: MyText(
|
||||||
'Back to Login',
|
'Back to Login',
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
@ -360,8 +365,8 @@ class _WavePainter extends CustomPainter {
|
|||||||
|
|
||||||
final path1 = Path()
|
final path1 = Path()
|
||||||
..moveTo(0, size.height * 0.2)
|
..moveTo(0, size.height * 0.2)
|
||||||
..quadraticBezierTo(size.width * 0.25, size.height * 0.05,
|
..quadraticBezierTo(
|
||||||
size.width * 0.5, size.height * 0.15)
|
size.width * 0.25, size.height * 0.05, size.width * 0.5, size.height * 0.15)
|
||||||
..quadraticBezierTo(
|
..quadraticBezierTo(
|
||||||
size.width * 0.75, size.height * 0.25, size.width, size.height * 0.1)
|
size.width * 0.75, size.height * 0.25, size.width, size.height * 0.1)
|
||||||
..lineTo(size.width, 0)
|
..lineTo(size.width, 0)
|
||||||
@ -372,8 +377,7 @@ class _WavePainter extends CustomPainter {
|
|||||||
final paint2 = Paint()..color = Colors.redAccent.withOpacity(0.15);
|
final paint2 = Paint()..color = Colors.redAccent.withOpacity(0.15);
|
||||||
final path2 = Path()
|
final path2 = Path()
|
||||||
..moveTo(0, size.height * 0.25)
|
..moveTo(0, size.height * 0.25)
|
||||||
..quadraticBezierTo(
|
..quadraticBezierTo(size.width * 0.4, size.height * 0.1, size.width, size.height * 0.2)
|
||||||
size.width * 0.4, size.height * 0.1, size.width, size.height * 0.2)
|
|
||||||
..lineTo(size.width, 0)
|
..lineTo(size.width, 0)
|
||||||
..lineTo(0, 0)
|
..lineTo(0, 0)
|
||||||
..close();
|
..close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user