Skip to content

Instantly share code, notes, and snippets.

@utisam
Created October 20, 2023 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save utisam/2080e898df8ca476f01cf01ba5db7cf9 to your computer and use it in GitHub Desktop.
Save utisam/2080e898df8ca476f01cf01ba5db7cf9 to your computer and use it in GitHub Desktop.
ListView & Transform.scale
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