Skip to content

Commit e0fd2be

Browse files
committed
docs(mediabox): add mediabox example
1 parent af877e6 commit e0fd2be

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ To use this plugin, add `flutter_weui` as a [dependency in your pubspec.yaml fil
1919
- [`Dialog`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/dialog_example.dart)
2020
- [`Footer`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/footer_example.dart)
2121
- [`LoadMore`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/load_more_example.dart)
22-
- [`MediaBox`]()
22+
- [`MediaBox`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/media_box_example.dart)
2323
- [`Panel`]()
2424
- [`Picker`]()
2525
- [`Slider`]()

README_zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
- [`Dialog`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/dialog_example.dart)
2020
- [`Footer`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/footer_example.dart)
2121
- [`LoadMore`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/load_more_example.dart)
22-
- [`MediaBox`]()
22+
- [`MediaBox`](https://github.com/flutter-studio/flutter-weui/blob/master/example/lib/media_box_example.dart)
2323
- [`Panel`]()
2424
- [`Picker`]()
2525
- [`Slider`]()

example/lib/media_box_example.dart

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_weui/flutter_weui.dart';
3+
4+
class MediaBoxExample extends StatelessWidget {
5+
@override
6+
Widget build(BuildContext context) {
7+
return Scaffold(
8+
appBar: AppBar(
9+
title: Text("Cell"),
10+
),
11+
body: Cells(
12+
children: <Widget>[
13+
MediaBox(
14+
title: "Title",
15+
desc: "desc",
16+
),
17+
MediaBox(
18+
thumb: Container(
19+
width: 24,
20+
height: 24,
21+
color: Colors.red,
22+
child: Text("A"),
23+
),
24+
title: "Title",
25+
desc: "desc",
26+
),
27+
MediaBox(
28+
title: "Title",
29+
desc: "desc",
30+
info: Info(children: <Widget>[
31+
Meta(text: "文字来源",),
32+
Meta(text: "文本来源",),
33+
MetaExtra(text: "其他信息",)
34+
],),
35+
)
36+
],
37+
),
38+
);
39+
}
40+
}

0 commit comments

Comments
 (0)