Skip to content

Commit 6d7a4aa

Browse files
committed
align
1 parent e111887 commit 6d7a4aa

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:efox_flutter/components/widgetComp.dart' as WidgetComp;
3+
import 'package:efox_flutter/utils/file.dart' as FileUtils;
4+
5+
String originCodeUrl = '';
6+
String codeUrl = 'docs/widget/regular/align/code.md';
7+
String mdUrl = 'docs/widget/regular/align/index.md';
8+
9+
class Index extends StatefulWidget {
10+
static String name = 'Align';
11+
static String routerName = 'align';
12+
13+
@override
14+
_IndexState createState() => _IndexState();
15+
}
16+
17+
class _IndexState extends State<Index> {
18+
bool loading = true;
19+
String ___MD___ = mdUrl;
20+
21+
@override
22+
void initState() {
23+
// TODO: implement initState
24+
super.initState();
25+
this.initMd();
26+
}
27+
28+
initMd () async {
29+
String mdStr = await FileUtils.readLocaleFile(___MD___);
30+
setState(() {
31+
this.___MD___ = mdStr;
32+
loading = false;
33+
});
34+
}
35+
@override
36+
Widget build(BuildContext context) {
37+
return WidgetComp.Index(
38+
name: Index.name,
39+
codeUrl: codeUrl,
40+
originCodeUrl: originCodeUrl,
41+
mdUrl: mdUrl,
42+
modelChild: (context, child, model) {
43+
return [
44+
___MD___
45+
];
46+
},
47+
demoChild: <Widget>[],
48+
);
49+
}
50+
}

lib/widget/regular/index.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'row/index.dart' as Row;
33
import 'column/index.dart' as Column;
44
import 'container/index.dart' as Container;
55
import 'padding/index.dart' as Padding;
6+
import 'align/index.dart' as Align;
67

78
const nameSpaces = '/Regular_';
89

@@ -30,6 +31,12 @@ List widgets = [
3031
widget: Padding.Index(),
3132
code: 59483, // aspect_ratio
3233
name: Padding.Index.name
34+
),
35+
ItemInfo(
36+
routerName: nameSpaces + Align.Index.routerName,
37+
widget: Align.Index(),
38+
code: 57917, // format_indent_decrease
39+
name: Align.Index.name
3340
)
3441
];
3542

0 commit comments

Comments
 (0)