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.
113 lines
3.6 KiB
113 lines
3.6 KiB
|
|
import 'package:flutter/material.dart'; |
|
import 'package:flutter_html/flutter_html.dart'; |
|
import 'package:flutter_html/image_render.dart'; |
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
import 'package:huixiang/view_widget/custom_image.dart'; |
|
import 'package:huixiang/view_widget/my_appbar.dart'; |
|
|
|
class StoreDetailsPage extends StatefulWidget { |
|
final Map<String, dynamic> arguments; |
|
|
|
StoreDetailsPage({this.arguments}); |
|
|
|
@override |
|
State<StatefulWidget> createState() { |
|
return _StoreDetailsPage(); |
|
} |
|
} |
|
|
|
class _StoreDetailsPage extends State<StoreDetailsPage> { |
|
|
|
@override |
|
Widget build(BuildContext context) { |
|
return Scaffold( |
|
appBar: MyAppBar( |
|
action: Container( |
|
margin: EdgeInsets.only(right: 15), |
|
child: GestureDetector( |
|
onTap: () {}, |
|
child: Icon( |
|
Icons.share, |
|
size: 24, |
|
color: Colors.black, |
|
), |
|
), |
|
), |
|
background: Color(0xFFF7F7F7), |
|
leadingColor: Colors.black, |
|
title: widget.arguments["title"], |
|
titleSize: 18.sp, |
|
titleColor: Colors.black, |
|
), |
|
body: Container( |
|
child: SingleChildScrollView( |
|
physics: BouncingScrollPhysics(), |
|
child: Column( |
|
children: [ |
|
Container( |
|
padding: EdgeInsets.all(12), |
|
alignment: Alignment.centerLeft, |
|
child: Text( |
|
widget.arguments["title"], |
|
style: TextStyle( |
|
fontSize: 16, |
|
fontWeight: FontWeight.bold, |
|
color: Color(0xFF353535), |
|
), |
|
), |
|
), |
|
Container( |
|
padding: EdgeInsets.symmetric(horizontal: 12), |
|
child: Row( |
|
children: [ |
|
InkWell( |
|
child: Text( |
|
"${widget.arguments["author"]}", |
|
style: TextStyle( |
|
fontWeight: FontWeight.normal, |
|
fontSize: 14.sp, |
|
color: Colors.blue, |
|
), |
|
), |
|
onTap: () { |
|
if(widget.arguments.containsKey("storeId")) { |
|
Navigator.of(context).pushNamed('/router/union_detail_page', |
|
arguments: {"id": widget.arguments["storeId"]}); |
|
} |
|
}, |
|
), |
|
SizedBox( |
|
width: 10, |
|
), |
|
Text( |
|
widget.arguments["time"], |
|
style: TextStyle( |
|
fontWeight: FontWeight.normal, |
|
fontSize: 12.sp, |
|
color: Colors.grey, |
|
), |
|
) |
|
], |
|
), |
|
), |
|
Html( |
|
data: widget.arguments['html'], |
|
customImageRenders: { |
|
base64DataUriMatcher(): base64ImageRender(), |
|
assetUriMatcher(): assetImageRender(), |
|
networkSourceMatcher(extension: "svg"): svgNetworkImageRender(), |
|
networkSourceMatcher(): networkImageRender( |
|
loadingWidget: () { |
|
return Image.asset("assets/image/default_1.png",); |
|
} |
|
), |
|
}, |
|
), |
|
], |
|
), |
|
), |
|
), |
|
); |
|
} |
|
}
|
|
|