xuelongqy / flutter_easy_refresh

A flutter widget that provides pull-down refresh and pull-up load.
https://xuelongqy.github.io/flutter_easy_refresh/
MIT License
3.83k stars 628 forks source link

使用Material样式时异常GPU占用 #814

Closed baijunty closed 2 months ago

baijunty commented 2 months ago

示例代码

import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart';

class SampleItemListView extends StatelessWidget {
  const SampleItemListView({
    super.key,
  });
  static const routeName = '/';

  @override
  Widget build(BuildContext context) {
    var controller = EasyRefreshController();
    return Scaffold(
      appBar: AppBar(
        title: const Text('Sample Items'),
        actions: const [
          IconButton(
            icon: Icon(Icons.settings),
            onPressed: null,
          ),
        ],
      ),
      body: EasyRefresh(
          controller: controller,
          header: const MaterialHeader(),
          footer: const MaterialFooter(),
          onLoad: () {},
          onRefresh: () {},
          child: ListView.builder(
              itemCount: 25,
              itemBuilder: (BuildContext context, int index) {
                return Text('Sample Items $index');
              })),
    );
  }
}

使用浏览器打开后非刷新加载,静置状态下GPU也呈现高使用率 image 改回classic样式后正常 后测试桌面端和手机端出现同样性能问题。

xuelongqy commented 2 months ago

3.3.5 已修复