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.
 
 
 
 
 
 

143 lines
4.4 KiB

import 'package:flutter/material.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/data/founder.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/item_title.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class FounderStore extends StatefulWidget {
final Founder founder;
FounderStore(this.founder);
@override
State<StatefulWidget> createState() {
return _FounderStore();
}
}
class _FounderStore extends State<FounderStore> {
@override
Widget build(BuildContext context) {
return Column(
children: [
ItemTitle(
text: S.of(context).chuangshirendegushi1,
imgPath: "assets/image/icon_founder.webp",
),
GestureDetector(
onTap: () {
Navigator.of(context)
.pushNamed('/router/founder_story_page');
},
child: founderStore(),
),
],
);
}
Widget founderStore() {
return Container(
margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 22.h, bottom: 28.h),
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(25),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Stack(
alignment: Alignment.bottomCenter,
clipBehavior: Clip.hardEdge,
children: [
MImage(
widget.founder.imgUrl ?? "",
aspectRatio: 2,
radius: BorderRadius.circular(4.w),
// fit: BoxFit.cover,
errorSrc: "assets/image/default_2_1.webp",
fadeSrc: "assets/image/default_2_1.webp",
),
Container(
padding: EdgeInsets.all(8.w),
decoration: BoxDecoration(
color: Colors.black.withAlpha(153),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(4.w),
bottomRight: Radius.circular(4.w),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Expanded(
child: Row(
children: [
Text(
S.of(context).chuangshirendegushi,
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
Text(
widget.founder.name ?? "",
style: TextStyle(
fontSize: 14.sp,
fontWeight: FontWeight.bold,
color: Colors.white,
),
),
],
),
flex: 1,
),
Row(
children: [
Text(
S.of(context).chakanxiangqing,
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
Icon(
Icons.keyboard_arrow_right,
size: 12,
color: Colors.white,
),
],
),
],
),
flex: 1,
),
],
),
),
],
),
);
}
}