|
- import 'package:flutter/material.dart';
- import 'package:zhiying_comm/zhiying_comm.dart';
- import 'package:flutter_swiper/flutter_swiper.dart';
-
- class HomeBanner extends StatelessWidget {
- @override
- Widget build(BuildContext context) {
- return Container(
- width: double.infinity,
- height: 200,
- child: Swiper(
- itemBuilder: (BuildContext context, int index) {
- // return new Image.network(
- // "http://via.placeholder.com/350x150",
- // fit: BoxFit.fill,
- // );
- return Container();
- },
- itemCount: 3,
- pagination: new SwiperPagination(),
- control: new SwiperControl(),
- onTap: (index) {
- Map<String, dynamic> model = Map();
- model['name'] = '123';
- RouterUtil.route(model, context);
- },
- ),
- );
- }
- }
|