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
5714 Fresh links 29-May-2023 10:08:48 AM
5713 processing 29-May-2023 10:07:23 AM
5712 kos kona 29-May-2023 10:05:49 AM
5711 Abc 24-May-2023 03:28:32 PM
5710 S3xy Movie 24-May-2023 07:45:57 AM
5709 C 23-May-2023 08:29:51 AM
5708 qs 23-May-2023 08:24:49 AM
5707 nnnn 23-May-2023 08:15:38 AM
5706 MiD 23-May-2023 12:47:37 AM
5705 . 22-May-2023 11:08:37 PM
5704 ghhascshgcvs 22-May-2023 05:00:15 PM
5703 StudentDashb 22-May-2023 04:42:27 PM
5702 LoginScreen 22-May-2023 04:41:22 PM
5701 app.js 22-May-2023 04:40:43 PM
5700 Code 22-May-2023 03:55:14 PM
5699 Child Video3 19-May-2023 11:39:31 AM
5698 . 18-May-2023 09:48:52 PM
5697 . 18-May-2023 04:03:47 PM
5696 Child Video2 11-May-2023 08:00:11 AM
5695 Child Videos 05-May-2023 07:58:35 AM
5694 MET May 3 03-May-2023 11:15:13 AM
5693 Asfand Leaks 02-May-2023 09:18:28 AM
5692 bikmangiya 02-May-2023 09:17:04 AM
5691 kk 30-Apr-2023 12:11:31 AM
5690 Yasir 29-Apr-2023 01:32:17 AM
5689 lll 27-Apr-2023 08:39:14 PM
5688 Gg 27-Apr-2023 08:31:28 PM
5687 More 4 You 27-Apr-2023 12:55:44 PM
5686 Elif Yener 26-Apr-2023 03:51:34 PM
5685 cycling 26-Apr-2023 01:26:18 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