Skip to content

Commit 4f42da6

Browse files
committed
feat:增加listview
1 parent 61575c9 commit 4f42da6

File tree

7 files changed

+14
-18
lines changed

7 files changed

+14
-18
lines changed

lib/widget/common/container/index.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import 'package:flutter/material.dart';
22
import 'package:efox_flutter/components/widgetComp.dart' as WidgetComp;
3-
// import 'demo.dart' as Demo;
3+
import 'package:efox_flutter/widget/regular/container/demo.dart' as Demo;
44

55
class Index extends StatefulWidget {
66
static String title = 'Container';
7-
static String mdUrl = 'docs/widget/common/container/index.md';
7+
static String mdUrl = 'docs/widget/regular/container/index.md';
88
static String originCodeUrl = 'https://docs.flutter.io/flutter/widgets/Container-class.html';
99

1010
@override
@@ -19,7 +19,7 @@ class _IndexState extends State<Index> {
1919
originCodeUrl: Index.originCodeUrl,
2020
mdUrl: Index.mdUrl,
2121
demoChild: [
22-
// Demo.Index(),
22+
Demo.Index(),
2323
],
2424
);
2525
}

lib/widget/regular/container/demo.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ class Index extends StatelessWidget {
4848
constraints: BoxConstraints.expand(
4949
height: Theme.of(context).textTheme.display1.fontSize * 1.1 + 200.0
5050
),
51-
foregroundDecoration: BoxDecoration(
52-
image: DecorationImage(
53-
image: NetworkImage('https://www.example.com/images/frame.png'),
54-
centerSlice: Rect.fromLTRB(270.0, 180.0, 1360.0, 730.0),
55-
)
56-
),
51+
// foregroundDecoration: BoxDecoration(
52+
// image: DecorationImage(
53+
// image: NetworkImage('https://www.example.com/images/frame.png'),
54+
// centerSlice: Rect.fromLTRB(270.0, 180.0, 1360.0, 730.0),
55+
// )
56+
// ),
5757
transform: Matrix4.rotationZ(0.1),
5858
),
5959
)

lib/widget/regular/listview/demo.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'package:flutter/material.dart';
2-
import 'package:flutter_screenutil/flutter_screenutil.dart';
32

43
class Index extends StatefulWidget {
54
@override
@@ -29,24 +28,21 @@ class _IndexState extends State<Index> {
2928
scrollDirection: scrollDirections,
3029
reverse: false,
3130
controller: ScrollController(
32-
initialScrollOffset: ScreenUtil().setWidth(420),
3331
keepScrollOffset: true
3432
),
3533
primary: false,
3634
physics: ScrollPhysics(),
3735
shrinkWrap: false,
3836
padding: EdgeInsets.all(20.0),
39-
// itemExtent: ScreenUtil().setWidth(420),
37+
itemExtent: 200,
4038
children: List.generate(10, (index) {
4139
return InkWell(
4240
onTap: () {
4341
this.setState(() {
44-
scrollDirections == Axis.vertical ? scrollDirections = Axis.horizontal : scrollDirections = Axis.vertical;
42+
scrollDirections = Axis.vertical == scrollDirections ? Axis.horizontal : Axis.vertical;
4543
});
4644
},
4745
child: Container(
48-
width: ScreenUtil().setWidth(420),
49-
height: ScreenUtil().setWidth(220),
5046
decoration: BoxDecoration(
5147
image: DecorationImage(
5248
image: NetworkImage(listview[index]),

lib/widget/regular/listview/demo_builder.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'package:flutter/material.dart';
2-
import 'package:flutter_screenutil/flutter_screenutil.dart';
32

43
class Index extends StatefulWidget {
54
@override

locale/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"common" : {
1010
"changeLanguage": "changeLanguage",
11-
"changeVersion": "changeVersion",
11+
"changeVersion": "checkVersion",
1212
"changeEnvironment": "changeEnvironment"
1313
},
1414
"loading": "Loading"

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ flutter:
8989
- docs/widget/form/checkbox/
9090
- docs/widget/form/checkboxlisttile/
9191
- docs/widget/navigator/appbar/
92+
- docs/widget/navigator/scaffold/
9293
- docs/widget/navigator/bottomnavigationbar/
9394
- docs/widget/navigator/drawer/
9495
- docs/widget/navigator/floatingactionbutton/

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
1. assetbundle【】
6464
2. buttonbar【】
6565
3. chip【】
66-
4. container【】
66+
4. container【✔️ v1.0
6767
5. divider【】
6868
6. flatbutton【】
6969
7. icon【】

0 commit comments

Comments
 (0)