vant 1.0.1 copy "vant: ^1.0.1" to clipboard
vant: ^1.0.1 copied to clipboard

flutter vant ui

example/lib/main.dart

import 'package:example/pages/demo_pages.dart';
import 'package:example/theme/theme.dart';
import 'package:flutter/material.dart';
import 'package:vant/vant.dart';

void main() {
  // runApp(VantUI( child: MyApp(), theme: theme1));
  runApp(VantUI( child: MyApp()));
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  HomePage({Key key}) : super(key: key);

  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Example"),
      ),
      body: Scrollbar(
        child: ListView(
          children: <Widget>[
            VanCellGroup(title: "基础组件", children: <Widget>[
              VanCell(
                  title: "Button 按钮",
                  onPressed: () => Navigator.of(context).push(MaterialPageRoute(builder: (_) => DemoButton())),
                  clickable: true,
              ),
              VanCell(
                title: "Cell 单元格",
                onPressed: () => Navigator.of(context).push(MaterialPageRoute(builder: (_) => DemoCell())),
                clickable: true,
              ),
              VanCell(
                title: "Toast 轻提示",
                onPressed: () => Navigator.of(context).push(MaterialPageRoute(builder: (_) => DemoField())),
                clickable: true,
              ),
            ]),
            VanCellGroup(
              title: "表单组件",
              children: <Widget>[
                VanCell(
                  title: "Field 输入框",
                  onPressed: () => Navigator.of(context).push(MaterialPageRoute(builder: (_) => DemoField())),
                  clickable: true,
                ),
                VanCell(title: "Search 搜索", onPressed: () {},clickable: true),
              ],
            ),
            VanCellGroup(
              title: "反馈组件",
              children: <Widget>[
                VanCell(title: "Loading 加载", onPressed: () {},clickable: true,),
                VanCell(title: "Notify 消息通知", onPressed: () {},clickable: true,),
                VanCell(title: "Overlay 遮罩层", onPressed: () {},clickable: true,),
              ],
            ),
            VanCellGroup(title: "展示组件", children: <Widget>[
              VanCell(title: "Circle 环形进度条", onPressed: () {},clickable: true,),
              VanCell(title: "Divider 分割线", onPressed: () {},clickable: true,),
              VanCell(title: "Empty 空状态", onPressed: () {},clickable: true,),
              VanCell(title: "countDown 倒计时", onPressed: () {},clickable: true,),
              VanCell(title: "NoticeBar 通知栏", onPressed: () {},clickable: true,),
              VanCell(title: "Progress 进度条", onPressed: () {},clickable: true,),
              VanCell(title: "Sticky 粘性布局", onPressed: () {},clickable: true,),
              VanCell(
                title: "Tag 标记",
                onPressed: () => Navigator.of(context).push(MaterialPageRoute(builder: (_) => DemoTag())),
                clickable: true,
              ),
            ]),
            VanCellGroup(
              title: "导航组件",
              children: <Widget>[
                VanCell(title: "Pagination 分页", onPressed: () {},clickable: true,),
                VanCell(title: "Card 卡片", onPressed: () {},clickable: true,),
              ],
            )
          ],
        ),
      ),
    );
  }
}
1
likes
20
pub points
0%
popularity

Publisher

unverified uploader

flutter vant ui

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on vant