|
|
@@ -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<StatefulWidget> createState() => _GuidePageState(); |
|
|
|
} |
|
|
|
|
|
|
|
class _GuidePageState extends State<GuidePage> { |
|
|
|
@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('点击'); |
|
|
|
}, |
|
|
|
); |
|
|
|
} |
|
|
|
} |