|
|
|
|
@ -5,6 +5,11 @@ import 'package:test_sa/controllers/localization/localization.dart';
|
|
|
|
|
import 'package:test_sa/controllers/providers/api/service_requests_provider.dart';
|
|
|
|
|
import 'package:test_sa/controllers/providers/api/user_provider.dart';
|
|
|
|
|
import 'package:test_sa/controllers/providers/settings/setting_provider.dart';
|
|
|
|
|
import 'package:test_sa/extensions/context_extension.dart';
|
|
|
|
|
import 'package:test_sa/extensions/int_extensions.dart';
|
|
|
|
|
import 'package:test_sa/extensions/text_extensions.dart';
|
|
|
|
|
import 'package:test_sa/extensions/widget_extensions.dart';
|
|
|
|
|
import 'package:test_sa/models/enums/translation_keys.dart';
|
|
|
|
|
import 'package:test_sa/models/enums/user_types.dart';
|
|
|
|
|
import 'package:test_sa/models/service_request/service_request.dart';
|
|
|
|
|
import 'package:test_sa/models/subtitle.dart';
|
|
|
|
|
@ -31,7 +36,57 @@ class ServiceRequestItem extends StatelessWidget {
|
|
|
|
|
Color itemColor = index % 2 == 0 ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.onPrimary;
|
|
|
|
|
Color onItemColor = index % 2 != 0 ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.onPrimary;
|
|
|
|
|
|
|
|
|
|
return Padding(
|
|
|
|
|
return index % 2 == 0
|
|
|
|
|
? Container(
|
|
|
|
|
decoration: ShapeDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(20),
|
|
|
|
|
),
|
|
|
|
|
shadows: const [BoxShadow(color: Color(0x07000000), blurRadius: 14, offset: Offset(0, 0), spreadRadius: 0)],
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 10),
|
|
|
|
|
decoration: ShapeDecoration(
|
|
|
|
|
color: const Color(0xFFFFDBDC),
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(50),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Text('HIGH PRIORITY', style: AppTextStyles.overline.copyWith(color: const Color(0xFF8C0409))),
|
|
|
|
|
),
|
|
|
|
|
8.width,
|
|
|
|
|
Container(
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 10),
|
|
|
|
|
decoration: ShapeDecoration(
|
|
|
|
|
color: const Color(0xFFFFEDBC),
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(50),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Text('IN PROGRESS', style: AppTextStyles.overline.copyWith(color: const Color(0xFF886300))),
|
|
|
|
|
),
|
|
|
|
|
1.width.expanded,
|
|
|
|
|
Text('05 Dec, 2022\n09:30 AM', textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: const Color(0xFF3B3D4A))),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
Text(context.translate(TranslationKeys.serviceRequest), style: AppTextStyles.heading5.copyWith(color: const Color(0xFF3B3D4A))),
|
|
|
|
|
],
|
|
|
|
|
).paddingAll(16),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(vertical: 4),
|
|
|
|
|
child: ElevatedButton(
|
|
|
|
|
style: ElevatedButton.styleFrom(
|
|
|
|
|
|