You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.4 KiB

import 'package:flutter/material.dart';
3 years ago
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
3 years ago
import 'package:aku_community/const/resource.dart';
class DocViw extends StatelessWidget {
const DocViw({
Key? key,
required this.title,
required this.onPressed,
3 years ago
this.margin,
this.onLongPress,
}) : super(key: key);
final String title;
final VoidCallback onPressed;
final EdgeInsetsGeometry? margin;
final VoidCallback? onLongPress;
@override
Widget build(BuildContext context) {
// if (title?.isEmpty ?? true) return SizedBox();
return GestureDetector(
onLongPress: onLongPress,
child: Container(
margin: margin ?? EdgeInsets.only(right: 113.w),
alignment: Alignment.centerLeft,
child: MaterialButton(
minWidth: 606.w,
height: 154.w,
padding: EdgeInsets.symmetric(horizontal: 32.w),
child: Row(
children: [
title.text.size(32.sp).make().expand(),
Image.asset(
R.ASSETS_ICONS_FILE_PNG,
height: 52.w,
width: 52.w,
),
],
),
onPressed: onPressed,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.w),
side: BorderSide(color: Color(0xFFD4CFBE)),
),
color: Colors.white,
),
),
);
}
}