Skip to content

Instantly share code, notes, and snippets.

@perymerdeka
Last active September 16, 2021 16:18
Show Gist options
  • Save perymerdeka/cfcadb5f1bc5b831da1f7182e3216091 to your computer and use it in GitHub Desktop.
Save perymerdeka/cfcadb5f1bc5b831da1f7182e3216091 to your computer and use it in GitHub Desktop.
creating lists of item
import 'package:flutter/material.dart';
class Home extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Dismisible Example'),
),
body: ListView.builder(
padding: const EdgeInsets.all(10),
itemCount: 100,
itemBuilder: (context, index) {
return ListTile(
leading: CircleAvatar(child: Text('${index + 1}')),
title: Text(faker.person.name()),
subtitle: Text(faker.lorem.sentence()),
);
},
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment