parent
9c33b23c03
commit
8ff5522428
@ -1,18 +1,60 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:test/Classes/password.dart';
|
import 'package:test/Classes/password.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
class RedPassword extends StatefulWidget {
|
class DoctorPassword extends StatelessWidget {
|
||||||
Password password;
|
|
||||||
RedPassword({super.key, required this.password});
|
|
||||||
|
|
||||||
@override
|
Password password;
|
||||||
State<RedPassword> createState() => _RedPasswordState();
|
|
||||||
}
|
var color;
|
||||||
|
|
||||||
class _RedPasswordState extends State<RedPassword> {
|
DoctorPassword({super.key, required this.password,required this.color});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold();
|
var size = MediaQuery.of(context).size;
|
||||||
|
var w = size.width;
|
||||||
|
var h = size.height;
|
||||||
|
// Widget
|
||||||
|
return Container(
|
||||||
|
height: h * 1,
|
||||||
|
width: w * 0.80,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: color,
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
'assets/${password.getWebsiteImage}.png',
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
password.getName,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
password.getEmail!,
|
||||||
|
style: const TextStyle(
|
||||||
|
)
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
const Spacer(),
|
||||||
|
InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
await Clipboard.setData(
|
||||||
|
ClipboardData(text: password.getPassword));
|
||||||
|
},
|
||||||
|
child: const Icon(
|
||||||
|
Icons.copy,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in new issue