Skip to content

Commit ce0ca87

Browse files
author
ProgrammerHasan
committed
ExampleMSAccordian
1 parent 3fdc686 commit ce0ca87

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

lib/example/msAccordian.dart

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_components/components/ms_accordian.dart';
3+
import 'package:flutter_components/components/circle_avatar_number.dart';
4+
5+
class ExampleMSAccordian extends StatefulWidget {
6+
@override
7+
_ExampleMSAccordianState createState() => _ExampleMSAccordianState();
8+
}
9+
10+
class _ExampleMSAccordianState extends State<ExampleMSAccordian> {
11+
@override
12+
Widget build(BuildContext context) {
13+
return Scaffold(
14+
appBar: AppBar(title: Text('Accordian Example')),
15+
body: MsAccordion(
16+
titleChild: ListTile(
17+
leading:Transform(
18+
transform: Matrix4.translationValues(-12, 0.0, 0.0),
19+
child: CircleAvatarNumberComponent(1),
20+
),
21+
title:Transform(
22+
transform: Matrix4.translationValues(-12, 0.0, 0.0),
23+
child: Text('Accordian'),
24+
),
25+
),
26+
showAccordion: false,
27+
margin: const EdgeInsets.all(0),
28+
expandedTitleBackgroundColor: Colors.blueGrey.withOpacity(0.3),
29+
collapsedTitleBackgroundColor: Colors.white10,
30+
contentBackgroundColor: Colors.white,
31+
contentChild: Column(
32+
children: <Widget>[
33+
// your children
34+
],
35+
),
36+
),
37+
);
38+
}
39+
}

0 commit comments

Comments
 (0)