基础组件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

home_banner.dart 853 B

4 years ago
123456789101112131415161718192021222324252627282930
  1. import 'package:flutter/material.dart';
  2. import 'package:zhiying_comm/zhiying_comm.dart';
  3. import 'package:flutter_swiper/flutter_swiper.dart';
  4. class HomeBanner extends StatelessWidget {
  5. @override
  6. Widget build(BuildContext context) {
  7. return Container(
  8. width: double.infinity,
  9. height: 200,
  10. child: Swiper(
  11. itemBuilder: (BuildContext context, int index) {
  12. // return new Image.network(
  13. // "http://via.placeholder.com/350x150",
  14. // fit: BoxFit.fill,
  15. // );
  16. return Container();
  17. },
  18. itemCount: 3,
  19. pagination: new SwiperPagination(),
  20. control: new SwiperControl(),
  21. onTap: (index) {
  22. Map<String, dynamic> model = Map();
  23. model['name'] = '123';
  24. RouterUtil.route(model, context);
  25. },
  26. ),
  27. );
  28. }
  29. }