dxwidget 0.0.7 copy "dxwidget: ^0.0.7" to clipboard
dxwidget: ^0.0.7 copied to clipboard

outdated

An package of Flutter components for mobile applications.

example/lib/main.dart

import 'package:dxwidget/dxwidget.dart';
import 'package:flutter/material.dart';

void main() async => runApp(const MyApp());

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'DxWidget演示',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  List<RadioItem> radioList = [
    RadioItem(name: '张三', value: true, text: '张三'),
    RadioItem(name: '李四', value: true, text: '李四1'),
  ];
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('DxWidget演示'),
        centerTitle: true,
      ),
      body: Container(
        color: const Color(0xfff7f8fa),
        child: SafeArea(
          child: SingleChildScrollView(
            child: Column(children: <Widget>[
              // DemoButton(),
              // DemoCell(),
              // DemoPanel(),
              // DemoPrice(),
              // DemoDialog(),
              // DemoShareSheet(),
              // DemoActionSheet()
              // DxCell(title: '开启日志', customRight: DxSwitch(value: true, onChange: (bool value) => print(value))),
              // DxCell(title: '开启日志', customRight: DxSwitch(value: false, onChange: (bool value) => print(value))),
              // DxCell(title: '开启日志', customRight: DxCheckbox(value: false, onChange: (bool value) => print(value))),
              // DxCellGroup(
              //   title: '表单',
              //   children: [
              //     DxInputFormItem(
              //       controller: TextEditingController(),
              //       title: '姓名',
              //       unit: '元',
              //     ),
              //     DxInputFormItem(
              //       controller: TextEditingController(),
              //       title: '好好学习',
              //       isRequire: true,
              //     ),
              //     DxRadioFormItem(
              //       title: '客户类型',
              //       options: [
              //         RadioItem(name: '会员', text: '会员', value: false),
              //         RadioItem(name: '分销商', text: '分销商', value: false),
              //       ],
              //     ),
              //     DxSwitchFormItem(
              //       title: '开启备份',
              //       value: true,
              //       onChange: (value) => print(value),
              //     ),
              //     DxHorizontalFormItem(
              //       title: '店铺名称',
              //       child: Text('我是我是点'),
              //     ),
              //     DxSelectFormItem(
              //       title: '客户等级',
              //       value: '优质客户',
              //       onTap: () => print('111'),
              //     ),
              //     DxInputSelectFormItem(
              //       title: '类型',
              //     ),
              //     DxVerticalFormItem(
              //       title: '请输入',
              //       child: Text('111'),
              //     ),
              //     DxTextareaFormItem(
              //       controller: TextEditingController(),
              //       title: '您的介绍',
              //       maxCharCount: 100,
              //     )
              //   ],
              // )
              DxCell(
                title: '购买数量',
                customRight: DxStepper(
                  inputWidth: 48,
                  onChange: (String v) => print(v),
                ),
              ),
              Padding(
                padding: EdgeInsets.all(20),
                child: DxPasswordFormItem(
                  borderType: DxPasswordBorderType.underLine,
                  obscureText: false,
                  info: '请输入您收到的验证码',
                ),
              )
            ]),
          ),
        ),
      ),
    );
  }
}
2
likes
0
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

An package of Flutter components for mobile applications.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on dxwidget