-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Details
When i use material 3 is true and press to icon button many times in list all view get lagged and drop frame happened to 28hz
WhatsApp.Video.2022-05-24.at.11.24.54.PM.mp4
ِAndroid:
Android 12:
Tested on mi9t and samsung A22:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.1, on macOS 11.5.2 20G95 darwin-x64, locale
en-EG)
[✓] Android toolchain - develop for Android devices (Android SDK version
32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[!] Android Studio
✗ Unable to find bundled Java version.
[✓] IntelliJ IDEA Community Edition (version 2021.3)
[✓] VS Code (version 1.67.0)
[✓] VS Code (version 1.53.2)
[✓] Connected device (5 available)
[✓] HTTP Host Availability
Tested Code
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
useMaterial3: true,
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<String> _list = [
"text",
"text",
"text",
"text",
"text",
"text",
"text",
"text",
"text",
"text",
"text",
"text",
"text",
"text",
"text",
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: ListView.builder(
itemCount: _list.length,
itemBuilder: (context, index) => ItemLine(),
),
)
],
),
),
);
}
}
class ItemLine extends StatelessWidget {
const ItemLine({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("TEST"),
Row(
children: [
IconButton(
onPressed: () {},
icon: const Icon(
Icons.remove_circle_outline,
),
),
Text("1"),
IconButton(
onPressed: () {},
icon: const Icon(
Icons.add_circle,
),
),
],
),
],
),
),
),
],
),
const Divider()
],
);
}
}