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
5744 Cute Sexy 22-Jul-2023 08:18:25 AM
5743 KIDs Sexy 17-Jul-2023 10:18:41 AM
5742 dfa 11-Jul-2023 09:08:36 AM
5741 HOT CHILD 11-Jul-2023 08:53:45 AM
5740 jj assigment 11-Jul-2023 08:43:20 AM
5739 07-Jul-2023 08:20:42 PM
5738 Kid Sexy 26-Jun-2023 09:33:43 AM
5737 mmmmm 24-Jun-2023 07:31:13 PM
5736 ....... 24-Jun-2023 07:17:01 PM
5735 Child Sexy 22-Jun-2023 10:15:56 AM
5734 Mm 20-Jun-2023 09:15:38 PM
5733 Kkk 20-Jun-2023 09:13:08 PM
5732 Ko 20-Jun-2023 08:44:44 PM
5731 bhatti 420 20-Jun-2023 10:53:59 AM
5730 Abc 20-Jun-2023 08:57:46 AM
5729 Lab 20-Jun-2023 08:53:25 AM
5728 ..... 20-Jun-2023 08:38:08 AM
5727 Best S.E.X.Y 17-Jun-2023 07:31:25 AM
5726 Aab 15-Jun-2023 09:29:28 PM
5725 a 13-Jun-2023 10:33:05 PM
5724 Child Vids 12-Jun-2023 11:21:50 AM
5723 Emi Pet 12-Jun-2023 06:50:51 AM
5722 cmd 06-Jun-2023 12:24:35 PM
5721 CHILD HOT 05-Jun-2023 09:08:42 AM
5720 Lakestone En 04-Jun-2023 05:08:53 PM
5719 . 03-Jun-2023 01:20:03 PM
5718 code 29-May-2023 05:50:57 PM
5717 link 29-May-2023 04:39:14 PM
5716 K1d S3xy 29-May-2023 12:49:04 PM
5715 code 29-May-2023 10:13:03 AM

[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