From 3633b88f77df977597d329f0706e25000ece85e6 Mon Sep 17 00:00:00 2001 From: Weller Zhao Date: Fri, 20 Nov 2020 10:46:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=95=E5=AF=BC=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/guide_page/guide_page.dart | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lib/pages/guide_page/guide_page.dart diff --git a/lib/pages/guide_page/guide_page.dart b/lib/pages/guide_page/guide_page.dart new file mode 100644 index 0000000..5f7f0bd --- /dev/null +++ b/lib/pages/guide_page/guide_page.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; +import 'package:zhiying_base_widget/models/app_config_model.dart'; +import 'package:flutter_swiper/flutter_swiper.dart'; +import 'package:zhiying_comm/zhiying_comm.dart'; + +class GuidePage extends StatefulWidget { + final AppConfigGuideModel model; + + const GuidePage(this.model, {Key key}) : super(key: key); + + @override + State createState() => _GuidePageState(); +} + +class _GuidePageState extends State { + @override + Widget build(BuildContext context) { + return Swiper( + itemBuilder: (BuildContext context, int index) { + return new Image.network( + widget.model?.images[index], + fit: BoxFit.fill, + ); + }, + loop: false, + itemCount: widget.model?.images?.length ?? 0, + pagination: new SwiperPagination(), + control: new SwiperControl(), + onIndexChanged: (index) { + Logger.debug(index); + }, + onTap: (index) { + Logger.debug('点击'); + }, + ); + } +}