gascom/lib/widgets/fine_container.dart
Abdullah Salah 216efb8a83 first commit
2024-12-25 11:09:55 +03:00

97 lines
3.3 KiB
Dart

import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/material.dart';
import 'package:gascom/constants/app_theme.dart';
import 'package:gascom/screens/payment_screen.dart';
import 'package:gascom/screens/success_screen.dart';
import 'package:gascom/widgets/app_button.dart';
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
class FineContainer extends StatelessWidget {
const FineContainer({super.key});
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: AppTheme.textColor,
width: 1,
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: AutoSizeText(
"غرامة",
style: Theme.of(context).textTheme.bodySmall?.copyWith(
fontWeight: FontWeight.w600,
),
),
),
AutoSizeText(
"2024/12/12",
style: Theme.of(context).textTheme.bodySmall,
),
],
),
const SizedBox(height: 10),
AutoSizeText(
"200,000 د.ع",
style: Theme.of(context).textTheme.bodyLarge?.copyWith(
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 15),
const Divider(
color: AppTheme.textColor,
height: 1,
thickness: 1,
),
const SizedBox(height: 15),
AutoSizeText(
"مخالفة ساعات التشغيل والاطفاء",
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w600,
),
),
const SizedBox(height: 4),
AutoSizeText(
"يجب دفع الغرامة قبل تاريخ 01/09/2024 وبخلافه، لن يتم تزويدك باي حصة بعد هذا التاريخ",
style: Theme.of(context).textTheme.bodyMedium,
maxLines: 2,
),
const SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: MediaQuery.of(context).size.width * 0.45,
child: AppButton(
onPressed: () {
pushScreenWithoutNavBar(context,
PaymentScreen(
title: "غرامات",
onPaymentComplete: () {
pushScreenWithoutNavBar(context, const SuccessScreen(title: "تم دفع الغرامة بنجاح", subtitle: ""));
}
)
);
},
label: "دفع الغرامة",
isElevated: true,
),
),
],
)
],
),
);
}
}