Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool _value = false;
- String cartype = '1';
- @override
- void initState() {
- cartype == "1" ? _value = true : _value = false;
- super.initState();
- }
- ...
- Checkbox(
- value: _value,
- onChanged: (bool value) {
- setState(() {
- _value = value;
- });
- },
- ),
- Text(_value ? "a" : 'b'),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement