parent
03475e036a
commit
7c47f0a628
@ -1,94 +0,0 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:akuCommunity/utils/headers.dart';
|
|
||||||
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
|
|
||||||
|
|
||||||
// import 'package:flutter_swiper/flutter_swiper.dart';
|
|
||||||
|
|
||||||
|
|
||||||
//TODO CLEAN BOTTOM CODES.
|
|
||||||
@Deprecated("sh*t home_swiper need to be cleaned.")
|
|
||||||
class HomeSwiper extends StatefulWidget {
|
|
||||||
HomeSwiper({Key key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
_HomeSwiperState createState() => _HomeSwiperState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _HomeSwiperState extends State<HomeSwiper> {
|
|
||||||
List<String> imageList = [
|
|
||||||
'https://img.zcool.cn/community/0105a75f7298a211013e45848411c8.jpg',
|
|
||||||
'https://img.zcool.cn/community/018c135f73e06711013e4584f1f2fd.jpg',
|
|
||||||
'https://img.zcool.cn/community/01e08257de03a10000018c1b55623d.jpg@1280w_1l_2o_100sh.jpg'
|
|
||||||
];
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Stack(
|
|
||||||
overflow: Overflow.visible,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
height: 181.w,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
gradient: LinearGradient(
|
|
||||||
begin: Alignment.centerLeft,
|
|
||||||
end: Alignment.centerRight,
|
|
||||||
colors: [Color(0xffffd000), Color(0xffffbd00)],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// Positioned(
|
|
||||||
// top: 17.w,
|
|
||||||
// left: 0,
|
|
||||||
// right: 0,
|
|
||||||
// bottom: -76.w,
|
|
||||||
// child: Swiper(
|
|
||||||
// itemBuilder: (BuildContext context, int index) {
|
|
||||||
// return Container(
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// color: Colors.white,
|
|
||||||
// boxShadow: [
|
|
||||||
// BoxShadow(
|
|
||||||
// color: Colors.grey.withOpacity(0.2),
|
|
||||||
// offset: Offset(1.1, 1.1),
|
|
||||||
// blurRadius: 10.0),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// child: CachedImageWrapper(
|
|
||||||
// url: imageList[index],
|
|
||||||
// height: 240.w,
|
|
||||||
// width: 686.w,
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// itemCount: 3,
|
|
||||||
// scrollDirection: Axis.horizontal,
|
|
||||||
// viewportFraction: 0.8,
|
|
||||||
// scale: 0.9,
|
|
||||||
// autoplay: true,
|
|
||||||
// duration: 600,
|
|
||||||
// onTap: (index) {
|
|
||||||
// debugPrint("点击了第:$index个");
|
|
||||||
// },
|
|
||||||
// controller: SwiperController(),
|
|
||||||
// pagination: SwiperPagination(
|
|
||||||
// // 分页指示器
|
|
||||||
// alignment:
|
|
||||||
// Alignment.bottomCenter, // 位置 Alignment.bottomCenter 底部中间
|
|
||||||
// margin: const EdgeInsets.fromLTRB(0, 0, 0, 5), // 距离调整
|
|
||||||
// builder: DotSwiperPaginationBuilder(
|
|
||||||
// activeColor: Color(0xffFEC200),
|
|
||||||
// color: Colors.white,
|
|
||||||
// size: 15.w,
|
|
||||||
// activeSize: 20.w,
|
|
||||||
// space: 10.w,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// autoplayDelay: 5000,
|
|
||||||
// autoplayDisableOnInteraction: true,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,309 +0,0 @@
|
|||||||
import 'dart:ui';
|
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
|
|
||||||
import 'package:akuCommunity/base/base_style.dart';
|
|
||||||
import 'package:akuCommunity/utils/headers.dart';
|
|
||||||
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
|
|
||||||
|
|
||||||
// import 'package:sliding_up_panel/sliding_up_panel.dart';
|
|
||||||
|
|
||||||
|
|
||||||
class LookLogisticsPage extends StatefulWidget {
|
|
||||||
LookLogisticsPage({Key key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
_LookLogisticsPageState createState() => _LookLogisticsPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _LookLogisticsPageState extends State<LookLogisticsPage> {
|
|
||||||
double _panelHeightOpen;
|
|
||||||
double _panelHeightClosed = 95.0;
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
_panelHeightOpen = MediaQuery.of(context).size.height * .85;
|
|
||||||
double _statusHeight = MediaQuery.of(context).padding.top;
|
|
||||||
return Scaffold(
|
|
||||||
body: Stack(
|
|
||||||
alignment: Alignment.topCenter,
|
|
||||||
children: <Widget>[
|
|
||||||
_body(),
|
|
||||||
// SlidingUpPanel(
|
|
||||||
// margin: EdgeInsets.symmetric(horizontal: 32.w),
|
|
||||||
// maxHeight: _panelHeightOpen,
|
|
||||||
// minHeight: _panelHeightClosed,
|
|
||||||
// parallaxEnabled: true,
|
|
||||||
// parallaxOffset: .5,
|
|
||||||
// // body: _body(),
|
|
||||||
// panelBuilder: (sc) => _panel(sc),
|
|
||||||
// borderRadius: BorderRadius.only(
|
|
||||||
// topLeft: Radius.circular(8.0),
|
|
||||||
// topRight: Radius.circular(8.0),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
Positioned(
|
|
||||||
top: 32.w + _statusHeight,
|
|
||||||
child: Container(
|
|
||||||
width: 686.w,
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(6),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
child: IconButton(
|
|
||||||
padding: EdgeInsets.all(0),
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
icon: Icon(AntDesign.left, size: 40.sp),
|
|
||||||
onPressed: () {
|
|
||||||
Get.back();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
child: ClipRRect(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(8)),
|
|
||||||
child: CachedImageWrapper(
|
|
||||||
url:
|
|
||||||
'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00412-2241.jpg',
|
|
||||||
width: 72.w,
|
|
||||||
height: 72.w,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(left: 20.w),
|
|
||||||
child: Text(
|
|
||||||
'已签收',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: BaseStyle.fontSize28,
|
|
||||||
color: ktextPrimary),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
width: 1.w,
|
|
||||||
height: 50.w,
|
|
||||||
child: DecoratedBox(
|
|
||||||
decoration:
|
|
||||||
BoxDecoration(color: BaseStyle.color999999),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
InkWell(
|
|
||||||
onTap: () {},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(left: 20.w),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Icon(
|
|
||||||
Feather.alert_circle,
|
|
||||||
color: ktextPrimary,
|
|
||||||
size: BaseStyle.fontSize28,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 8.w),
|
|
||||||
child: Text(
|
|
||||||
'物流投诉',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: BaseStyle.fontSize22,
|
|
||||||
color: ktextPrimary),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _panel(ScrollController sc) {
|
|
||||||
return MediaQuery.removePadding(
|
|
||||||
context: context,
|
|
||||||
removeTop: true,
|
|
||||||
child: ListView(
|
|
||||||
controller: sc,
|
|
||||||
children: <Widget>[
|
|
||||||
Container(
|
|
||||||
height: 40.w,
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xfff0f0f0),
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(8.0),
|
|
||||||
topRight: Radius.circular(8.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
'中通快递 3072035702394120',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: BaseStyle.fontSize22, color: ktextPrimary),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 18.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: <Widget>[
|
|
||||||
Text(
|
|
||||||
"Explore Pittsburgh",
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.normal,
|
|
||||||
fontSize: 24.0,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 36.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
||||||
children: <Widget>[
|
|
||||||
_button("Popular", Icons.favorite, Colors.blue),
|
|
||||||
_button("Food", Icons.restaurant, Colors.red),
|
|
||||||
_button("Events", Icons.event, Colors.amber),
|
|
||||||
_button("More", Icons.more_horiz, Colors.green),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 36.0,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
padding: const EdgeInsets.only(left: 24.0, right: 24.0),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
|
||||||
Text("Images",
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
)),
|
|
||||||
SizedBox(
|
|
||||||
height: 12.0,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: <Widget>[
|
|
||||||
CachedNetworkImage(
|
|
||||||
imageUrl:
|
|
||||||
"https://images.fineartamerica.com/images-medium-large-5/new-pittsburgh-emmanuel-panagiotakis.jpg",
|
|
||||||
height: 120.0,
|
|
||||||
width: (MediaQuery.of(context).size.width - 48) / 2 - 2,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
CachedNetworkImage(
|
|
||||||
imageUrl:
|
|
||||||
"https://cdn.pixabay.com/photo/2016/08/11/23/48/pnc-park-1587285_1280.jpg",
|
|
||||||
width: (MediaQuery.of(context).size.width - 48) / 2 - 2,
|
|
||||||
height: 120.0,
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 36.0,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
padding: const EdgeInsets.only(left: 24.0, right: 24.0),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: <Widget>[
|
|
||||||
Text("About",
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
)),
|
|
||||||
SizedBox(
|
|
||||||
height: 12.0,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
"""Pittsburgh is a city in the state of Pennsylvania in the United States, and is the county seat of Allegheny County. A population of about 302,407 (2018) residents live within the city limits, making it the 66th-largest city in the U.S. The metropolitan population of 2,324,743 is the largest in both the Ohio Valley and Appalachia, the second-largest in Pennsylvania (behind Philadelphia), and the 27th-largest in the U.S.\n\nPittsburgh is located in the southwest of the state, at the confluence of the Allegheny, Monongahela, and Ohio rivers. Pittsburgh is known both as "the Steel City" for its more than 300 steel-related businesses and as the "City of Bridges" for its 446 bridges. The city features 30 skyscrapers, two inclined railways, a pre-revolutionary fortification and the Point State Park at the confluence of the rivers. The city developed as a vital link of the Atlantic coast and Midwest, as the mineral-rich Allegheny Mountains made the area coveted by the French and British empires, Virginians, Whiskey Rebels, and Civil War raiders.\n\nAside from steel, Pittsburgh has led in manufacturing of aluminum, glass, shipbuilding, petroleum, foods, sports, transportation, computing, autos, and electronics. For part of the 20th century, Pittsburgh was behind only New York City and Chicago in corporate headquarters employment; it had the most U.S. stockholders per capita. Deindustrialization in the 1970s and 80s laid off area blue-collar workers as steel and other heavy industries declined, and thousands of downtown white-collar workers also lost jobs when several Pittsburgh-based companies moved out. The population dropped from a peak of 675,000 in 1950 to 370,000 in 1990. However, this rich industrial history left the area with renowned museums, medical centers, parks, research centers, and a diverse cultural district.\n\nAfter the deindustrialization of the mid-20th century, Pittsburgh has transformed into a hub for the health care, education, and technology industries. Pittsburgh is a leader in the health care sector as the home to large medical providers such as University of Pittsburgh Medical Center (UPMC). The area is home to 68 colleges and universities, including research and development leaders Carnegie Mellon University and the University of Pittsburgh. Google, Apple Inc., Bosch, Facebook, Uber, Nokia, Autodesk, Amazon, Microsoft and IBM are among 1,600 technology firms generating \$20.7 billion in annual Pittsburgh payrolls. The area has served as the long-time federal agency headquarters for cyber defense, software engineering, robotics, energy research and the nuclear navy. The nation's eighth-largest bank, eight Fortune 500 companies, and six of the top 300 U.S. law firms make their global headquarters in the area, while RAND Corporation (RAND), BNY Mellon, Nova, FedEx, Bayer, and the National Institute for Occupational Safety and Health (NIOSH) have regional bases that helped Pittsburgh become the sixth-best area for U.S. job growth.
|
|
||||||
""",
|
|
||||||
softWrap: true,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 24,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _button(String label, IconData icon, Color color) {
|
|
||||||
return Column(
|
|
||||||
children: <Widget>[
|
|
||||||
Container(
|
|
||||||
padding: const EdgeInsets.all(16.0),
|
|
||||||
child: Icon(
|
|
||||||
icon,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
decoration:
|
|
||||||
BoxDecoration(color: color, shape: BoxShape.circle, boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: Color.fromRGBO(0, 0, 0, 0.15),
|
|
||||||
blurRadius: 8.0,
|
|
||||||
)
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 12.0,
|
|
||||||
),
|
|
||||||
Text(label),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _body() {
|
|
||||||
return SizedBox();
|
|
||||||
// return FlutterMap(
|
|
||||||
// options: MapOptions(
|
|
||||||
// center: LatLng(22.3817, 114.05),
|
|
||||||
// zoom: 13,
|
|
||||||
// maxZoom: 15,
|
|
||||||
// ),
|
|
||||||
// layers: [
|
|
||||||
// TileLayerOptions(
|
|
||||||
// urlTemplate: "https://tile.openstreetmap.org/{z}/{x}/{y}.png"),
|
|
||||||
// MarkerLayerOptions(markers: [
|
|
||||||
// Marker(
|
|
||||||
// point: LatLng(22.3817, 114.05),
|
|
||||||
// builder: (ctx) => Icon(
|
|
||||||
// Icons.location_on,
|
|
||||||
// color: Colors.blue,
|
|
||||||
// size: 48.0,
|
|
||||||
// ),
|
|
||||||
// height: 60),
|
|
||||||
// ]),
|
|
||||||
// ],
|
|
||||||
// );
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,68 +0,0 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
|
|
||||||
import 'package:akuCommunity/utils/headers.dart';
|
|
||||||
|
|
||||||
//TODO CLEAN BOTTOM CODES.
|
|
||||||
@Deprecated("sh*t app bar need to be cleaned.")
|
|
||||||
class ThingsAppBar extends StatelessWidget {
|
|
||||||
final String title, subtitle;
|
|
||||||
final List<Map<String, dynamic>> treeList;
|
|
||||||
final TabController tabController;
|
|
||||||
const ThingsAppBar({
|
|
||||||
Key key,
|
|
||||||
@required this.title,
|
|
||||||
this.subtitle,
|
|
||||||
this.treeList,
|
|
||||||
this.tabController,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
child: AppBar(
|
|
||||||
elevation: 0,
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
leading: InkWell(
|
|
||||||
onTap: () => Get.back(),
|
|
||||||
child: Icon(
|
|
||||||
AntDesign.left,
|
|
||||||
size: 45.sp,
|
|
||||||
color: Color(0xff333333),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
centerTitle: true,
|
|
||||||
title: Text(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xff333333),
|
|
||||||
fontSize: 32.sp,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
bottom: TabBar(
|
|
||||||
unselectedLabelStyle: TextStyle(
|
|
||||||
fontSize: 28.sp,
|
|
||||||
),
|
|
||||||
labelStyle: TextStyle(
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
fontSize: 28.sp,
|
|
||||||
),
|
|
||||||
labelPadding: EdgeInsets.symmetric(horizontal: 131.5.w),
|
|
||||||
indicatorColor: Color(0xffffc40c),
|
|
||||||
indicatorSize: TabBarIndicatorSize.label,
|
|
||||||
indicatorPadding: EdgeInsets.symmetric(horizontal: 21.w),
|
|
||||||
isScrollable: true,
|
|
||||||
controller: tabController,
|
|
||||||
tabs: List.generate(
|
|
||||||
treeList.length,
|
|
||||||
(index) => Tab(text: treeList[index]['name']),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:akuCommunity/base/base_style.dart';
|
|
||||||
import 'package:akuCommunity/utils/headers.dart';
|
|
||||||
|
|
||||||
///TODO CLEAN BOTTOM CODES.
|
|
||||||
///
|
|
||||||
///THIS IS SHIT BUTTON
|
|
||||||
///
|
|
||||||
///use `widget/buttons/bottom_button` instead of this widget.
|
|
||||||
///
|
|
||||||
///try import `'package:akuCommunity/widget/buttons/bottom_button.dart'`
|
|
||||||
@Deprecated("sh*t bottom_button need to be cleaned.")
|
|
||||||
class BottomButton extends StatefulWidget {
|
|
||||||
final String title;
|
|
||||||
final Function fun;
|
|
||||||
BottomButton({Key key, this.title, this.fun}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
_BottomButtonState createState() => _BottomButtonState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _BottomButtonState extends State<BottomButton> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
height: 98.w,
|
|
||||||
width: MediaQuery.of(context).size.width,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: widget.fun,
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
color: widget.fun == null
|
|
||||||
? BaseStyle.color999999
|
|
||||||
: BaseStyle.colorffc40c,
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 26.5.w,
|
|
||||||
),
|
|
||||||
child: Text(
|
|
||||||
widget.title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
fontSize: BaseStyle.fontSize32,
|
|
||||||
color: ktextPrimary,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
import 'dart:math';
|
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
|
||||||
|
|
||||||
enum ImageType {
|
|
||||||
normal,
|
|
||||||
// random, //随机
|
|
||||||
assets, //资源目录
|
|
||||||
}
|
|
||||||
|
|
||||||
@Deprecated("cached_image_wrapper need to be cleaned.")
|
|
||||||
class CachedImageWrapper extends StatelessWidget {
|
|
||||||
final String url;
|
|
||||||
final double width;
|
|
||||||
final double height;
|
|
||||||
final BoxFit fit;
|
|
||||||
final ImageType imageType;
|
|
||||||
final bool isSigned;
|
|
||||||
|
|
||||||
CachedImageWrapper(
|
|
||||||
{@required this.url,
|
|
||||||
@required this.width,
|
|
||||||
@required this.height,
|
|
||||||
this.isSigned = true,
|
|
||||||
this.imageType: ImageType.normal,
|
|
||||||
this.fit: BoxFit.cover});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return imageType == ImageType.normal
|
|
||||||
? CachedNetworkImage(
|
|
||||||
key: Key(url),
|
|
||||||
imageBuilder: (context, imageProvider) {
|
|
||||||
return Container(
|
|
||||||
width: width,
|
|
||||||
height: height,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: isSigned
|
|
||||||
? Colors.transparent
|
|
||||||
: Colors.grey.withOpacity(0.6),
|
|
||||||
image: isSigned
|
|
||||||
? DecorationImage(
|
|
||||||
image: imageProvider, fit: BoxFit.cover, scale: 1)
|
|
||||||
: null,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
imageUrl: imageUrl,
|
|
||||||
placeholder: (_, __) => SizedBox(
|
|
||||||
width: width,
|
|
||||||
height: height,
|
|
||||||
child:
|
|
||||||
CupertinoActivityIndicator(radius: min(10.0, width / 3))),
|
|
||||||
errorWidget: (_, __, ___) => SizedBox(
|
|
||||||
width: width,
|
|
||||||
height: height,
|
|
||||||
child: Icon(
|
|
||||||
Icons.error_outline,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: SizedBox(
|
|
||||||
width: width,
|
|
||||||
height: height,
|
|
||||||
child: Image.asset(imageUrl),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
String get imageUrl {
|
|
||||||
switch (imageType) {
|
|
||||||
// case ImageType.random:
|
|
||||||
// return ImageHelper.randomUrl(
|
|
||||||
// key: url, width: width.toInt(), height: height.toInt());
|
|
||||||
case ImageType.assets:
|
|
||||||
return "assets/images/" + url;
|
|
||||||
case ImageType.normal:
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
return url;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,112 +0,0 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:akuCommunity/utils/headers.dart';
|
|
||||||
import 'package:akuCommunity/widget/cached_image_wrapper.dart';
|
|
||||||
|
|
||||||
class CircleTrend extends StatefulWidget {
|
|
||||||
final String title;
|
|
||||||
final List<Map<String, dynamic>> contentList;
|
|
||||||
final Function fun;
|
|
||||||
CircleTrend({Key key, this.title, this.contentList, this.fun})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
_CircleTrendState createState() => _CircleTrendState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _CircleTrendState extends State<CircleTrend> {
|
|
||||||
TextStyle _textStyleTitle() {
|
|
||||||
return TextStyle(
|
|
||||||
fontWeight: FontWeight.w600, fontSize: 52.sp, color: Color(0xff333333));
|
|
||||||
}
|
|
||||||
|
|
||||||
TextStyle _textStyleSubtitle() {
|
|
||||||
return TextStyle(fontSize: 32.sp, color: Color(0xff333333));
|
|
||||||
}
|
|
||||||
|
|
||||||
TextStyle _textStyleTag() {
|
|
||||||
return TextStyle(fontSize: 30.sp, color: Color(0xff444444));
|
|
||||||
}
|
|
||||||
|
|
||||||
InkWell _contentDetails(String subtitle, imagePath, Function fun) {
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
fun(subtitle, imagePath);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(bottom: 8.w),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
CachedImageWrapper(
|
|
||||||
url: imagePath,
|
|
||||||
width: 152.w,
|
|
||||||
height: 152.w,
|
|
||||||
),
|
|
||||||
SizedBox(width: 10.w),
|
|
||||||
Container(
|
|
||||||
width: 384.w,
|
|
||||||
child: Text(
|
|
||||||
subtitle,
|
|
||||||
maxLines: 2,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: _textStyleSubtitle(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Container _statusCard(
|
|
||||||
String title, List<Map<String, dynamic>> contentList, Function fun) {
|
|
||||||
return Container(
|
|
||||||
margin: EdgeInsets.only(
|
|
||||||
left: 32.w,
|
|
||||||
right: 32.w,
|
|
||||||
bottom: 40.w,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
title.substring(0, 2),
|
|
||||||
style: _textStyleTitle(),
|
|
||||||
),
|
|
||||||
title.substring(2) != null
|
|
||||||
? Text(
|
|
||||||
title.substring(2),
|
|
||||||
style: _textStyleTag(),
|
|
||||||
)
|
|
||||||
: SizedBox(),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(left: 30.w),
|
|
||||||
child: Column(
|
|
||||||
children: contentList
|
|
||||||
.map((item) => _contentDetails(
|
|
||||||
item['subtitle'],
|
|
||||||
item['imagePath'],
|
|
||||||
fun,
|
|
||||||
))
|
|
||||||
.toList(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
child: _statusCard(
|
|
||||||
widget.title,
|
|
||||||
widget.contentList,
|
|
||||||
widget.fun,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,44 +0,0 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:akuCommunity/base/base_style.dart';
|
|
||||||
import 'package:akuCommunity/utils/headers.dart';
|
|
||||||
|
|
||||||
class CommonUploadImage extends StatefulWidget {
|
|
||||||
final String imagePath, title;
|
|
||||||
CommonUploadImage({Key key, this.imagePath, this.title}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
_CommonUploadImageState createState() => _CommonUploadImageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _CommonUploadImageState extends State<CommonUploadImage> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {},
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
ClipRRect(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(6)),
|
|
||||||
child: Image.asset(
|
|
||||||
widget.imagePath,
|
|
||||||
width: 328.w,
|
|
||||||
height: 180.w,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 16.w),
|
|
||||||
Text(
|
|
||||||
widget.title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: BaseStyle.fontSize24, color: BaseStyle.color999999),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
//TODO Please remove those sh*t code.
|
|
||||||
class ExpandableText extends StatefulWidget {
|
|
||||||
final String text;
|
|
||||||
final int maxLines;
|
|
||||||
final TextStyle style;
|
|
||||||
bool expand;
|
|
||||||
|
|
||||||
ExpandableText({Key key, this.text, this.maxLines, this.style, this.expand})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
_ExpandableTextState createState() => _ExpandableTextState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ExpandableTextState extends State<ExpandableText> {
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
if (widget.expand == null) {
|
|
||||||
setState(() {
|
|
||||||
widget.expand = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
child: LayoutBuilder(
|
|
||||||
builder: (BuildContext context, size) {
|
|
||||||
final span = TextSpan(text: widget.text ?? '', style: widget.style);
|
|
||||||
final tp = TextPainter(
|
|
||||||
text: span,
|
|
||||||
maxLines: widget.maxLines,
|
|
||||||
textDirection: TextDirection.ltr,
|
|
||||||
);
|
|
||||||
tp.layout(maxWidth: size.maxWidth);
|
|
||||||
if (tp.didExceedMaxLines) {
|
|
||||||
return Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
widget.expand
|
|
||||||
? Text(
|
|
||||||
widget.text ?? '',
|
|
||||||
style: widget.style,
|
|
||||||
)
|
|
||||||
: Text(
|
|
||||||
widget.text ?? '',
|
|
||||||
maxLines: widget.maxLines,
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
style: widget.style,
|
|
||||||
),
|
|
||||||
GestureDetector(
|
|
||||||
behavior: HitTestBehavior.translucent,
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
widget.expand = !widget.expand;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.only(top: 2),
|
|
||||||
child: Text(
|
|
||||||
widget.expand ? '收起' : '全文',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: widget.style != null
|
|
||||||
? widget.style.fontSize
|
|
||||||
: null,
|
|
||||||
color: Color(0xffffc40c)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return Text(widget.text ?? '', style: widget.style);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,97 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:shimmer/shimmer.dart';
|
|
||||||
|
|
||||||
import 'package:akuCommunity/utils/headers.dart';
|
|
||||||
|
|
||||||
class GoodsCardSkeleton extends StatelessWidget {
|
|
||||||
const GoodsCardSkeleton({Key key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
child: GridView.builder(
|
|
||||||
shrinkWrap: true,
|
|
||||||
physics: NeverScrollableScrollPhysics(),
|
|
||||||
itemCount: 6,
|
|
||||||
itemBuilder: (BuildContext context, int index) {
|
|
||||||
return Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(6),
|
|
||||||
),
|
|
||||||
child: Shimmer.fromColors(
|
|
||||||
baseColor: Colors.grey[300],
|
|
||||||
highlightColor: Colors.grey[100],
|
|
||||||
enabled: true,
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(6),
|
|
||||||
boxShadow: <BoxShadow>[
|
|
||||||
BoxShadow(
|
|
||||||
color: Colors.grey.withOpacity(0.2),
|
|
||||||
offset: Offset(1.1, 1.1),
|
|
||||||
blurRadius: 10.0),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
color: Colors.white,
|
|
||||||
width: 333.w,
|
|
||||||
height: 344.w,
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: 12.w,
|
|
||||||
right: 12.w,
|
|
||||||
top: 22.w,
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
),
|
|
||||||
margin: EdgeInsets.only(bottom: 6.w),
|
|
||||||
height: 30.w,
|
|
||||||
width: double.infinity,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
),
|
|
||||||
margin: EdgeInsets.only(bottom: 20.w),
|
|
||||||
height: 30.w,
|
|
||||||
width: double.infinity,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
),
|
|
||||||
height: 32.w,
|
|
||||||
width: 61.w,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 2,
|
|
||||||
mainAxisSpacing: 20.w,
|
|
||||||
crossAxisSpacing: 20.w,
|
|
||||||
childAspectRatio: 333.w / 509.w),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,55 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:akuCommunity/utils/headers.dart';
|
|
||||||
|
|
||||||
//TODO one day we need to remove those.😕
|
|
||||||
//TODO CLEAN BOTTOM CODES.
|
|
||||||
@Deprecated("sh*t round_check_box need to be cleaned.")
|
|
||||||
class RoundCheckBox extends StatefulWidget {
|
|
||||||
var value = false;
|
|
||||||
|
|
||||||
Function onChanged;
|
|
||||||
|
|
||||||
String title;
|
|
||||||
|
|
||||||
RoundCheckBox({Key key, @required this.value, this.onChanged, this.title})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
_RoundCheckBoxState createState() => _RoundCheckBoxState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _RoundCheckBoxState extends State<RoundCheckBox> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: widget.onChanged,
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
widget.value
|
|
||||||
? Icon(
|
|
||||||
Icons.check_circle,
|
|
||||||
size: 30.sp,
|
|
||||||
color: Color(0xffffc40c),
|
|
||||||
)
|
|
||||||
: Icon(
|
|
||||||
Icons.panorama_fish_eye,
|
|
||||||
size: 30.sp,
|
|
||||||
color: Color(0xff979797),
|
|
||||||
),
|
|
||||||
SizedBox(width: 10.w),
|
|
||||||
Text(
|
|
||||||
widget.title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 26.sp,
|
|
||||||
color: Color(0xff333333),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'asset.dart';
|
|
||||||
import 'bee_scaffold.dart';
|
|
||||||
|
|
||||||
class SearchBarDemo extends StatefulWidget {
|
|
||||||
_SearchBarDemoState createState() => _SearchBarDemoState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _SearchBarDemoState extends State<SearchBarDemo> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return BeeScaffold(
|
|
||||||
title: 'SearchBarDemo',
|
|
||||||
actions: [
|
|
||||||
IconButton(
|
|
||||||
icon: Icon(Icons.search),
|
|
||||||
onPressed: () {
|
|
||||||
showSearch(context: context, delegate: SearchBarDelegate());
|
|
||||||
}
|
|
||||||
// showSearch(context:context,delegate: searchBarDelegate()),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class SearchBarDelegate extends SearchDelegate<String> {
|
|
||||||
@override
|
|
||||||
List<Widget> buildActions(BuildContext context) {
|
|
||||||
return [
|
|
||||||
IconButton(
|
|
||||||
icon: Icon(Icons.clear),
|
|
||||||
onPressed: () => query = "",
|
|
||||||
)
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget buildLeading(BuildContext context) {
|
|
||||||
return IconButton(
|
|
||||||
icon: AnimatedIcon(
|
|
||||||
icon: AnimatedIcons.menu_arrow, progress: transitionAnimation),
|
|
||||||
onPressed: () => close(context, null));
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget buildResults(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
width: 100.0,
|
|
||||||
height: 100.0,
|
|
||||||
child: Card(
|
|
||||||
color: Colors.redAccent,
|
|
||||||
child: Center(
|
|
||||||
child: Text(query),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget buildSuggestions(BuildContext context) {
|
|
||||||
final suggestionList = query.isEmpty
|
|
||||||
? recentSuggest
|
|
||||||
: searchList.where((input) => input.startsWith(query)).toList();
|
|
||||||
return ListView.builder(
|
|
||||||
itemCount: suggestionList.length,
|
|
||||||
itemBuilder: (context, index) => ListTile(
|
|
||||||
title: RichText(
|
|
||||||
text: TextSpan(
|
|
||||||
text: suggestionList[index].substring(0, query.length),
|
|
||||||
style: TextStyle(
|
|
||||||
color: Colors.black, fontWeight: FontWeight.bold),
|
|
||||||
children: [
|
|
||||||
TextSpan(
|
|
||||||
text: suggestionList[index].substring(query.length),
|
|
||||||
style: TextStyle(color: Colors.grey))
|
|
||||||
])),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
|
|
||||||
class SingleAdSpace extends StatelessWidget {
|
|
||||||
final String imagePath;
|
|
||||||
final double radius;
|
|
||||||
SingleAdSpace({Key key, this.imagePath, this.radius = 0}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
height: 160.w,
|
|
||||||
margin: EdgeInsets.symmetric(
|
|
||||||
horizontal: 32.w,
|
|
||||||
vertical: 17.w,
|
|
||||||
),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(radius)),
|
|
||||||
boxShadow: <BoxShadow>[
|
|
||||||
BoxShadow(
|
|
||||||
color: Colors.grey.withOpacity(0.6),
|
|
||||||
offset: Offset(1.1, 1.1),
|
|
||||||
blurRadius: 10.0),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {},
|
|
||||||
child: Container(
|
|
||||||
child: Image.asset(
|
|
||||||
imagePath,
|
|
||||||
height: 160.w,
|
|
||||||
fit: BoxFit.fill,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue