|
|
|
|
@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
|
|
|
|
|
|
|
|
|
void showMyBottomSheet(BuildContext context, {required Widget child, required VoidCallback callBackFunc, String? type}) {
|
|
|
|
|
@ -65,14 +66,7 @@ void showMyBottomSheet(BuildContext context, {required Widget child, required Vo
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
title ?? "Details",
|
|
|
|
|
style: const TextStyle(
|
|
|
|
|
color: Color(0xff2BB8A6),
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
(title ?? "Details").toText14(isBold: true, color: Color(0xff2BB8A6)),
|
|
|
|
|
IconButton(
|
|
|
|
|
icon: const Icon(Icons.close, color: Colors.black54, size: 20),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
@ -83,20 +77,12 @@ void showMyBottomSheet(BuildContext context, {required Widget child, required Vo
|
|
|
|
|
),
|
|
|
|
|
const Divider(height: 1, color: Colors.grey),
|
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
|
|
|
|
|
|
// ---- Scrollable Content ----
|
|
|
|
|
Expanded(
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Text(
|
|
|
|
|
(val?.isEmpty ?? true)
|
|
|
|
|
? "--"
|
|
|
|
|
: val.toString(),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: MyColors.normalTextColor,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
height: 1.4,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: ((val?.isEmpty ?? true)
|
|
|
|
|
? "--"
|
|
|
|
|
: val.toString()).toText14(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
@ -112,7 +98,7 @@ void showMyBottomSheet(BuildContext context, {required Widget child, required Vo
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
child: Text(
|
|
|
|
|
LocaleKeys.close.tr(),
|
|
|
|
|
style: const TextStyle(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|