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.
80 lines
2.1 KiB
80 lines
2.1 KiB
import 'package:flutter/material.dart'; |
|
import 'package:huixiang/generated/l10n.dart'; |
|
import 'package:huixiang/view_widget/hot_item.dart'; |
|
|
|
class HotArticlePage extends StatefulWidget { |
|
@override |
|
State<StatefulWidget> createState() { |
|
return _HotArticlePage(); |
|
} |
|
} |
|
|
|
class _HotArticlePage extends State<HotArticlePage> { |
|
@override |
|
Widget build(BuildContext context) { |
|
return Scaffold( |
|
appBar: AppBar( |
|
backgroundColor: Color(0xFFF7F7F7), |
|
elevation: 0, |
|
title: Text( |
|
S.of(context).remenwenzhangshipinliebiao, |
|
style: TextStyle( |
|
color: Colors.black, |
|
fontWeight: FontWeight.bold, |
|
), |
|
), |
|
centerTitle: false, |
|
leading: GestureDetector( |
|
onTap: () { |
|
Navigator.of(context).pop(); |
|
}, |
|
child: Container( |
|
alignment: Alignment.centerRight, |
|
margin: EdgeInsets.only(left: 10), |
|
padding: EdgeInsets.all(6), |
|
child: Icon( |
|
Icons.arrow_back_ios, |
|
color: Colors.black, |
|
size: 24, |
|
), |
|
), |
|
), |
|
titleSpacing: 2, |
|
leadingWidth: 56, |
|
), |
|
body: Container( |
|
child: ListView.builder( |
|
itemCount: 8, |
|
scrollDirection: Axis.vertical, |
|
physics: BouncingScrollPhysics(), |
|
itemBuilder: (context, position) { |
|
return AspectRatio( |
|
aspectRatio: 2.47, |
|
child: Container( |
|
height: 130, |
|
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16), |
|
child: HotArticleItem(), |
|
), |
|
); |
|
}, |
|
), |
|
), |
|
); |
|
} |
|
//AspectRatio( |
|
// aspectRatio: 2.47, |
|
// child: Container( |
|
// height: 151, |
|
// child: Swiper( |
|
// itemCount: 7, |
|
// viewportFraction: 0.95, |
|
// scale: 1, |
|
// loop: false, |
|
// physics: BouncingScrollPhysics(), |
|
// itemBuilder: (context, position) { |
|
// return HotArticleItem(); |
|
// }, |
|
// ), |
|
// ), |
|
// ) |
|
}
|
|
|