import 'package:flutter/material.dart';
import 'package:webmis/components/scroll-view.dart';
class Demo extends StatefulWidget {
@override
State<StatefulWidget> createState() => DemoState();
}
class DemoState extends State<Demo> {
/* Widget */
@override
Widget build(BuildContext context) {
/* 显示 */
return Scaffold(
body: WmScrollView(
// scroll: (res)=> print('滑动: ${res}'),
down: (res)=> print('下拉: ${res}'),
up: (res)=> print('上拉: ${res}'),
swipe: (res)=> print('方向: ${res}'),
slotHtml: [
Container(
height: 500,
color: Colors.red,
child: Text('1'),
),
Container(
height: 500,
color: Colors.green,
child: Text('2'),
),
Container(
height: 500,
color: Colors.blue,
child: Text('3'),
),
],
),
);
}
}
import 'package:flutter/material.dart';
import 'package:webmis/components/scroll-view.dart';
class Demo extends StatefulWidget {
@override
State<StatefulWidget> createState() => DemoState();
}
class DemoState extends State<Demo> {
/* Widget */
@override
Widget build(BuildContext context) {
/* 显示 */
return Scaffold(
body: WmScrollView(
scrollX: true,
// scroll: (res)=> print('滑动: ${res}'),
left: (res)=> print('左拉: ${res}'),
right: (res)=> print('右拉: ${res}'),
swipe: (res)=> print('上拉: ${res}'),
slotHtml:[
Container(
width: 300,
color: Colors.red,
child: Text('1'),
),
Container(
width: 300,
color: Colors.green,
child: Text('2'),
),
Container(
width: 300,
color: Colors.blue,
child: Text('3'),
),
],
),
);
}
}
业务咨询
技术问题