You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansu_ui/example/lib/example_box.dart

43 lines
1011 B

import 'package:ansu_ui/ansu_ui.dart';
import 'package:flutter/material.dart';
class ExampleBox extends StatefulWidget {
ExampleBox({Key key}) : super(key: key);
@override
_ExampleBoxState createState() => _ExampleBoxState();
}
class _ExampleBoxState extends State<ExampleBox> {
bool _state = false;
@override
Widget build(BuildContext context) {
return ASScaffold(
title: '选框',
body: ListView(
children: [
ListTile(
leading: ASCheckBox(value: _state),
title: Text('CheckBox'),
onTap: () {
setState(() {
_state = !_state;
});
},
),
ListTile(
leading: ASCheckBox.checkStyle(value: _state),
title: Text('CheckBox'),
subtitle: Text('with styled'),
onTap: () {
setState(() {
_state = !_state;
});
},
),
],
),
);
}
}