import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
//滚动最大距离
const APPBAR_SCROLL_OFFSET = 100;
class HomePage extends StatefulWidget {
@override
_TabNavigatorState createState() =>_TabNavigatorState();
}
class _TabNavigatorState extends State<HomePage> {
List _imageUrl =[
'https://dimg04.c-ctrip.com/images/zg0o180000014yl20DEA4.jpg',
'https://dimg04.c-ctrip.com/images/zg0f180000014vrut370F.jpg',
'https://dimg04.c-ctrip.com/images/zg0n18000001528jhD6B2.jpg'];
double appBarAlpha = 0;
__onScroll(offset){
double alpha = offset/APPBAR_SCROLL_OFFSET;
if(alpha<0){
alpha = 0;
}else if(alpha>
Flutter之自定义AppBar并实现滑动渐变
最新推荐文章于 2024-10-08 12:07:29 发布