feat(order info): added order info screen

This commit is contained in:
Username1548
2025-04-04 20:21:31 +07:00
parent 9715f4cac9
commit 748484cf8f
387 changed files with 16171 additions and 18199 deletions

View File

@@ -47,9 +47,9 @@ class _MyPlanWidgetState extends State<MyPlanWidget> {
InkWell(
onTap: () => GoRouter.of(context).pushNamed('aboutPlanScreen', extra: {'plan': widget.plan, 'navigateToComments': false}),
child: ClipRRect(
borderRadius: BorderRadius.vertical(top: Radius.circular(12)),
borderRadius: const BorderRadius.vertical(top: Radius.circular(12)),
child: CachedNetworkImage(
imageUrl: baseUrl + '/storage/' + widget.plan.image,
imageUrl: '$baseUrl/storage/${widget.plan.image}',
fit: BoxFit.fitWidth,
width: MediaQuery.of(context).size.width,
),
@@ -69,7 +69,7 @@ class _MyPlanWidgetState extends State<MyPlanWidget> {
),
],
),
SizedBox(height: 12),
const SizedBox(height: 12),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -81,13 +81,13 @@ class _MyPlanWidgetState extends State<MyPlanWidget> {
),
),
if (widget.plan.details.isNotEmpty) ...[
SizedBox(
const SizedBox(
height: 12,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Html(
data: widget.plan.details.length > 200 ? widget.plan.details.substring(0, 200) + '...' : widget.plan.details,
data: widget.plan.details.length > 200 ? '${widget.plan.details.substring(0, 200)}...' : widget.plan.details,
style: {
"*": Style(
margin: Margins.zero,
@@ -101,15 +101,15 @@ class _MyPlanWidgetState extends State<MyPlanWidget> {
],
],
),
SizedBox(height: 16),
const SizedBox(height: 16),
Padding(
padding: EdgeInsets.only(left: 16),
padding: const EdgeInsets.only(left: 16),
child: Text(
'${widget.plan.packetsCount == 1 ? widget.plan.packet1Options?.price : '${s.from} ${widget.plan.minPriceOfOptions.toStringAsFixed(0)}'}₽',
style: TextStyles.headingXLSemibold.copyWith(color: appTheme.greenA700),
),
),
SizedBox(height: 20),
const SizedBox(height: 20),
BlocBuilder<MyPlansCubit, MyPlansState>(
builder: (context, state) {
return Padding(
@@ -129,18 +129,18 @@ class _MyPlanWidgetState extends State<MyPlanWidget> {
buttonStyle: ButtonStyle(
shape: WidgetStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.circular(20))),
backgroundColor: WidgetStatePropertyAll(appTheme.blueA400),
side: WidgetStatePropertyAll(BorderSide.none),
side: const WidgetStatePropertyAll(BorderSide.none),
),
),
),
if (state.selectedStateIndex == 0) ...[
SizedBox(width: 6),
const SizedBox(width: 6),
CustomOutlinedButton(
onPressed: () async {
final box = context.findRenderObject() as RenderBox?;
await Share.shareUri(
Uri.parse(
baseUrl + '/ru/plan/' + widget.plan.id.toString(),
'$baseUrl/ru/plan/${widget.plan.id}',
),
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
);
@@ -157,14 +157,14 @@ class _MyPlanWidgetState extends State<MyPlanWidget> {
buttonStyle: ButtonStyle(
shape: WidgetStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.circular(20))),
backgroundColor: WidgetStatePropertyAll(appTheme.blueA400),
side: WidgetStatePropertyAll(BorderSide.none),
side: const WidgetStatePropertyAll(BorderSide.none),
),
text: '',
),
],
],
),
SizedBox(height: 8),
const SizedBox(height: 8),
Row(
children: [
Expanded(
@@ -178,36 +178,37 @@ class _MyPlanWidgetState extends State<MyPlanWidget> {
buttonStyle: ButtonStyle(
shape: WidgetStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.circular(20))),
backgroundColor: WidgetStatePropertyAll(appTheme.lightGray0),
side: WidgetStatePropertyAll(BorderSide.none),
side: const WidgetStatePropertyAll(BorderSide.none),
),
),
),
SizedBox(width: 6),
const SizedBox(width: 6),
CustomOutlinedButton(
onPressed: () async {
final result = await context.read<MyPlansCubit>().deletePlan(widget.plan.slug);
if (result)
Future.delayed(Duration(seconds: 3), () {
if (result) {
Future.delayed(const Duration(seconds: 3), () {
if (!context.mounted) return;
showBottomSheetWithBlur(
context: context,
child: Column(
children: [
SizedBox(
const SizedBox(
height: 20,
),
BottomSheetHandlerBar(),
SizedBox(
const BottomSheetHandlerBar(),
const SizedBox(
height: 20,
),
Text(
'${widget.plan.name}',
widget.plan.name,
style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black),
),
Text(
s.deleted,
style: TextStyles.headingXLSemibold.copyWith(color: appTheme.black),
),
SizedBox(
const SizedBox(
height: 20,
),
Padding(
@@ -220,18 +221,19 @@ class _MyPlanWidgetState extends State<MyPlanWidget> {
height: 52,
buttonTextStyle: TextStyles.textSSemibold.copyWith(color: appTheme.whiteA700),
buttonStyle: ButtonStyle(
side: WidgetStatePropertyAll(BorderSide.none),
side: const WidgetStatePropertyAll(BorderSide.none),
backgroundColor: WidgetStatePropertyAll(appTheme.blueA400),
),
),
),
SizedBox(
const SizedBox(
height: 20,
),
],
),
);
});
}
},
height: 52,
width: 52,
@@ -244,13 +246,13 @@ class _MyPlanWidgetState extends State<MyPlanWidget> {
buttonStyle: ButtonStyle(
shape: WidgetStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.circular(20))),
backgroundColor: WidgetStatePropertyAll(appTheme.lightGray0),
side: WidgetStatePropertyAll(BorderSide.none),
side: const WidgetStatePropertyAll(BorderSide.none),
),
text: '',
),
],
),
SizedBox(height: 8),
const SizedBox(height: 8),
],
),
);