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.

72 lines
1.9 KiB

// Flutter imports:
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// Package imports:
import 'package:flutter_icons/flutter_icons.dart';
// Project imports:
4 years ago
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/search_bar_delegate.dart';
class HomeSearch extends StatefulWidget {
HomeSearch({Key key}) : super(key: key);
@override
_HomeSearchState createState() => _HomeSearchState();
}
class _HomeSearchState extends State<HomeSearch> {
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [Color(0xffffd000), Color(0xffffbd00)],
),
),
padding: EdgeInsets.only(
top: 127.w + ScreenUtil().statusBarHeight,
4 years ago
left: 32.w,
right: 32.w,
bottom: 17.w,
),
child: InkWell(
onTap: () {
showSearch(context: context, delegate: SearchBarDelegate());
},
child: Container(
4 years ago
width: 686.w,
height: 72.w,
padding: EdgeInsets.only(
4 years ago
top: 16.w,
bottom: 16.w,
left: 24.w,
),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(36.w)),
),
child: Row(children: [
Icon(
AntDesign.search1,
color: Color(0xff999999),
4 years ago
size: 28.sp,
),
4 years ago
SizedBox(width: 16.w),
Text(
'搜索商品、活动、帖子、应用',
style: TextStyle(
4 years ago
fontSize: 28.sp,
color: Color(0xff999999),
),
)
]),
),
),
);
}
}