diff --git a/lib/home/home_view/home_banner.dart b/lib/home/home_view/home_banner.dart index 8c51db29..f78b2228 100644 --- a/lib/home/home_view/home_banner.dart +++ b/lib/home/home_view/home_banner.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:huixiang/retrofit/data/banner.dart'; @@ -6,7 +5,6 @@ import 'package:huixiang/view_widget/custom_image.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; class HomeBanner extends StatefulWidget { - final List bannerData; final SwiperController controller; @@ -16,7 +14,6 @@ class HomeBanner extends StatefulWidget { State createState() { return _HomeBanner(); } - } class _HomeBanner extends State { @@ -50,7 +47,8 @@ class _HomeBanner extends State { borderRadius: BorderRadius.circular(8), ), child: MImage( - (widget.bannerData != null && position < widget.bannerData.length) + (widget.bannerData != null && + position < widget.bannerData.length) ? widget.bannerData[position].imgUrl ?? "" : "", radius: BorderRadius.circular(8), @@ -76,27 +74,23 @@ class _HomeBanner extends State { // Navigator.of(context).pushNamed('/router/qr_share'); // break; case 1: - Navigator.of(context).pushNamed('/router/integral_store_page', - arguments: {"goodsId": bannerData.content}); + Navigator.of(context).pushNamed( + '/router/integral_store_page', + arguments: {"goodsId": bannerData.content}, + ); break; case 2: - Navigator.of(context).pushNamed('/router/web_page', arguments: { - "activityId": bannerData.content, - }); + Navigator.of(context).pushNamed( + '/router/web_page', + arguments: {"activityId": bannerData.content}, + ); break; case 3: - Navigator.of(context).pushNamed('/router/web_page', arguments: { - "articleId": bannerData.content, - }); + Navigator.of(context).pushNamed( + '/router/web_page', + arguments: {"articleId": bannerData.content}, + ); break; } } - - } - - - - - -