class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); }

class _MyAppState extends State { List _headerList = "Andrew", "John", "Martha", "Tony", "Totu"; List _mainList = "Andrew", "John", "Martha", "Tony", "Totu";

@override Widget build(BuildContext context) { return Scaffold( body: Container( child: ContactListWidget( key: GlobalKey( debugLabel: DateTime.now().millisecondsSinceEpoch.toString()), items: _mainList, itemHeight: 75, headerItemHeight: 50, itemBuilder: (context, index) { return Text(_mainListindex); }, headerWidgets: List.generate( (_headerList.length), (index) { return Text(_mainListindex); }, ), );, ), ); } }

Libraries

contact_list_flutter
contact_list_widget