RadioListTitle In Flutter

RadioListTitle In Flutter :

Screenshot :

RadioListTitle In Flutter

Program :

import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
void main() {
   runApp(new MaterialApp(
     debugShowCheckedModeBanner: false,
     home: new RadioListTitleDemo(),
   ));
 }
class RadioListTitleDemo extends StatefulWidget {
   RadioListTitleDemo() : super();
final String title = "RadioListTile";
@override
   RadioListTitleDemoState createState() => RadioListTitleDemoState();
 }
class Programming {
   int userId;
   String language;
   String developer;
Programming({this.userId, this.language, this.developer});
static List getProgramming() {
     return [
       Programming(userId: 1, language: "Android", developer: "https://fluttertutorial.in/"),
       Programming(userId: 2, language: "Java", developer: "https://fluttertutorial.in/"),
       Programming(userId: 3, language: "Kotlin", developer: "https://fluttertutorial.in/"),
       Programming(userId: 4, language: "Flutter", developer: "https://fluttertutorial.in/")
     ];
   }
 }
class RadioListTitleDemoState extends State {
   List programmingList;
   Programming selectedValue;
   int selectedRadio;
   int selectedRadioTile;
@override
   void initState() {
     super.initState();
     selectedRadio = 0;
     selectedRadioTile = 0;
     programmingList = Programming.getProgramming();
   }
setSelectedRadio(int val) {
     setState(() {
       selectedRadio = val;
     });
   }
setSelectedRadioTile(int val) {
     setState(() {
       selectedRadioTile = val;
     });
   }
setSelectedUser(Programming programming) {
     setState(() {
       selectedValue = programming;
     });
   }
List createRadioListUsers() {
     List widgets = [];
     for (Programming programming in programmingList) {
       widgets.add(
         RadioListTile(
           value: programming,
           groupValue: selectedValue,
           title: Text(programming.language),
           subtitle: Text(programming.developer),
           onChanged: (currentUser) {
             setSelectedUser(currentUser);
             print("Current ${selectedValue.userId}");
           },
           selected: selectedValue == programming,
           activeColor: Colors.green,
         ),
       );
     }
     return widgets;
   }
@override
   Widget build(BuildContext context) {
     return Scaffold(
       appBar: AppBar(
         title: Text(widget.title),
       ),
       body: Column(
         mainAxisAlignment: MainAxisAlignment.start,
         children: [
           Column(
             children: createRadioListUsers(),
           )
         ],
       ),
     );
   }
 }