You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudsolutions-atoms/lib/modules/asset_delivery_module/pages/change_status_bottomsheet.dart

70 lines
2.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:test_sa/extensions/int_extensions.dart';
import 'package:test_sa/extensions/string_extensions.dart';
import 'package:test_sa/extensions/widget_extensions.dart';
import 'package:test_sa/new_views/app_style/app_color.dart';
import 'package:test_sa/new_views/common_widgets/app_filled_button.dart';
class AssetDeliveryBottomSheet {
static buildBottomSheetParent({required BuildContext context, required Widget childWidget, bool? isDismissible}) {
return showModalBottomSheet(
context: context,
useSafeArea: true,
isScrollControlled: true,
isDismissible: isDismissible ?? true,
backgroundColor: Colors.transparent,
builder: (context) => SingleChildScrollView(
child: SafeArea(child: childWidget),
).bottomSheetContainer(context),
);
}
static Future changeStatusBottomSheet({required BuildContext context, required VoidCallback cancelStatusTap, required VoidCallback statusChangeTap}) {
return buildBottomSheetParent(
context: context,
childWidget: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
const SizedBox().indicatorWidget(),
8.height,
Align(
alignment: AlignmentDirectional.centerStart,
child: Text(
'Change Status'.addTranslation,
style: TextStyle(
fontSize: 21.toScreenWidth,
fontWeight: FontWeight.w500,
fontStyle: FontStyle.normal,
decoration: TextDecoration.none,
),
),
),
16.height,
Row(
children: [
AppFilledButton(
label: 'Cancel'.addTranslation,
maxWidth: true,
buttonColor: Colors.white,
// textColor: context.isDark ? AppColor.neutral30 : Colors.white,
textColor: AppColor.red30,
showBorder: true,
onPressed: () async {
cancelStatusTap();
},
).expanded,
12.width,
AppFilledButton(
buttonColor: AppColor.green70,
label: 'Change Status'.addTranslation,
maxWidth: true,
onPressed: () {
statusChangeTap();
}).expanded,
],
),
],
));
}
}