Last active
December 9, 2020 11:29
-
-
Save rkpontes/5c7b4881a0ee55938ff26e7177b252c0 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
class CompanyView extends GetView<CompanyController> { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: Stack( | |
children: [ | |
Container( | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Container( | |
padding: EdgeInsets.all(20), | |
decoration: BoxDecoration( | |
color: Colors.blue, | |
image: DecorationImage( | |
image: NetworkImage('https://i.imgur.com/yFdaaEU.jpeg'), | |
fit: BoxFit.cover, | |
), | |
), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
SizedBox( | |
height: 10, | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
children: [ | |
IconButton( | |
icon: Icon( | |
Icons.arrow_back, | |
color: Colors.white, | |
), | |
onPressed: () { | |
Get.back(); | |
}, | |
), | |
IconButton( | |
icon: Icon( | |
Icons.search, | |
color: Colors.white, | |
), | |
onPressed: () { | |
// | |
}, | |
), | |
], | |
), | |
Row( | |
mainAxisAlignment: MainAxisAlignment.spaceBetween, | |
children: [ | |
Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Text( | |
"Nome da Barbearia", | |
style: TextStyle( | |
color: Colors.white, | |
fontWeight: FontWeight.w700, | |
fontSize: 20, | |
), | |
), | |
], | |
), | |
], | |
), | |
SizedBox( | |
height: 10, | |
), | |
Text( | |
"Av. Blablabla Blablabla, 00. Blabla, Teste - TS", | |
style: TextStyle(color: Colors.white, fontSize: 15), | |
), | |
], | |
), | |
), | |
SizedBox( | |
height: 15, | |
), | |
Container( | |
padding: EdgeInsets.symmetric(horizontal: 10), | |
child: Column( | |
children: [ | |
Row( | |
crossAxisAlignment: CrossAxisAlignment.end, | |
children: [ | |
Text( | |
"Selecione um Funcionário", | |
style: TextStyle( | |
fontSize: 22, fontWeight: FontWeight.w700), | |
), | |
], | |
), | |
], | |
), | |
), | |
Expanded( | |
child: ListView( | |
children: [ | |
EmployeeCard(Employee()), | |
EmployeeCard(Employee()), | |
EmployeeCard(Employee()), | |
EmployeeCard(Employee()), | |
EmployeeCard(Employee()), | |
], | |
), | |
), | |
], | |
), | |
), | |
], | |
), | |
); | |
} | |
} | |
//////////// EmployeeCard ////////////////////////////////////// | |
class EmployeeCard extends StatelessWidget { | |
final Employee employee; | |
EmployeeCard(this.employee); | |
@override | |
Widget build(BuildContext context) { | |
return Column( | |
children: [ | |
Padding( | |
padding: EdgeInsets.symmetric(horizontal: 10), | |
child: Row( | |
children: [ | |
Container( | |
height: 100, | |
width: 100, | |
margin: EdgeInsets.only(right: 10), | |
decoration: BoxDecoration( | |
image: DecorationImage( | |
image: NetworkImage("https://i.imgur.com/pBcut2e.jpeg"), | |
), | |
), | |
), | |
Expanded( | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: [ | |
Text( | |
"Funcionário A", | |
style: | |
TextStyle(fontSize: 16, fontWeight: FontWeight.w600), | |
), | |
Row( | |
children: (List<int>.generate(5, (i) => i + 1)).map((e) { | |
return Icon( | |
Icons.star, | |
size: 20, | |
color: Colors.orange, | |
); | |
}).toList(), | |
), | |
Text( | |
"Lorem ipsum sits dolar amet is for publishing", | |
style: TextStyle(fontSize: 12), | |
) | |
], | |
), | |
), | |
InkWell( | |
onTap: () { | |
// | |
}, | |
child: Container( | |
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10), | |
decoration: BoxDecoration( | |
borderRadius: BorderRadius.all( | |
Radius.circular(40), | |
), | |
color: Colors.green, | |
), | |
child: Text( | |
"Ver Serviços", | |
style: TextStyle( | |
color: Colors.white, | |
fontSize: 12, | |
fontWeight: FontWeight.w700, | |
), | |
), | |
), | |
), | |
], | |
), | |
), | |
SizedBox( | |
height: 20, | |
), | |
], | |
); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment