| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- import 'package:bbyyy/my_tools/my_colors.dart';
- import 'package:bbyyy/my_tools/my_views.dart';
- import 'package:flutter/cupertino.dart';
- import 'package:flutter/material.dart';
- class RecommendedTodayPage extends StatefulWidget {
- @override
- _RecommendedTodayPageState createState() => _RecommendedTodayPageState();
- }
- class _RecommendedTodayPageState extends State<RecommendedTodayPage> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- body: Column(
- children: [
- MyViews().myAppBar('梆梆今日折扣', context, []),
- Expanded(
- child: GridView.builder(
- padding: EdgeInsets.symmetric(horizontal: 16, vertical: 16),
- gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
- crossAxisCount: 2,
- childAspectRatio:
- 164/261,
- crossAxisSpacing: 16,
- mainAxisSpacing: 16),
- itemBuilder: (c, index) {
- return Container(
- decoration: BoxDecoration(
- boxShadow: [
- BoxShadow(
- color: MyColors.c7FE1E1E1,
- blurRadius: 5.0,
- ),
- ],
- color: Colors.white,
- borderRadius: BorderRadius.circular(4),
- ),
- child: Column(
- children: [
- Padding(
- padding: const EdgeInsets.all(6.0),
- child: Row(
- children: [
- ClipRRect(
- child: MyViews().netImg('path', 20, 20),
- borderRadius: BorderRadius.circular(10),
- ),
- Container(
- child: Text(
- 'name',
- style: TextStyle(
- color: MyColors.c999999, fontSize: 10),
- ),
- margin: EdgeInsets.only(left: 5),
- ),
- ],
- ),
- ),
- Container(
- height: 1,
- color: MyColors.cF0F0F0,
- ),
- MyViews().netImg(
- 'path',
- (MediaQuery.of(context).size.width - 48) / 2,
- (MediaQuery.of(context).size.width - 48) / 2,
- placeholder: 'images/svg/goodsDefImg.svg'),
- Container(
- height: 1,
- color: MyColors.cF0F0F0,
- ),
- Padding(
- padding: const EdgeInsets.only(top: 6.0,left: 6,right: 6),
- child: Text(
- '8.9元充10元话费',
- style: TextStyle(color: MyColors.c333333, fontSize: 12),
- ),
- ),
- Padding(
- padding: const EdgeInsets.only(bottom: 6.0,left: 6,right: 6),
- child: Row(
- children: [
- Text(
- '¥8.90',
- style: TextStyle(
- color: MyColors.cFF4233,
- fontSize: 15,
- fontWeight: FontWeight.bold),
- ),
- Container(
- decoration: BoxDecoration(
- border:
- Border.all(color: MyColors.cFF4233, width: 1),
- borderRadius: BorderRadius.circular(10),
- ),
- height: 20,width: 50,
- child: Text('详情',style: TextStyle(color: MyColors.cFF4233,fontSize: 12),),
- alignment: Alignment.center,
- )
- ],mainAxisAlignment: MainAxisAlignment.spaceBetween,
- ),
- )
- ],
- crossAxisAlignment: CrossAxisAlignment.start,
- ),
- );
- },
- itemCount: 20,
- ),
- ),
- ],
- ),
- );
- }
- }
|