Advertisement
estevaorada

Flutter - Widget Pacientes

May 6th, 2021
1,198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.39 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2.  
  3. class Paciente extends StatelessWidget {
  4.   final String fotoUrl;
  5.   final String nome;
  6.   final String telefone;
  7.   final String cidade;
  8.   final int id;
  9.  
  10.   const Paciente(
  11.       {Key key, this.fotoUrl, this.nome, this.telefone, this.cidade, this.id})
  12.       : super(key: key);
  13.   @override
  14.   Widget build(BuildContext context) {
  15.     return Container(
  16.         height: 100,
  17.         width: double.infinity,
  18.         child: Card(
  19.             child: Padding(
  20.           padding: const EdgeInsets.all(10.0),
  21.           child: Row(
  22.             mainAxisAlignment: MainAxisAlignment.start,
  23.             children: [
  24.               CircleAvatar(
  25.                 radius: 50,
  26.                 child: ClipOval(
  27.                   child: Image.network(
  28.                     fotoUrl,
  29.                   ),
  30.                 ),
  31.               ),
  32.               Column(
  33.                 mainAxisAlignment: MainAxisAlignment.center,
  34.                 crossAxisAlignment: CrossAxisAlignment.start,
  35.                 children: [
  36.                   Text(
  37.                     nome,
  38.                     style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
  39.                   ),
  40.                   Text(telefone),
  41.                   Text(cidade),
  42.                   Text("ID: " + id.toString())
  43.                 ],
  44.               )
  45.             ],
  46.           ),
  47.         )));
  48.   }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement