Copy and Paste  -   An Application to Copy/Paste Text  

 
S.No 5970 Name container Date/Time 01-Jul-2024 03:06:18 PM

Copy text from below
/*
Question C35:
Write code to show the following list using flutter <ListView> widget
[ {name: ‘Ali’, age: 33, city: ‘Karachi’}, {name: ‘Faisal’, age: 20, city: ‘Lahore’}, {name:
‘Noman’, age: 53, city: ‘Karachi’},]
*/

import 'package:flutter/material.dart';

class Student {
  final int id;
  final String name;
  final double gpa;

  Student(this.id, this.name, this.gpa);
}

void main() {
  runApp(MaterialApp(title: 'Flutter Demo', home: MyApp()));
}

class MyApp extends StatelessWidget {
  MyApp({super.key});

  final List<Map<String, dynamic>> students = [
    {"name": "Ali", "age": "33", "city": "Karachi"},
    {"name": "Faisal", "age": "20", "city": "Lahore"},
    {"name": "Noman", "age": "53", "city": "Karachi"},
    {"name": "Noman Khan", "age": "53", "city": "Karachi ABCDE"},
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Container(
            padding: const EdgeInsets.all(40),
            child: ListView.builder(
                itemCount: students.length,
                itemBuilder: (context, index) {
                  final item = students[index];

                  return ListTile(
                      title: Row(children: [
                    Expanded(child: Text(item["name"])),
                    Expanded(child: Text(item["age"])),
                    Expanded(child: Text(item["city"])),
                  ]));
                })));
  }
}




comments powered by Disqus
NEW ENTRIES
S.No Name Entry Time/Date
5886 EntranceIQ 05-Jan-2024 02:04:27 PM
5885 New Child 03-Jan-2024 07:13:03 AM
5884 xyz 31-Dec-2023 04:09:19 AM
5883 aaaaaa 29-Dec-2023 01:24:48 AM
5882 Saragamasa 29-Dec-2023 01:19:17 AM
5881 copyWithin() 28-Dec-2023 09:21:58 AM
5880 Paster 27-Dec-2023 10:02:58 PM
5879 imagePicker 22-Dec-2023 10:33:52 PM
5878 Test 1 22-Dec-2023 11:07:15 AM
5877 Test 2 22-Dec-2023 11:06:28 AM
5876 Test 3 22-Dec-2023 11:04:29 AM
5875 hamza jadoon 21-Dec-2023 10:23:58 AM
5874 cam_expo 21-Dec-2023 10:13:11 AM
5873 camera code 21-Dec-2023 10:05:49 AM
5872 code 20-Dec-2023 10:38:07 AM
5871 Updated Kid 20-Dec-2023 07:09:59 AM
5870 Alpha 18-Dec-2023 10:52:22 PM
5869 code 07-Dec-2023 10:41:02 AM
5868 HMZ1 07-Dec-2023 08:50:55 AM
5867 HMZ 07-Dec-2023 08:41:31 AM
5866 Child New 05-Dec-2023 08:45:17 AM
5865 Danielle Simpson 29-Nov-2023 10:52:32 PM
5864 comp 28-Nov-2023 03:37:04 PM
5863 New Kids 27-Nov-2023 07:07:09 AM
5862 Jdh 24-Nov-2023 08:10:16 PM
5861 111 24-Nov-2023 03:02:22 PM
5860 modal 20-Nov-2023 03:02:57 PM
5859 omar 19-Nov-2023 04:27:23 PM
5858 ss 17-Nov-2023 05:14:03 PM
5857 ARCode 17-Nov-2023 02:55:42 PM

[First] [Prev] 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 [Next] [Last]
 
web counter
web counter


To report any error messages or bugs, or other issues, please send email at: info@pakproject.com