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