feat: Initialize project
This commit is contained in:
56
lib/ui/bottom_sheets/notice/notice_sheet.dart
Normal file
56
lib/ui/bottom_sheets/notice/notice_sheet.dart
Normal file
@@ -0,0 +1,56 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:bahla_front/ui/common/app_colors.dart';
|
||||
import 'package:bahla_front/ui/common/ui_helpers.dart';
|
||||
import 'package:stacked/stacked.dart';
|
||||
import 'package:stacked_services/stacked_services.dart';
|
||||
|
||||
import 'notice_sheet_model.dart';
|
||||
|
||||
class NoticeSheet extends StackedView<NoticeSheetModel> {
|
||||
final Function(SheetResponse)? completer;
|
||||
final SheetRequest request;
|
||||
const NoticeSheet({
|
||||
Key? key,
|
||||
required this.completer,
|
||||
required this.request,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget builder(
|
||||
BuildContext context,
|
||||
NoticeSheetModel viewModel,
|
||||
Widget? child,
|
||||
) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(10),
|
||||
topRight: Radius.circular(10),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
request.title!,
|
||||
style: const TextStyle(fontSize: 25, fontWeight: FontWeight.w900),
|
||||
),
|
||||
verticalSpaceTiny,
|
||||
Text(
|
||||
request.description!,
|
||||
style: const TextStyle(fontSize: 14, color: kcMediumGrey),
|
||||
maxLines: 3,
|
||||
softWrap: true,
|
||||
),
|
||||
verticalSpaceLarge,
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
NoticeSheetModel viewModelBuilder(BuildContext context) => NoticeSheetModel();
|
||||
}
|
||||
3
lib/ui/bottom_sheets/notice/notice_sheet_model.dart
Normal file
3
lib/ui/bottom_sheets/notice/notice_sheet_model.dart
Normal file
@@ -0,0 +1,3 @@
|
||||
import 'package:stacked/stacked.dart';
|
||||
|
||||
class NoticeSheetModel extends BaseViewModel {}
|
||||
Reference in New Issue
Block a user