|
|
|
@ -1,11 +1,9 @@
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/material.dart'; |
|
|
|
|
import 'package:huixiang/retrofit/data/activity.dart'; |
|
|
|
|
import 'package:huixiang/retrofit/data/article.dart'; |
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart'; |
|
|
|
|
|
|
|
|
|
class WebHeader extends StatefulWidget { |
|
|
|
|
|
|
|
|
|
final Map arguments; |
|
|
|
|
final Activity activity; |
|
|
|
|
final Article article; |
|
|
|
@ -17,7 +15,6 @@ class WebHeader extends StatefulWidget {
|
|
|
|
|
State<StatefulWidget> createState() { |
|
|
|
|
return _WebHeader(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class _WebHeader extends State<WebHeader> { |
|
|
|
@ -26,7 +23,7 @@ class _WebHeader extends State<WebHeader> {
|
|
|
|
|
return Column( |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
color: Color(0xFFF7F7F7), |
|
|
|
|
color: Color(0xFFFFFFFF), |
|
|
|
|
padding: EdgeInsets.all(12), |
|
|
|
|
alignment: Alignment.centerLeft, |
|
|
|
|
child: Text( |
|
|
|
@ -43,12 +40,15 @@ class _WebHeader extends State<WebHeader> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
color: Color(0xFFFFFFFF), |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12.w), |
|
|
|
|
child: Row( |
|
|
|
|
children: [ |
|
|
|
|
InkWell( |
|
|
|
|
child: Text( |
|
|
|
|
"${widget.activity != null ? (widget.activity.storeName ?? "") : (widget.article != null && widget.article.author != null) ? (widget.article.author.name ?? "") : ""}", |
|
|
|
|
"${widget.activity != null ? (widget.activity.storeName ?? "") |
|
|
|
|
: (widget.article != null && widget.article.author != null) |
|
|
|
|
? (widget.article.author.name ?? "") : ""}", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: FontWeight.normal, |
|
|
|
|
fontSize: widget.fontSize - 2, |
|
|
|
@ -58,17 +58,16 @@ class _WebHeader extends State<WebHeader> {
|
|
|
|
|
onTap: () { |
|
|
|
|
if (widget.activity != null) { |
|
|
|
|
if (widget.arguments["source"] != null && |
|
|
|
|
widget.arguments["source"] == |
|
|
|
|
widget.activity.storeId) { |
|
|
|
|
widget.arguments["source"] == widget.activity.storeId) { |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
} else { |
|
|
|
|
Navigator.of(context).pushNamed( |
|
|
|
|
'/router/union_detail_page', |
|
|
|
|
arguments: { |
|
|
|
|
"id": widget.activity.storeId, |
|
|
|
|
"source": |
|
|
|
|
widget.arguments["activityId"] |
|
|
|
|
}); |
|
|
|
|
"source": widget.arguments["activityId"] |
|
|
|
|
}, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -94,8 +93,4 @@ class _WebHeader extends State<WebHeader> {
|
|
|
|
|
], |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|