FavoriteLoadingAdd to favorites
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
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'),
),
],
),
),
],
),
),
),
),
);
}
}
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'), ), ], ), ), ], ), ), ), ), ); } }
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

Garth Baker
Favorite
Loading
en
af
sq
am
ar
hy
az
eu
be
bn
bs
bg
ca
ceb
ny
zh-CN
zh-TW
co
hr
cs
da
nl
en
eo
et
tl
fi
fr
fy
gl
ka
de
el
gu
ht
ha
haw
iw
hi
hmn
hu
is
ig
id
ga
it
ja
jw
kn
kk
km
ko
ku
ky
lo
la
lv
lt
lb
mk
mg
ms
ml
mt
mi
mr
mn
my
ne
no
ps
fa
pl
pt
pa
ro
ru
sm
gd
sr
st
sn
sd
si
sk
sl
so
es
su
sw
sv
tg
ta
te
th
tr
uk
ur
uz
vi
cy
xh
yi
yo
zu
Share This