ExpansionList In Flutter

Screenshot :

ExpansionList In Flutter

Program :

import 'package:flutter/material.dart';

void main() => runApp(
      new MaterialApp(
        home: new MyApp(),
        debugShowCheckedModeBanner: false,
      ),
    );

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      body: new ListView.builder(
        itemCount: educationList.length,
        itemBuilder: (context, i) {
          return new ExpansionTile(
            title: new Text(
              educationList[i].title,
              style: new TextStyle(
                  fontSize: 20.0,
                  fontWeight: FontWeight.bold,
                  fontStyle: FontStyle.italic),
            ),
            children: <Widget>[
              new Column(
                children: _buildExpandableContent(educationList[i]),
              ),
            ],
          );
        },
      ),
    );
  }

  _buildExpandableContent(Education education) {
    List<Widget> columnContent = [];

    for (String content in education.topic)
      columnContent.add(
        new ListTile(
          title: new Text(
            content,
            style: new TextStyle(fontSize: 18.0),
          ),
          leading: new Icon(Icons.arrow_forward_ios),
        ),
      );

    return columnContent;
  }
}

class Education {
  final String title;
  List<String> topic = [];

  Education(this.title, this.topic);
}

List<Education> educationList = [
  new Education(
    'Flutter',
    ['Basic in flutterturorial.in', 'ListView in flutterturorial.in']
  ),
  new Education(
    'Java',
    ['Basic in flutterturorial.in', 'OOP in flutterturorial.in', 'Generics in flutterturorial.in']
  ),
];