Copy and Paste  -   An Application to Copy/Paste Text  

 
S.No 5942 Name mad Date/Time 03-Jun-2024 01:59:22 PM

Copy text from below

import 'package:flutter/material.dart';

 

void main() => runApp(const MyApp());

 

class MyApp extends StatelessWidget {

  const MyApp({super.key});

 

  @override

  Widget build(BuildContext context) {

    const String appTitle = 'Flutter layout demo';

    return MaterialApp(

      title: appTitle,

      home: Scaffold(

        appBar: AppBar(

          centerTitle:  const Text(appTitle),

        ),

        body: const Center(

          child: SingleChildScrollView(

            child: Column(

              children: [ 

                ImageSection(

                  image: 'D:\Haseebprj\haseebtask\lib\images\lake.jpg', // Corrected image path

                ),

                TitleSection(

                  name: 'Oeschinen Lake Campground',

                  location: 'Kandersteg, Switzerland',

                ),

                ButtonSection(),

                TextSection(

                  description:

                      'Lake Oeschinen lies at the foot of the Blüemlisalp in the '

                      'Bernese Alps. Situated 1,578 meters above sea level, it '

                      'is one of the larger Alpine Lakes. A gondola ride from '

                      'Kandersteg, followed by a half-hour walk through pastures '

                      'and pine forest, leads you to the lake, which warms to 20 '

                      'degrees Celsius in the summer. Activities enjoyed here '

                      'include rowing, and riding the summer toboggan run.',

                ),

              ],

            ),

          ),

        ),

      ),

    );

  }

}

 

class TitleSection extends StatelessWidget {

  const TitleSection({

    super.key,

    required this.name,

    required this.location,

  });

 

  final String name;

  final String location;

 

  @override

  Widget build(BuildContext context) {

    return Padding(

      padding: const EdgeInsets.all(32),

      child: Row(

        children: [

          Expanded(

            child: Column(

              crossAxisAlignment: CrossAxisAlignment.start,

              children: [

                Padding(

                  padding: const EdgeInsets.only(bottom: 8),

                  child: Text(

                    name,

                    style: const TextStyle(

                      fontWeight: FontWeight.bold,

                    ),

                  ),

                ),

                Text(

                  location,

                  style: TextStyle(

                    color: Colors.grey[500],

                  ),

                ),

              ],

            ),

          ),

          Icon(

            Icons.star,

            color: Colors.red[500],

          ),

          const Text('41'),

        ],

      ),

    );

  }

}

 

class ButtonSection extends StatelessWidget {

  const ButtonSection({super.key});

 

  @override

  Widget build(BuildContext context) {

    final Color color = Theme.of(context).primaryColor;

    return SizedBox(

      child: Row(

        mainAxisAlignment: MainAxisAlignment.spaceEvenly,

        children: [

          ButtonWithText(

            color: color,

            icon: Icons.call,

            label: 'CALL',

          ),

          ButtonWithText(

            color: color,

            icon: Icons.near_me,

            label: 'ROUTE',

          ),

          ButtonWithText(

            color: color,

            icon: Icons.share,

            label: 'SHARE',

          ),

        ],

      ),

    );

  }

}

 

class ButtonWithText extends StatelessWidget {

  const ButtonWithText({

    super.key,

    required this.color,

    required this.icon,

    required this.label,

  });

 

  final Color color;

  final IconData icon;

  final String label;

 

  @override

  Widget build(BuildContext context) {

    return Column(

      mainAxisSize: MainAxisSize.min, // Added this

      children: [

        Icon(icon, color: color),

        Text(label),

      ],

    );

  }

}

 

class TextSection extends StatelessWidget {

  const TextSection({

    super.key,

    required this.description,

  });

 

  final String description;

 

  @override

  Widget build(BuildContext context) {

    return Padding(

      padding: const EdgeInsets.all(32),

      child: Text(

        description,

        softWrap: true,

      ),

    );

  }

}

 

class ImageSection extends StatelessWidget {

  const ImageSection({super.key, required this.image});

 

  final String image;

  

  @override

  Widget build(BuildContext context) {

    return Image.asset(

      image,

      width: 600,

      height: 240,

      fit: BoxFit.cover,

    );

  }

}





comments powered by Disqus
NEW ENTRIES
S.No Name Entry Time/Date
5624 Test 2 Mar 2 01-Mar-2023 07:56:55 PM
5623 Test 1 Mar 2 01-Mar-2023 07:56:17 PM
5622 MET March 1 28-Feb-2023 09:28:19 PM
5621 Test 5 Mar1 28-Feb-2023 09:24:26 PM
5620 Test3 Mar 1 28-Feb-2023 09:21:50 PM
5619 Test2 March1 28-Feb-2023 09:16:47 PM
5618 Test 1 Mar1 28-Feb-2023 08:35:23 PM
5617 Test 2 F28 28-Feb-2023 10:33:02 AM
5616 Test 2 Feb28 28-Feb-2023 10:22:59 AM
5615 SEXY HOT 28-Feb-2023 08:45:07 AM
5614 Test 1 Feb28 27-Feb-2023 09:41:28 PM
5613 PHD 24-Feb-2023 10:41:13 AM
5612 Test1 Feb24 23-Feb-2023 10:07:55 PM
5611 PHD 23-Feb-2023 06:39:41 PM
5610 online test 23-Feb-2023 10:37:21 AM
5609 MET 23 FEB 23-Feb-2023 10:04:42 AM
5608 Test 1 Feb23 22-Feb-2023 11:21:15 PM
5607 Test1Feb22 21-Feb-2023 03:12:58 PM
5606 PPSL 21-Feb-2023 03:11:57 PM
5605 PNG 21-Feb-2023 03:11:39 PM
5604 PCB 21-Feb-2023 03:11:28 PM
5603 PAK 21-Feb-2023 03:11:19 PM
5602 PPG 21-Feb-2023 03:11:03 PM
5601 PQR 21-Feb-2023 03:10:54 PM
5600 PPLGC 21-Feb-2023 03:10:44 PM
5599 PPKL 21-Feb-2023 03:10:36 PM
5598 PSL 21-Feb-2023 03:10:18 PM
5597 HSF 21-Feb-2023 03:10:09 PM

[First] [Prev] 11 | 12
 
web counter
web counter


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