Advertisement
wildanfuady

Radio Button Example

Oct 13th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:grouped_buttons/grouped_buttons.dart';
  3.  
  4. class RadioExample extends StatelessWidget {
  5. @override
  6. Widget build(BuildContext context) {
  7. return Scaffold(
  8. appBar: AppBar(
  9. title: Text('Radio Button Sample'),
  10. ),
  11. body: Column(
  12. mainAxisAlignment: MainAxisAlignment.start,
  13. children: <Widget>[
  14. RadioButtonGroup(
  15. labels: <String>[
  16. "Option 1",
  17. "Option 2",
  18. ],
  19. onSelected: (String selected) => print(selected)
  20. ),
  21. ],
  22.  
  23. ),
  24. );
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement