FavoriteLoadingAdd to favorites
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // Application name
      title: 'Flutter Hello World',
      // Application theme data, you can set the colors for the application as
      // you want
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      // A widget which will be started on application startup
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  final String title;

  const MyHomePage({@required this.title});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        // The title text which will be shown on the action bar
        title: Text(title),
      ),
      body: Center(
        child: Container(
          child: DefaultTabController(
            length: 2,
            initialIndex: 0,
            child: Column(
              children: [
                TabBar(
                  labelColor: Colors.blue,
                  tabs: [
                    Tab(
                      text: 'OEM',
                    ),
                    Tab(
                      text: 'Hotshots',
                    )
                  ],
                ),
                Expanded(
                  child: TabBarView(
                    children: [
                      Column(children: [
                        Column(
                          children: <Widget>[
                            const ExpansionTile(
                              title: Text('Samsung (357)'),
                              children: <Widget>[
                                ListTile(
                                  title: Text('This is tile number 1'),
                                ),
                              ],
                            ),
                            const ExpansionTile(
                              title: Text('Huawei (4)'),
                              children: <Widget>[
                                ListTile(
                                  title: Text('Huawei P Smart 2021 NFC'),
                                ),
                                ListTile(
                                  title: Text('Huawei P40 lite 6/128GB Black'),
                                ),
                                ListTile(
                                  title: Text('MatePad T10 LTE 32GB Blue'),
                                ),
                                ListTile(
                                  title: Text('P40 lite 6/128GB Sakura Pink'),
                                ),
                              ],
                            ),
                            const ExpansionTile(
                              title: Text('Apple (21)'),
                              children: <Widget>[
                                ListTile(
                                  title: Text('This is tile number 1'),
                                ),
                              ],
                            ),
                            const ExpansionTile(
                              title: Text('Xiaomi (785)'),
                              children: <Widget>[
                                ListTile(
                                  title: Text('This is tile number 1'),
                                ),
                              ],
                            ),
                            const ExpansionTile(
                              title: Text('Oppo (138)'),
                              children: <Widget>[
                                ListTile(
                                  title: Text('This is tile number 1'),
                                ),
                              ],
                            ),
                          ],
                        ),
                      ]),
                      Center(
                        child: Text('Hotshots'),
                      ),
                    ],
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Pin It on Pinterest

Share This