Created
October 20, 2023 16:49
-
-
Save utisam/2080e898df8ca476f01cf01ba5db7cf9 to your computer and use it in GitHub Desktop.
ListView & Transform.scale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'ListView & Transform.scale', | |
home: Scaffold( | |
body: ListView.builder( | |
itemCount: 10, | |
itemBuilder: (context, index) { | |
return Padding( | |
padding: const EdgeInsets.symmetric(vertical: 8), | |
child: Transform.scale( | |
scaleX: (index == 3) ? 1.0 : 0.96, | |
child: ListTile( | |
title: Text("Item $index"), | |
tileColor: Colors.grey.shade400, | |
), | |
), | |
); | |
}, | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment