Last active
December 24, 2021 05:23
-
-
Save RageshAntony/8ee93d338aec9e352f71c14f0c84f734 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
const descText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Felis eget velit aliquet sagittis id consectetur purus ut. Faucibus scelerisque eleifend donec pretium. \n\n Id semper risus in hendrerit gravida rutrum quisque. Ultrices sagittis orci a scelerisque purus. Netus et malesuada fames ac turpis egestas integer. Urna et pharetra pharetra massa massa ultricies mi quis hendrerit. Lacus vel facilisis volutpat est velit egestas dui id. Volutpat odio facilisis mauris sit amet massa. Eu augue ut lectus arcu bibendum at varius vel. Cum sociis natoque penatibus et. Sit amet volutpat consequat mauris nunc. Vitae turpis massa sed elementum tempus egestas sed sed risus. In cursus turpis massa tincidunt dui ut ornare lectus. Vestibulum lectus mauris ultrices eros in cursus turpis massa tincidunt.'; | |
class ThreeSegment extends StatelessWidget { | |
const ThreeSegment({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
padding: EdgeInsetsDirectional.all(40), | |
color: Colors.grey, | |
child: Card( | |
shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(30.0)), // THIS NOT APPLYING !!! | |
elevation: 20, | |
child: Row( | |
children: <Widget>[ | |
Expanded( | |
flex: 5, // 60% of space => (6/(6 + 4)) | |
child: Container( | |
color: Colors.white, | |
padding: EdgeInsetsDirectional.fromSTEB(10, 20, 10, 20), | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.spaceAround, | |
crossAxisAlignment: CrossAxisAlignment.center, | |
children: [ | |
IconButton(icon: Icon(Icons.add_alert_outlined),tooltip: 'Room', onPressed: () { },), | |
IconButton(icon: Icon(Icons.ten_k),tooltip: 'Desk', onPressed: () { },), | |
IconButton(icon: Icon(Icons.airline_seat_flat_angled_sharp),tooltip: 'Internet', onPressed: () { },), | |
IconButton(icon: Icon(Icons.add_business),tooltip: 'Guest', onPressed: () { },), | |
IconButton(icon: Icon(Icons.agriculture),tooltip: 'Date', onPressed: () { },), | |
IconButton(icon: Icon(Icons.ad_units_rounded),tooltip: 'Near you', onPressed: () { },), | |
], | |
), | |
), | |
), | |
Expanded( | |
flex: 52, // 40% of space | |
child: Container( | |
color: Colors.white, | |
padding: EdgeInsetsDirectional.all(20), | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
children: [ | |
Text("Apartment > Tradinol ", style: TextStyle(fontSize: 16, color: Colors.black, fontWeight: FontWeight.bold),), | |
ElevatedButton( | |
onPressed: () { | |
// Respond to button press | |
}, | |
child: Text("BOOK THIS"), | |
) | |
], | |
), | |
Column( | |
mainAxisAlignment: MainAxisAlignment.start, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
TextButton.icon( | |
onPressed: () { | |
// Respond to button press | |
}, | |
icon: Icon(Icons.add_location_alt, size: 18), | |
label: Text("Markesh"), | |
), | |
SizedBox(height: 5), | |
Container(margin: EdgeInsetsDirectional.only(start: 10), child: Text('Authentic cosy riad in the old downtown city',style: TextStyle(color: Colors.black,fontSize: 22,fontWeight: FontWeight.bold),)), | |
SizedBox(height: 5), | |
Container( | |
margin: EdgeInsetsDirectional.only(start: 10), | |
child: Row( | |
mainAxisAlignment: MainAxisAlignment.start, | |
children: [ | |
RichText( | |
text: TextSpan( | |
children: [ | |
WidgetSpan( | |
child: Icon(Icons.airline_seat_recline_extra_rounded, size: 14), | |
), | |
TextSpan( | |
text: "2 Guests ", | |
style: TextStyle(color: Colors.black,fontWeight: FontWeight.bold) | |
), | |
], | |
), | |
), | |
RichText( | |
text: TextSpan( | |
children: [ | |
WidgetSpan( | |
child: Icon(Icons.airline_seat_recline_extra_rounded, size: 14), | |
), | |
TextSpan( | |
text: "2 Guests ", | |
style: TextStyle(color: Colors.black,fontWeight: FontWeight.bold) | |
), | |
], | |
), | |
), | |
RichText( | |
text: TextSpan( | |
children: [ | |
WidgetSpan( | |
child: Icon(Icons.airline_seat_recline_extra_rounded, size: 14), | |
), | |
TextSpan( | |
text: "2 Guests ", | |
style: TextStyle(color: Colors.black,fontWeight: FontWeight.bold) | |
), | |
], | |
), | |
), | |
RichText( | |
text: TextSpan( | |
children: [ | |
WidgetSpan( | |
child: Icon(Icons.airline_seat_recline_extra_rounded, size: 14), | |
), | |
TextSpan( | |
text: "2 Guests ", | |
style: TextStyle(color: Colors.black,fontWeight: FontWeight.bold) | |
), | |
], | |
), | |
), | |
], | |
), | |
), | |
SizedBox(height: 15), | |
Text(descText,textAlign: TextAlign.justify,), | |
SizedBox(height: 50,), | |
ListTile( | |
leading: FlutterLogo(size: 56.0), | |
title: Text('THosted By'), | |
subtitle: Text('Mohamahad Ashiq'), | |
trailing: null, | |
) | |
], | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.start, | |
children: [ | |
TextButton.icon( | |
onPressed: () { | |
// Respond to button press | |
}, | |
icon: Icon(Icons.account_tree, size: 18), | |
label: Text("Share with friends"), | |
), | |
SizedBox(width: 10), | |
TextButton.icon( | |
onPressed: () { | |
// Respond to button press | |
}, | |
icon: Icon(Icons.attach_email, size: 18), | |
label: Text("Send a message"), | |
), | |
], | |
) | |
], | |
), | |
), | |
), | |
Expanded( | |
flex: 38, // 40% of space | |
child: Container( | |
color: Colors.white, | |
child: Image(fit: BoxFit.contain, image: AssetImage('assets/images/banner.jpg')), | |
), | |
) | |
], | |
), | |
), | |
); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment