Advertisement
TheoGumilang

KosView

Jul 4th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.10 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:projectkos/models/EmployeeModel.dart';
  3.  
  4. class KosView extends StatefulWidget {
  5.   final Employee employee;
  6.   KosView(this.employee);
  7.   @override
  8.   _KosViewState createState() => _KosViewState();
  9. }
  10.  
  11. class _KosViewState extends State<KosView> {
  12.   Employee employeestate;
  13.   @override
  14.   void initState() {
  15.     super.initState();
  16.     employeestate = widget.employee;
  17.   }
  18.  
  19.   @override
  20.   Widget build(BuildContext context) {
  21.     return new Card(
  22.       child: new Column(
  23.         children: <Widget>[
  24.           new Padding(
  25.             padding: EdgeInsets.all(7.0),
  26.             child: new Row(
  27.               crossAxisAlignment: CrossAxisAlignment.start,
  28.               children: <Widget>[
  29.                 new Text(
  30.                   employeestate.firstName + ' ' + employeestate.lastName,
  31.                   style: new TextStyle(
  32.                       fontSize: 18.0, fontWeight: FontWeight.w300),
  33.                   textDirection: TextDirection.rtl,
  34.                 ),
  35.               ],
  36.             ),
  37.           ),
  38.           new Padding(
  39.               padding: new EdgeInsets.all(7.0),
  40.               child: new Row(
  41.                 children: <Widget>[
  42.                   new Padding(
  43.                     padding: new EdgeInsets.all(7.0),
  44.                     child: new Icon(Icons.monetization_on),
  45.                   ),
  46.                   new Padding(
  47.                     padding: new EdgeInsets.all(7.0),
  48.                     child: new Text(
  49.                       employeestate.salary,
  50.                       style: new TextStyle(fontSize: 18.0),
  51.                     ),
  52.                   ),
  53.                   new Padding(
  54.                     padding: new EdgeInsets.all(7.0),
  55.                     child: new Icon(Icons.face),
  56.                   ),
  57.                   new Padding(
  58.                     padding: new EdgeInsets.all(7.0),
  59.                     child: new Text(employeestate.gender,
  60.                         style: new TextStyle(fontSize: 18.0)),
  61.                   )
  62.                 ],
  63.               ))
  64.         ],
  65.       ),
  66.     );
  67.   }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement