File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments