Skip to content

Commit afc264a

Browse files
committed
feat(add button example):
1 parent 66f4293 commit afc264a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

example/lib/button_example.dart

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:flutter_weui/flutter_weui.dart';
3+
4+
class ButtonExample extends StatelessWidget {
5+
@override
6+
Widget build(BuildContext context) {
7+
return Scaffold(
8+
appBar: AppBar(
9+
title: Text("Button"),
10+
),
11+
body: Padding(
12+
padding: const EdgeInsets.all(5),
13+
child: ListView(
14+
children: <Widget>[
15+
Button(),
16+
Button(type: ButtonType.btnWarn),
17+
Button(type: ButtonType.btnPrimary),
18+
Button(loading: true),
19+
Button(disabled: true),
20+
Button(text: "按钮"),
21+
],
22+
),
23+
),
24+
);
25+
}
26+
}

0 commit comments

Comments
 (0)