dxwidget 0.0.5
dxwidget: ^0.0.5 copied to clipboard
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))),
DxHorizontalItem(
isRequire: true,
title: '客户类型',
child: DxRadioGroup(
value: "张三",
list: radioList,
),
),
],
),
),
),
),
);
}
}