Skip to content

Commit

Permalink
[fea]信箱从搜索框里挪出来
Browse files Browse the repository at this point in the history
  • Loading branch information
hxphieno committed Sep 2, 2024
1 parent 134bffa commit 5c0aac9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
15 changes: 11 additions & 4 deletions lib/feedback/view/lake_home_page/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import '../../../commons/widgets/w_button.dart';
import '../../../home/view/web_views/festival_page.dart';
import '../../../message/model/message_provider.dart';
import 'package:badges/badges.dart' as badges;

class FeedbackHomePage extends StatefulWidget {
FeedbackHomePage({Key? key}) : super(key: key);

Expand Down Expand Up @@ -172,14 +173,15 @@ class FeedbackHomePageState extends State<FeedbackHomePage>
Widget w1 = Icon(
Icons.mail_outline,
color: WpyTheme.of(context).get(WpyColorKey.infoTextColor),
size: 19,
size: 25.r,
);

Widget notifyButton = WButton(
onPressed: (){
Navigator.pushNamed(context, FeedbackRouter.mailbox);
},
child: Container(
margin:EdgeInsets.only(top: 8.h) ,
child: count == 0
? w1
: badges.Badge(
Expand All @@ -197,7 +199,7 @@ class FeedbackHomePageState extends State<FeedbackHomePage>
onPressed: () => Navigator.pushNamed(context, FeedbackRouter.search),
child: Container(
height: searchBarHeight - 8.h,
margin: EdgeInsets.fromLTRB(15.h, 8.h, 15.h, 0),
margin: EdgeInsets.fromLTRB(15.h, 8.h, 10.h, 0),
decoration: BoxDecoration(
color:
WpyTheme.of(context).get(WpyColorKey.secondaryBackgroundColor),
Expand Down Expand Up @@ -240,7 +242,6 @@ class FeedbackHomePageState extends State<FeedbackHomePage>
],
)),
Spacer(),
notifyButton,
SizedBox(width: 14.h),
]),
),
Expand Down Expand Up @@ -435,7 +436,13 @@ class FeedbackHomePageState extends State<FeedbackHomePage>
duration: Duration(milliseconds: 500),
curve: Curves.easeOutCirc,
child: Column(children: [
searchBar,
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(width: 0.9.sw, child: searchBar),
notifyButton
],
),
SizedBox(
height: tabBarHeight,
child: Row(
Expand Down
28 changes: 15 additions & 13 deletions lib/feedback/view/search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,19 +232,21 @@ class _SearchPageState extends State<SearchPage> {
padding: EdgeInsets.symmetric(horizontal: 10),
);

return ColoredBox(
color: WpyTheme.of(context).get(WpyColorKey.primaryBackgroundColor),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
topView,
Expanded(
child: ColoredBox(
color: WpyTheme.of(context)
.get(WpyColorKey.secondaryBackgroundColor),
child: searchHistory)),
],
));
return Scaffold(
body: ColoredBox(
color: WpyTheme.of(context).get(WpyColorKey.primaryBackgroundColor),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
topView,
Expanded(
child: ColoredBox(
color: WpyTheme.of(context)
.get(WpyColorKey.secondaryBackgroundColor),
child: searchHistory)),
],
)),
);
}

showClearDialog() {
Expand Down

0 comments on commit 5c0aac9

Please sign in to comment.